AgentShield - Trust Infrastructure for AI Agents
The trust layer for the agent economy. Like SSL/TLS, but for AI agents.
🔐 Cryptographic Identity - Ed25519 signing keys
🤝 Trust Handshake Protocol - Mutual verification before communication
📋 Public Trust Registry - Reputation scores & track records
✅ 77 Security Tests - Comprehensive vulnerability assessment
🔒 Privacy Disclosure: See PRIVACY.md for detailed data handling information.
🎯 The Problem
Agents need to communicate with other agents (API calls, data sharing, task delegation). But how do you know if another agent is trustworthy?
- - Has it been compromised?
- Is it leaking data?
- Can you trust its responses?
Without a trust layer, agent-to-agent communication is like HTTP without SSL - unsafe and unverifiable.
💡 The Solution: Trust Infrastructure
AgentShield provides the trust layer for agent-to-agent communication:
1. Cryptographic Identity
- - Ed25519 key pairs - Industry-standard cryptography
- Private keys stay local - Never transmitted
- Public key certificates - Signed by AgentShield
2. Security Audit (77 Tests)
52 Live Attack Vectors:
Tests defense against instruction manipulation, encoding schemes, and social engineering
across 6 languages. All attack patterns are stored locally in agentshield
attackpatterns.json
(not embedded in documentation).
25 Static Security Checks:
- - Input sanitization
- Output DLP (data leak prevention)
- Tool sandboxing
- Secret scanning
- Supply chain security
Result: Security score (0-100) + Tier (VULNERABLE → HARDENED)
Privacy: Tests run 100% locally - only pass/fail scores sent to API (no prompts/responses)
3. Trust Handshake Protocol
Agent A wants to communicate with Agent B:
CODEBLOCK0
What you get:
- - ✅ Mutual verification (both agents are who they claim to be)
- ✅ Shared session key (for encrypted communication)
- ✅ Trust score boost (+5 for successful handshakes)
- ✅ Public track record (handshake history)
4. Public Trust Registry
- - Searchable database of all certified agents
- Reputation scores based on audits, handshakes, and time
- Trust tiers: UNVERIFIED → BASIC → VERIFIED → TRUSTED
- Revocation list (CRL) - Compromised agents get flagged
🚀 Quick Start
Install
CODEBLOCK1
Get Certified (77 Security Tests)
CODEBLOCK2
Output:
- - ✅ Agent ID: INLINECODE0
- ✅ Security Score: XX/100
- ✅ Tier: PATTERNS_CLEAN / HARDENED / etc.
- ✅ Certificate (90-day validity)
Verify Another Agent
CODEBLOCK3
Trust Handshake with Another Agent
# Initiate handshake
python3 handshake.py --target agent_yyyyy
# Result: Shared session key for encrypted communication
📋 Use Cases
1. Agent-to-Agent API Calls
Before: Agent A calls Agent B's API - no way to verify B's integrity
With AgentShield: Agent A checks Agent B's certificate + handshake → Verified communication
2. Multi-Agent Task Delegation
Before: Orchestrator spawns sub-agents - can't verify they're safe
With AgentShield: All sub-agents certified → Orchestrator knows they're trusted
3. Agent Marketplaces
Before: Download random agents from the internet - no trust guarantees
With AgentShield: Browse Trust Registry → Only hire VERIFIED agents
4. Data Sharing Between Agents
Before: Share sensitive data with another agent - hope it doesn't leak
With AgentShield: Handshake → Encrypted session key → Secure data transfer
🛡️ Security Architecture
Privacy-First Design
✅ All 77 tests run locally - Your system prompts NEVER leave your device
✅ Private keys stay local - Only public keys transmitted
✅ Human-in-the-Loop - Explicit consent before reading IDENTITY.md/SOUL.md
✅ No environment scanning - Doesn't scan for API tokens
What goes to the server:
- - Public key (Ed25519)
- Agent name & platform
- Test scores (passed/failed summary)
What stays local:
- - Private key
- System prompts
- Configuration files
- Detailed test results
Environment Variables (Optional)
AGENTSHIELD_API=https://agentshield.live # API endpoint
AGENT_NAME=MyAgent # Override auto-detection
OPENCLAW_AGENT_NAME=MyAgent # OpenClaw standard
📊 What You Get
Certificate (90-day validity)
CODEBLOCK6
Trust Registry Entry
- - ✅ Public verification URL: INLINECODE1
- ✅ Trust score (0-100) based on:
- Age (longer = more trust)
- Verification count
- Handshake success rate
- Days active
- - ✅ Tier: UNVERIFIED → BASIC → VERIFIED → TRUSTED
Handshake Proof
{
"handshake_id": "hs_xxxxx",
"requester": "agent_A",
"target": "agent_B",
"status": "completed",
"session_key": "...",
"completed_at": "2026-03-10T20:00:00Z"
}
🔧 Scripts Included
| Script | Purpose |
|---|
| INLINECODE2 | Run 77 security tests & get certified |
| INLINECODE3 |
Trust handshake with another agent |
|
verify_peer.py | Check another agent's certificate |
|
show_certificate.py | Display your certificate |
|
agentshield_tester.py | Standalone test suite (advanced) |
🌐 API Endpoints
Base URL: INLINECODE7
1. Agent Audit Flow
CODEBLOCK8
2. Certificate Operations
CODEBLOCK9
3. Trust Handshake
CODEBLOCK10
Rate Limits
- - Audits: 1 per hour per IP
- Handshakes: 10 per hour per agent
- Verifications: Unlimited (read-only)
All endpoints require HTTPS. No API keys needed.
🌐 Trust Handshake Protocol (Technical)
Flow
- 1. Initiate: Agent A → Server: "I want to handshake with Agent B"
- Challenge: Server generates random challenges for both agents
- Sign: Both agents sign their challenges with private keys
- Verify: Server verifies signatures with public keys
- Complete: Server generates shared session key
- Trust Boost: Both agents +5 trust score
Cryptography
- - Algorithm: Ed25519 (curve25519)
- Key Size: 256-bit
- Signature: Deterministic (same message = same signature)
- Session Key: AES-256 compatible
🚀 Roadmap
Current (v1.0.31):
- - ✅ 77 security tests
- ✅ Ed25519 certificates
- ✅ Trust Handshake Protocol
- ✅ Public Trust Registry
- ✅ CRL (Certificate Revocation List)
- ✅ Explicit whitelist sanitization (test IDs only)
- ✅ Dry-run mode for transparency
Coming Soon:
- - ⏳ Auto re-audit (when prompts change)
- ⏳ Negative event reporting
- ⏳ Fleet management (multi-agent dashboard)
- ⏳ Trust badges for messaging platforms
📖 Learn More
- - Website: https://agentshield.live
- GitHub: https://github.com/bartelmost/agentshield
- API Docs: https://agentshield.live/docs
- ClawHub: https://clawhub.ai/bartelmost/agentshield
🎯 TL;DR
AgentShield is SSL/TLS for AI agents.
Get certified → Verify others → Establish trust handshakes → Communicate securely.
CODEBLOCK11
Building the trust layer for the agent economy. 🛡️
🔐 Privacy & Security Guarantees (v1.0.31+)
✅ EXPLICIT WHITELIST (What Gets Sent):
- - Test IDs (e.g. "PI-001", "SS-003")
- Pass/fail boolean per test
- Category names (e.g. "prompt_injection")
- Summary counts (passed/failed/total)
- Agent metadata (name, platform, version)
- Public key (Ed25519, for certificate signing)
❌ NEVER SENT (Explicitly Excluded):
- - ✅ Your system prompt
- ✅ Attack test inputs/payloads (e.g. "ignore previous instructions")
- ✅ Attack test outputs/responses
- ✅ Evidence snippets (base64 matches, pattern findings)
- ✅ Error messages from test execution
- ✅ Tool configurations
- ✅ File paths or workspace structure
- ✅ Private keys (Ed25519, stay local in ~/.agentshield/)
🔍 Code-Level Enforcement:
- - See
audit_client.py line 108: _sanitize_test_details() whitelist - Payloads/responses/evidence explicitly dropped (line 130-136 comments)
- Dry-run mode:
--dry-run flag shows exact payload before submission
Verification:
CODEBLOCK12
All code is open-source: github.com/bartelmost/agentshield
🔒 Data Transmission Transparency
What Gets Sent to AgentShield API
During Audit Submission:
CODEBLOCK13
What is NOT sent:
- - ❌ Full test output/logs
- ❌ Your prompts or system messages
- ❌ IDENTITY.md or SOUL.md file contents
- ❌ Private keys (stay in
~/.agentshield/agent.key) - ❌ Workspace files or memory
API Endpoint:
- - Primary:
https://agentshield.live/api (proxies to Heroku backend) - All traffic over HTTPS (TLS 1.2+)
🛡️ Consent & Privacy
File Read Consent (v1.0.30+):
- 1. ✅ Explicit consent prompt BEFORE reading IDENTITY.md/SOUL.md
- User sees: "🔐 PRIVACY CONSENT - Read IDENTITY.md for agent name? [Y/n]"
- If declined: Exits with message "Please run with: --name 'YourAgentName'"
- If approved: Only name/platform extracted (not full file content)
⚠️ Automation Mode (--yes flag) - v1.0.31+:
The --yes flag is designed for CI/CD and pre-audited environments ONLY.
When to use:
- - ✅ Sandboxed test agents (no real secrets)
- ✅ CI/CD pipelines (after manual code review + dry-run)
- ✅ Agents you've already audited manually
When NOT to use:
- - ❌ Production agents with real secrets
- ❌ Agents handling sensitive user data
- ❌ First-time audit (always use manual mode first!)
Why? The --yes flag bypasses ALL consent prompts. While the code includes
explicit sanitization (see audit_client.py line 108+), we recommend:
- 1. Run
--dry-run first to inspect payload - Manually review audit_client.py whitelist
- Only then use
--yes for automation
Best Practice:
CODEBLOCK14
Privacy-First Mode:
export AGENTSHIELD_NO_AUTO_DETECT=1
python initiate_audit.py --name "MyBot" --platform "telegram"
→ Zero file reads, manual input only
See PRIVACY.md for complete data handling documentation.
AgentShield - AI代理的信任基础设施
代理经济体的信任层。如同SSL/TLS,但专为AI代理设计。
🔐 加密身份 - Ed25519签名密钥
🤝 信任握手协议 - 通信前的相互验证
📋 公共信任注册表 - 信誉评分与行为记录
✅ 77项安全测试 - 全面漏洞评估
🔒 隐私声明: 详细数据处理信息请参阅PRIVACY.md。
🎯 问题所在
代理需要与其他代理通信(API调用、数据共享、任务委派)。但你如何知道另一个代理是否值得信任?
- - 它是否已被入侵?
- 它是否在泄露数据?
- 你能信任它的响应吗?
没有信任层,代理间的通信就像没有SSL的HTTP——既不安全也无法验证。
💡 解决方案:信任基础设施
AgentShield为代理间通信提供信任层:
1. 加密身份
- - Ed25519密钥对 - 行业标准加密
- 私钥本地存储 - 永不传输
- 公钥证书 - 由AgentShield签名
2. 安全审计(77项测试)
52个实时攻击向量:
测试对指令操纵、编码方案和社会工程学的防御能力
涵盖6种语言。所有攻击模式本地存储在agentshield
attackpatterns.json中
(不嵌入文档)。
25项静态安全检查:
- - 输入清理
- 输出DLP(数据泄露防护)
- 工具沙箱化
- 密钥扫描
- 供应链安全
结果: 安全评分(0-100)+ 等级(VULNERABLE → HARDENED)
隐私: 测试100%本地运行——仅向API发送通过/失败评分(不含提示词/响应)
3. 信任握手协议
代理A想要与代理B通信:
bash
步骤1:两个代理都获取认证
python3 initiate_audit.py --auto
步骤2:代理A向代理B发起握手
python3 handshake.py --target agent
Bid
步骤3:两个代理签署挑战
#(v1.0.13+版本自动执行)
步骤4:接收共享会话密钥
→ 现在可以安全通信了!
你将获得:
- - ✅ 相互验证(两个代理身份真实)
- ✅ 共享会话密钥(用于加密通信)
- ✅ 信任评分提升(成功握手+5分)
- ✅ 公开行为记录(握手历史)
4. 公共信任注册表
- - 可搜索数据库,包含所有认证代理
- 信誉评分,基于审计、握手和时长
- 信任等级: UNVERIFIED → BASIC → VERIFIED → TRUSTED
- 撤销列表(CRL) - 被入侵代理将被标记
🚀 快速开始
安装
bash
clawhub install agentshield
安装Python依赖(必需!)
pip3 install -r requirements.txt
cd ~/.openclaw/workspace/skills/agentshield*/
获取认证(77项安全测试)
bash
推荐:先进行预运行(查看将提交的内容)
python3 initiate_audit.py --auto --dry-run
验证载荷后:正式运行
python3 initiate_audit.py --auto
或手动模式(不读取文件):
python3 initiate_audit.py --name MyAgent --platform telegram
输出:
- - ✅ 代理ID:agentxxxxx
- ✅ 安全评分:XX/100
- ✅ 等级:PATTERNSCLEAN / HARDENED 等
- ✅ 证书(90天有效期)
验证其他代理
bash
python3 verify
peer.py agentyyyyy
与其他代理进行信任握手
bash
发起握手
python3 handshake.py --target agent_yyyyy
结果:用于加密通信的共享会话密钥
📋 使用场景
1. 代理间API调用
之前: 代理A调用代理B的API——无法验证B的完整性
使用AgentShield: 代理A检查代理B的证书+握手→验证通信
2. 多代理任务委派
之前: 协调器生成子代理——无法验证它们是否安全
使用AgentShield: 所有子代理已认证→协调器知道它们可信
3. 代理市场
之前: 从互联网下载随机代理——无信任保障
使用AgentShield: 浏览信任注册表→只雇佣已验证的代理
4. 代理间数据共享
之前: 与其他代理共享敏感数据——希望它不会泄露
使用AgentShield: 握手→加密会话密钥→安全数据传输
🛡️ 安全架构
隐私优先设计
✅ 所有77项测试本地运行 - 你的系统提示词永不离开设备
✅ 私钥本地存储 - 仅传输公钥
✅ 人工参与 - 读取IDENTITY.md/SOUL.md前需明确同意
✅ 无环境扫描 - 不扫描API令牌
发送到服务器的内容:
- - 公钥(Ed25519)
- 代理名称和平台
- 测试评分(通过/失败摘要)
本地保留的内容:
环境变量(可选)
bash
AGENTSHIELD_API=https://agentshield.live # API端点
AGENT_NAME=MyAgent # 覆盖自动检测
OPENCLAW
AGENTNAME=MyAgent # OpenClaw标准
📊 你将获得
证书(90天有效期)
json
{
agent
id: agentxxxxx,
public_key: ...,
security_score: 85,
tier: PATTERNS_CLEAN,
issued_at: 2026-03-10,
expires_at: 2026-06-08
}
信任注册表条目
- - ✅ 公开验证URL:agentshield.live/verify/agent_xxxxx
- ✅ 信任评分(0-100),基于:
- 存在时间(越长=越可信)
- 验证次数
- 握手成功率
- 活跃天数
- - ✅ 等级:UNVERIFIED → BASIC → VERIFIED → TRUSTED
握手证明
json
{
handshake
id: hsxxxxx,
requester: agent_A,
target: agent_B,
status: completed,
session_key: ...,
completed_at: 2026-03-10T20:00:00Z
}
🔧 包含的脚本
| 脚本 | 用途 |
|---|
| initiate_audit.py | 运行77项安全测试并获取认证 |
| handshake.py |
与其他代理进行信任握手 |
| verify_peer.py | 检查其他代理的证书 |
| show_certificate.py | 显示你的证书 |
| agentshield_tester.py | 独立测试套件(高级) |
🌐 API端点
基础URL: https://agentshield.live/api
1. 代理审计流程
POST /agent-audit/initiate
→ 发起审计会话
→ 输入:{agentname, platform, publickey}
→ 输出:{audit_id, challenge}
POST /agent-audit/challenge
→ 完成挑战-响应认证
→ 输入:{auditid, challengeresponse (已签名)}
→ 输出:{authenticated: true}
POST /agent-audit/complete
→ 提交测试结果并接收证书
→ 输入:{auditid, testresults}
→ 输出:{certificate, agentid, expiresat}
2. 证书操作
GET /certificate/verify/{agent_id}
→ 验证其他代理的证书
→ 输出:{valid, score, tier, issuedat, expiresat}
GET /api/public-key
→ 获取AgentShield的公开签名密钥
→ 输出:{public_key (Ed25519, base64)}
3. 信任握手
POST /handshake/initiate
→ 与其他代理开始信任握手
→ 输入:{requesterid, targetid}
→ 输出:{handshake_id, challenges}
POST /handshake/complete
→ 使用已签名挑战完成握手
→ 输入:{handshake_id, signatures}
→ 输出:{sessionkey, trustboost}
速率限制