AgentFacts is an open-source Python SDK for managing AI agent identity. It enables secure, signed identity verification for AI agents, benefiting operations teams working with Claude agents. It integrates with workflows requiring agent authentication and security.
git clone https://github.com/agentfacts/agentfacts-py.gitAgentFacts is an open-source Python SDK for managing AI agent identity. It enables secure, signed identity verification for AI agents, benefiting operations teams working with Claude agents. It integrates with workflows requiring agent authentication and security.
1. **Install agentfacts-py**: Run `pip install agentfacts-py` in your Python environment. Ensure you have Python 3.8+ and the required cryptographic dependencies (e.g., `cryptography` library). 2. **Initialize the SDK**: Import the library and create an instance of the `AgentIdentity` class. Configure the agent's metadata, including its name, role, and permissions. Example: ```python from agentfacts import AgentIdentity agent = AgentIdentity( agent_name="DataSyncAgent", role="data_synchronization", permissions=["read:database", "write:cache"], expires_at="2024-12-31T23:59:59Z" ) ``` 3. **Generate Signed Identity**: Use the `sign_identity()` method to generate a cryptographically signed identity. Pass the agent's metadata and a private key for signing. Example: ```python signed_id = agent.sign_identity(private_key="-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----") ``` 4. **Verify Identity**: Use the `verify_identity()` method to validate the signed identity against the public key. This step is critical for ensuring the agent's authenticity before granting access. Example: ```python is_valid = agent.verify_identity( signed_id=signed_id, public_key="-----BEGIN PUBLIC KEY-----\n...\n-----END PUBLIC KEY-----" ) ``` 5. **Integrate with Workflow**: Embed the signed identity in API requests or workflow configurations. Use the `next_steps` from the output to guide further actions, such as registering the agent in your system's identity registry. **Tip**: For production use, store private keys securely using a secrets manager (e.g., AWS Secrets Manager, HashiCorp Vault) and rotate keys periodically.
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/agentfacts/agentfacts-pyCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Use agentfacts-py to generate a signed identity verification for a Claude agent named [AGENT_NAME] operating in [WORKFLOW_CONTEXT]. Include the agent's role as [AGENT_ROLE], permissions scope as [PERMISSIONS], and expiration timestamp as [EXPIRATION_TIMESTAMP]. Verify the identity against the following metadata: [AGENT_METADATA].
```json
{
"agent_id": "claude-agent-7f3a9b2c",
"agent_name": "InventorySyncAgent",
"role": "inventory_sync",
"permissions": ["read:warehouse_data", "write:stock_updates"],
"expires_at": "2024-12-31T23:59:59Z",
"signed_identity": {
"signature": "sha256:4a7b3c2d1e9f0a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2f1a0b9c8d7e6f5a4b3",
"public_key": "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEX0J5...\n-----END PUBLIC KEY-----",
"verification_timestamp": "2024-06-15T14:30:00Z",
"metadata_hash": "sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
},
"verification_status": "valid",
"next_steps": [
"Register this identity in the agent registry for the 'warehouse_sync' workflow.",
"Configure the agent's access token with a 24-hour TTL for enhanced security.",
"Log the verification event in the audit trail under 'agent_authentication'."
]
}
```
### Verification Details:
The `InventorySyncAgent` has been successfully verified with the following attributes:
- **Role**: Synchronizes real-time inventory data between the ERP system and warehouse management software.
- **Permissions**: Read access to warehouse stock levels and write permissions for stock adjustments.
- **Expiration**: The identity token will expire on December 31, 2024, requiring annual renewal.
- **Security**: The signed identity uses ECDSA with SHA-256 for cryptographic verification, ensuring tamper-proof authentication.
### Workflow Integration:
This identity can now be used to authenticate API calls to the warehouse management system (e.g., POST `/api/v1/stock-updates`). The agent's permissions align with the workflow's requirements, allowing it to perform critical inventory synchronization tasks without manual intervention. The audit trail will automatically log all actions taken by this agent, providing traceability for compliance purposes.
### Next Steps for Operations Team:
1. **Registry Update**: Add this agent to the internal agent registry under the 'automation' category.
2. **Token Rotation**: Set up a cron job to rotate the agent's access token every 30 days.
3. **Monitoring**: Configure alerts for any failed verification attempts or permission violations.
4. **Documentation**: Update the agent's runbook with the verification details and renewal process.Open-source hub for ML models, datasets, and demos
Framework for orchestrating multi-agent AI systems
Framework for building applications with LLMs
AI-driven email security with automated threat detection and fraud prevention.
Secure identities with single sign-on and multi-factor authentication solutions.
Automated compliance monitoring for 50+ regulations
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan