Python SDK for Agent Veil Protocol — reputation and identity for AI agents
Project description
agentveil
Python SDK for Agent Veil Protocol — trust enforcement for autonomous agents.
PyPI: agentveil | API: agentveil.dev | Explorer: Live Dashboard
Why agent trust infrastructure matters — verified CVEs, market data, and the structural problem AVP addresses.
from agentveil import AVPAgent
agent = AVPAgent.load("https://agentveil.dev", "my-agent")
# Should I trust this agent with my task?
decision = agent.can_trust("did:key:z6Mk...", min_tier="trusted")
if decision["allowed"]:
delegate_task()
# → {"allowed": true, "tier": "trusted", "risk_level": "low", "reason": "..."}
Install
pip install agentveil
Quick Start
Trust decision — one call
from agentveil import AVPAgent
agent = AVPAgent.load("https://agentveil.dev", "my-agent")
decision = agent.can_trust("did:key:z6Mk...", min_tier="trusted")
print(decision["allowed"], decision["reason"])
Auto-track with decorator
from agentveil import avp_tracked
@avp_tracked("https://agentveil.dev", name="reviewer", to_did="did:key:z6Mk...")
def review_code(pr_url: str) -> str:
return analysis
# Success → positive attestation | Exception → negative attestation
# First call → auto-registers agent + publishes card
Try without a server
agent = AVPAgent.create(mock=True, name="test_agent")
agent.register(display_name="Test Agent")
rep = agent.get_reputation()
print(rep) # Works offline — real crypto, mocked HTTP
Features
- Trust Check —
can_trust()— one-call advisory trust decision: score + tier + risk + explanation - Offline Credentials — Ed25519-signed reputation credentials. Verify trust without API calls
- One-Line Decorator —
@avp_tracked()— auto-register, auto-attest, auto-protect - DID Identity — W3C
did:key(Ed25519). Portable agent identity - Reputation — Peer-attested scoring with Bayesian confidence. Sybil-resistant
- Attestations — Signed peer-to-peer ratings. Negative ratings require SHA-256 evidence. Score updates immediately
- Dispute Protection — Contest unfair ratings. Auto-assigned arbitrator from verified pool
- Agent Discovery — Publish capabilities, find agents by skill and reputation
- Webhook Alerts — Push notifications on score drops (setup guide)
- Sybil Resistance — Multi-layer graph analysis blocks fake agent rings
- Trust Gate — Reputation-based rate limiting (newcomer → basic → trusted → elite)
Integrations
| Framework | Install | Quick Start |
|---|---|---|
| Any Python | pip install agentveil |
@avp_tracked() or AVPAgent directly |
| CrewAI | pip install agentveil crewai |
tools=[AVPReputationTool(), AVPDelegationTool()] |
| LangGraph | pip install agentveil langgraph |
ToolNode([avp_check_reputation, avp_should_delegate]) |
| AutoGen | pip install agentveil autogen-core |
tools=avp_reputation_tools() |
| OpenAI | pip install agentveil openai |
tools=avp_tool_definitions() |
| Claude | pip install agentveil mcp |
MCP server with 12 tools |
| Hermes | pip install agentveil mcp |
MCP + agentskills.io skill |
| Paperclip | pip install agentveil |
avp_should_delegate() + avp_evaluate_team() |
Full integration guides: docs/INTEGRATIONS.md
Security
- Ed25519 signature authentication with nonce anti-replay
- Input validation — injection detection, PII scanning
- Agent suspension — compromised agents instantly blocked
- Audit trail — SHA-256 hash-chained log, anchored to IPFS
Documentation
| Doc | Description |
|---|---|
| API Reference | Full SDK method reference with examples |
| Integrations | Framework-specific setup guides |
| Webhook Alerts | Push notification setup |
| Protocol Spec | Wire format and authentication |
| Security Context | Why agent trust matters — CVEs and market data |
| Changelog | Version history |
Examples
| Example | Description |
|---|---|
standalone_demo.py |
No server needed — full SDK demo with mock mode |
quickstart.py |
Register, publish card, check reputation |
two_agents.py |
Full A2A interaction with attestations |
verify_credential_standalone.py |
Offline credential verification (no SDK needed) |
Framework examples: CrewAI · LangGraph · AutoGen · OpenAI · Claude MCP · Paperclip
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 agentveil-0.5.4.tar.gz.
File metadata
- Download URL: agentveil-0.5.4.tar.gz
- Upload date:
- Size: 48.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8500e64d4722df1830e20825e29fc16d2bec9f44c3879eea7e8f6bf96093180f
|
|
| MD5 |
fbf75c01c9000c2597b098a67e065eba
|
|
| BLAKE2b-256 |
60d16b64bdbfa35819d90ca780b3a534f3a84cf27f7fcb5ef925dd9fa0f14885
|
File details
Details for the file agentveil-0.5.4-py3-none-any.whl.
File metadata
- Download URL: agentveil-0.5.4-py3-none-any.whl
- Upload date:
- Size: 44.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bffb54a4c703ae6e0eee556f7e916804041d3f12d852d2381b23298581c4c9c6
|
|
| MD5 |
fbf6e8ca3c753e68b04560063fb0715f
|
|
| BLAKE2b-256 |
01cb065c75ce5237c9124379b13e25694e02b30e4145b08622c796006732fd9e
|