The open source SDK for AI agents Identity.
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentfacts-0.1.0.tar.gz.
File metadata
- Download URL: agentfacts-0.1.0.tar.gz
- Upload date:
- Size: 184.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b296f8008ba5aa8b1af5e6cdcfaff1d2f68ca79053a2a382435234bd9fd4baeb
|
|
| MD5 |
123de10e8b0305b982aa86131adadb32
|
|
| BLAKE2b-256 |
fc3dc2f7237b031e47ace2f8ceac5d7f7047421a214cba00c669d0a0183ca394
|
Provenance
The following attestation bundles were made for agentfacts-0.1.0.tar.gz:
Publisher:
release.yml on agentfacts/agentfacts-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentfacts-0.1.0.tar.gz -
Subject digest:
b296f8008ba5aa8b1af5e6cdcfaff1d2f68ca79053a2a382435234bd9fd4baeb - Sigstore transparency entry: 836370029
- Sigstore integration time:
-
Permalink:
agentfacts/agentfacts-py@16f581300b913abcfa08e03dc3f7cd878b5a0e47 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/agentfacts
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@16f581300b913abcfa08e03dc3f7cd878b5a0e47 -
Trigger Event:
release
-
Statement type:
File details
Details for the file agentfacts-0.1.0-py3-none-any.whl.
File metadata
- Download URL: agentfacts-0.1.0-py3-none-any.whl
- Upload date:
- Size: 132.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d33947fdbaca9237bb90a73545d5e5b108562af19749d7d1a164b369b20b8eaf
|
|
| MD5 |
de74142e265e5b0d7cd9c765e9279bc9
|
|
| BLAKE2b-256 |
37c2700ca1cb8bbb69f0e0d68a67ecf3c11201ef1c353b4c80d4e42e16d6e42e
|
Provenance
The following attestation bundles were made for agentfacts-0.1.0-py3-none-any.whl:
Publisher:
release.yml on agentfacts/agentfacts-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentfacts-0.1.0-py3-none-any.whl -
Subject digest:
d33947fdbaca9237bb90a73545d5e5b108562af19749d7d1a164b369b20b8eaf - Sigstore transparency entry: 836370032
- Sigstore integration time:
-
Permalink:
agentfacts/agentfacts-py@16f581300b913abcfa08e03dc3f7cd878b5a0e47 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/agentfacts
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@16f581300b913abcfa08e03dc3f7cd878b5a0e47 -
Trigger Event:
release
-
Statement type: