Cryptographic identity and reputation for AI agents. Part of the Thread Suite.
Project description
threadagentid
Python SDK for AgentID — cryptographic identity and reputation for AI agents. Part of the Thread Suite.
Installation
pip install threadagentid
What It Does
Every AI agent gets a verifiable identity and a track record. When two agents meet, they present credentials. Trust is earned, not assumed.
New agents start at 0.5 (grade C — provisionally trusted). Full trust requires 10 verified interactions. An agent cannot exceed a reputation score of 0.8 until it has accumulated a track record.
Quick Start
from agentid import AgentID
aid = AgentID() # defaults to https://agent-id.onrender.com
# Register — new agents start at 0.5, grade C
agent = aid.register("my-agent", "my-public-key")
print(agent["reputation_score"]) # 0.5
print(agent["grade"]) # C
print(agent["verified_interactions"]) # 0
print(agent["trust_ceiling"]) # 0.8
print(agent["credential_hash"]) # store this
# Verify identity
result = aid.verify(agent["agent_id"], "my-public-key")
print(result["verified"]) # True
# Trust lookup — one call, full decision
trust = aid.trust_lookup(
agent_id=agent["agent_id"],
public_key="my-public-key",
querying_agent="receiver-agent",
min_reputation=0.7
)
print(trust["trusted"]) # True or False
print(trust["recommendation"]) # ALLOW or BLOCK
print(trust["trust_ceiling_active"]) # True until 10 verified interactions
# Update reputation after an interaction
# A verified interaction = success + no violation + no PII incident
aid.update_reputation(
agent["agent_id"],
interaction_success=True,
violation=False,
pii_incident=False,
detail="Completed handoff successfully"
)
# Get reputation with full track record detail
rep = aid.get_reputation(agent["agent_id"])
print(rep["verified_interactions"]) # how many clean interactions
print(rep["trust_ceiling_active"]) # False once ≥ 10 verified
# Reputation history
history = aid.get_reputation_history(agent["agent_id"])
# Revoke a compromised agent
aid.revoke(agent["agent_id"], reason="Compromised during audit.")
# Reactivate with proof of ownership
aid.reactivate(agent["agent_id"], "my-public-key", reason="Cleared.")
# ChainThread bridge — verify before accepting a handoff
result = aid.bridge_chainthread(
chain_id="chain-abc123",
sender_id=agent["agent_id"],
sender_public_key="my-public-key",
receiver_id="receiver-agent",
min_reputation=0.7
)
print(result["recommendation"]) # ALLOW or BLOCK
print(result["trust_ceiling_active"])
# Thread Suite health
aid.bridge_status()
aid.stats()
Trust and Reputation Model
| Grade | Score | Verified Interactions | Meaning |
|---|---|---|---|
| A | ≥ 0.9 | ≥ 10 | Fully trusted, proven track record |
| B | ≥ 0.75 | ≥ 10 | Trusted, proven track record |
| C | ≥ 0.6 | any | Acceptable, may be unproven |
| D | ≥ 0.4 | any | Poor — review before accepting |
| F | < 0.4 | any | Do not trust |
Score formula: base_rate - (violations × 0.02) - (pii_incidents × 0.05)
Trust ceiling: agents with fewer than 10 verified interactions cannot exceed 0.8, regardless of math.
All Methods
aid.health()
aid.register(agent_name, public_key, description)
aid.list_agents(active_only)
aid.get_agent(agent_id)
aid.verify(agent_id, public_key, credential_hash)
aid.revoke(agent_id, reason)
aid.reactivate(agent_id, public_key, reason)
aid.get_reputation(agent_id)
aid.update_reputation(agent_id, interaction_success, violation, pii_incident, detail)
aid.get_reputation_history(agent_id)
aid.get_history(agent_id)
aid.trust_lookup(agent_id, public_key, querying_agent, min_reputation)
aid.list_trust_lookups(limit)
aid.bridge_chainthread(chain_id, sender_id, sender_public_key, receiver_id, min_reputation)
aid.bridge_status()
aid.stats()
Links
- GitHub: https://github.com/eugene001dayne/agent-id
- Live API: https://agent-id.onrender.com
- API Docs: https://agent-id.onrender.com/docs
- Thread Suite: https://github.com/eugene001dayne
Project details
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 threadagentid-0.6.0.tar.gz.
File metadata
- Download URL: threadagentid-0.6.0.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d7c5736add4bc66aefbf18ac8272d863ea16e94f38a982f0a65839ea345cbff
|
|
| MD5 |
25d2465c0b85d8f6200ca7859cacb3a0
|
|
| BLAKE2b-256 |
5ac6499d1e92abd769aa00a443bec1ac8647305a06587a3a1539667365de2aeb
|
File details
Details for the file threadagentid-0.6.0-py3-none-any.whl.
File metadata
- Download URL: threadagentid-0.6.0-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5aa060a9bd8ef8853a670dd1b6718a0a5068bc9fb4486132da241ed08bc69b83
|
|
| MD5 |
30b0aca5a398b07180ed6250ff3343c5
|
|
| BLAKE2b-256 |
d5316397cd08ef395372dd9dc24833a2788e0b3318add62454d9d2eb4641561a
|