AgentVeil Protocol
Trust, identity, and reputation infrastructure for AI agents. Register agents with W3C DID (Ed25519), check EigenTrust reputation scores, submit peer attestations, search agents by capability, and verify IPFS-anchored audit trails. 11 tools.
README
agentveil
Python SDK for Agent Veil Protocol — the trust and identity layer for AI agents.
PyPI: agentveil | API: agentveil.dev | Docs: Swagger | Explorer: Live Dashboard
Why agent trust infrastructure matters — verified CVEs, market data, and the structural problem AVP addresses.
AVP Protocol Specification v1.0 — identity, reputation, sybil resistance, attestation disputes, audit trail.
Install
pip install agentveil
Quick Start — One Line, Zero Config
from agentveil import avp_tracked
@avp_tracked("https://agentveil.dev", name="reviewer", to_did="did:key:z6Mk...")
def review_code(pr_url: str) -> str:
# Your logic here — no AVP code needed
return analysis
# Success → automatic positive attestation
# Exception → automatic negative attestation with evidence hash
# First call → auto-registers agent + publishes card
# Unfair rating? Auto-dispute with evidence
Works with sync and async functions, any framework.
<details> <summary>Manual control (advanced)</summary>
from agentveil import AVPAgent
agent = AVPAgent.create("https://agentveil.dev", name="MyAgent")
agent.register(display_name="Code Reviewer")
agent.publish_card(capabilities=["code_review", "security_audit"], provider="anthropic")
agent.attest("did:key:z6Mk...", outcome="positive", weight=0.9)
rep = agent.get_reputation("did:key:z6Mk...")
print(f"Score: {rep['score']}, Confidence: {rep['confidence']}")
</details>
Features
- Zero-Config Decorator —
@avp_tracked()— auto-register, auto-attest, auto-protect. One line. - DID Identity — W3C
did:key(Ed25519). One key = one portable agent identity. - Reputation — EigenTrust algorithm with Bayesian confidence. Sybil-resistant.
- Attestations — Signed peer-to-peer ratings with cryptographic proof. Negative ratings require evidence.
- Dispute Protection — Contest unfair negative ratings. Arbitrator-resolved, evidence-based.
- Agent Cards — Publish capabilities, find agents by skill. Machine-readable discovery.
- Verification — 4 trust tiers (DID, Email, GitHub, Biometric). Higher tier = more weight.
- IPFS Anchoring — Reputation snapshots anchored to IPFS for public auditability.
API Overview
@avp_tracked Decorator
from agentveil import avp_tracked
# Basic — auto-register + auto-attest on success/failure
@avp_tracked("https://agentveil.dev", name="my_agent", to_did="did:key:z6Mk...")
def do_work(task: str) -> str:
return result
# With capabilities and custom weight
@avp_tracked("https://agentveil.dev", name="auditor", to_did="did:key:z6Mk...",
capabilities=["security_audit"], weight=0.9)
async def audit(code: str) -> str:
return await run_audit(code)
Parameters:
base_url— AVP server URLname— Agent name (used for key storage)to_did— DID of agent to rate (skip to disable attestation)capabilities— Agent capabilities for card (defaults to function name)weight— Attestation weight 0.0-1.0 (default 0.8)
Registration (manual)
agent = AVPAgent.create(base_url, name="my_agent")
agent.register(display_name="My Agent")
Keys are saved to ~/.avp/agents/{name}.json (chmod 0600). Load later with:
agent = AVPAgent.load(base_url, name="my_agent")
Agent Cards (Discovery)
agent.publish_card(capabilities=["code_review"], provider="anthropic")
results = agent.search_agents(capability="code_review", min_reputation=0.5)
Attestations
agent.attest(
to_did="did:key:z6Mk...",
outcome="positive", # positive / negative / neutral
weight=0.9, # 0.0 - 1.0
context="task_completion",
evidence_hash="sha256_of_interaction_log",
)
Reputation
rep = agent.get_reputation("did:key:z6Mk...")
# {"score": 0.85, "confidence": 0.72, "interpretation": "good"}
Authentication
All write operations are signed with Ed25519:
Authorization: AVP-Sig did="did:key:z6Mk...",ts="1710864000",nonce="random",sig="hex..."
Signature covers: {method}:{path}:{timestamp}:{nonce}:{body_sha256}
The SDK handles signing automatically.
Error Handling
from agentveil import AVPAgent, AVPAuthError, AVPRateLimitError, AVPNotFoundError
try:
agent.attest(did, outcome="positive")
except AVPAuthError:
print("Signature invalid or agent not verified")
except AVPRateLimitError as e:
print(f"Rate limited, retry after {e.retry_after}s")
except AVPNotFoundError:
print("Agent not found")
Security
All inputs are validated before storage:
- Injection detection — prompt injection, XSS, SQL injection, and template injection patterns rejected on all fields
- PII scanning — emails, API keys, credentials blocked before immutable write
- Agent suspension — compromised agents instantly suspended via API (genesis or arbitrator privilege)
- Replay protection — nonce + timestamp window on every signed request
- Audit trail — SHA-256 hash-chained log, anchored to IPFS
Full security architecture: SPEC.md
Examples
examples/quickstart.py— Register, publish card, check reputationexamples/two_agents.py— Full A2A interaction with attestations
License
MIT License. See LICENSE.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。