AgentFacts
The open source SDK for AI agents Identity.
Overview
AgentFacts is an open source SDK that creates a signed, verifiable profile for any AI agent. It captures identity, base model, tools, policy, and provenance in a tamper-evident JSON card.
Verify offline with Ed25519 + did:key, or auto-introspect popular frameworks for instant metadata. AgentFacts brings trust and transparency to AI agents without heavy lifting by developers.
Quick Start 🚀
Installation
pip install agentfacts
Optional extras:
pip install agentfacts[cli] # CLI tools (agentfacts, af commands)
pip install agentfacts[middleware] # FastAPI/Flask middleware
pip install agentfacts[all] # All extras
Requires Python 3.10+.
Quickstart Example
from agentfacts import AgentFacts
# Suppose you have an existing LangChain agent (e.g., an AgentExecutor or chain)
agent = MyLangChainAgent(...)
# Generate an AgentFacts profile from the agent (introspects model, tools, etc.)
af = AgentFacts.from_agent(agent, name="CustomerSupportBot", description="Answers support FAQs")
# Sign the agent’s metadata (generates a DID and Ed25519 key pair under the hood)
af.sign()
# The AgentFacts metadata can be obtained as a dict or JSON
profile_json = af.to_json()
print("AgentFacts Profile:", profile_json)
# Verify the AgentFacts signature (returns a VerificationResult object)
result = af.verify()
assert result.valid, f"Verification failed: {result.errors}"
This will produce a signed JSON profile (you can save it as agent_profile.json) containing the agent’s details and a cryptographic signature. Anyone with the agent’s public DID can call AgentFacts.verify(...) to validate that profile. ✅
Key Features ✨
- Verifiable identity: Ed25519 signatures with
did:keyDIDs. - Structured metadata: Model, tools, policy, and compliance in one schema.
- Tamper evidence: Merkle log proofs for audit trails.
- Framework introspection: Auto-detects popular agent frameworks.
- Policy checks: Zero-trust rules for required capabilities and attestations.
- Lightweight: Fast signing and RFC 8785 canonical JSON for cross-language parity.
Supported Frameworks
- LangChain
- LlamaIndex
- Hugging Face Agents
- OpenAgents
- CrewAI
- AutoGen
- Manual/Custom
AgentFacts Schema
{
"spec_version": "v0.1",
"agent": {"id": "did:key:...", "name": "Agent", "model": {"name": "gpt-4", "provider": "openai"}},
"publisher": {"id": "did:key:...", "keys": [{"id": "did:key:...#sig-1", "type": "Ed25519VerificationKey2020", "public_key": "BASE64"}]},
"policy": {"compliance": {"frameworks": []}, "constraints": {}},
"issued_at": "2025-02-12T00:00:00Z",
"signature": {"alg": "ed25519", "key_id": "did:key:...#sig-1", "value": "BASE64_SIGNATURE"},
"log_proof": {"log_id": "local", "leaf_hash": "LEAF_HASH", "root_hash": "ROOT_HASH", "inclusion": [{"hash": "SIBLING_HASH_1", "position": "left"}]}
}
Roadmap
- Core SDK: Sign/Verify
- LangChain/CrewAI/HuggingFace integrations
- CLI Wizard
- Attestation plugins
- Web playground
- Multi-party signing
Contributing
We welcome issues and PRs. See CONTRIBUTING.md.
License
MIT. See LICENSE.
Release files for agentfacts 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| agentfacts-0.1.0.tar.gz | 184.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agentfacts-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 316.4 kB
Release files / agentfacts-0.1.0.tar.gz
| Download URL | agentfacts-0.1.0.tar.gz |
|---|---|
| Size | 184.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b296f8008ba5aa8b1af5e6cdcfaff1d2f68ca79053a2a382435234bd9fd4baeb
|
|
BLAKE2b-256 checksum How to use checksums |
fc3dc2f7237b031e47ace2f8ceac5d7f7047421a214cba00c669d0a0183ca394
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 20, 2026.
Transparency logRelease files / agentfacts-0.1.0-py3-none-any.whl
| Download URL | agentfacts-0.1.0-py3-none-any.whl |
|---|---|
| Size | 132.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d33947fdbaca9237bb90a73545d5e5b108562af19749d7d1a164b369b20b8eaf
|
|
BLAKE2b-256 checksum How to use checksums |
37c2700ca1cb8bbb69f0e0d68a67ecf3c11201ef1c353b4c80d4e42e16d6e42e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 20, 2026.
Transparency log