Agentshield Audit
by @bartelmost
Trust Infrastructure for AI Agents - Like SSL/TLS for agent-to-agent communication. 77 security tests, cryptographic certificates, and Trust Handshake Protoc...
clawhub install agentshield-auditπ About This Skill
name: agentshield version: 1.0.31 description: Trust Infrastructure for AI Agents - Like SSL/TLS for agent-to-agent communication. 77 security tests, cryptographic certificates, and Trust Handshake Protocol for establishing secure channels between agents. Explicit whitelist sanitization + dry-run mode for transparency. triggers: ["audit my agent", "get security certificate", "verify agent", "activate AgentShield", "security audit", "trust handshake", "verify peer agent"]
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?
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
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_attack_patterns.json (not embedded in documentation).25 Static Security Checks:
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:# Step 1: Both agents get certified
python3 initiate_audit.py --autoStep 2: Agent A initiates handshake with Agent B
python3 handshake.py --target agent_B_idStep 3: Both agents sign challenges
(Automatic in v1.0.13+)
Step 4: Receive shared session key
β Now you can communicate securely!
What you get:
4. Public Trust Registry
π Quick Start
Install
clawhub install agentshieldInstall Python dependencies (required!)
pip3 install -r requirements.txt
cd ~/.openclaw/workspace/skills/agentshield*/
Get Certified (77 Security Tests)
# RECOMMENDED: Dry-run first (see what would be submitted)
python3 initiate_audit.py --auto --dry-runAfter verifying payload: Run for real
python3 initiate_audit.py --autoOr manual (no file reads):
python3 initiate_audit.py --name "MyAgent" --platform telegram
Output:
agent_xxxxxVerify Another Agent
python3 verify_peer.py agent_yyyyy
Trust Handshake with Another Agent
# Initiate handshake
python3 handshake.py --target agent_yyyyyResult: 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 communication2. 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 trusted3. Agent Marketplaces
Before: Download random agents from the internet - no trust guarantees With AgentShield: Browse Trust Registry β Only hire VERIFIED agents4. 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:
What stays local:
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)
{
"agent_id": "agent_xxxxx",
"public_key": "...",
"security_score": 85,
"tier": "PATTERNS_CLEAN",
"issued_at": "2026-03-10",
"expires_at": "2026-06-08"
}
Trust Registry Entry
agentshield.live/verify/agent_xxxxxHandshake 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 |
|--------|---------|
| initiate_audit.py | Run 77 security tests & get certified |
| handshake.py | 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: https://agentshield.live/api
1. Agent Audit Flow
POST /agent-audit/initiate
β Initiate audit session
β Input: {agent_name, platform, public_key}
β Output: {audit_id, challenge}POST /agent-audit/challenge
β Complete challenge-response authentication
β Input: {audit_id, challenge_response (signed)}
β Output: {authenticated: true}
POST /agent-audit/complete
β Submit test results & receive certificate
β Input: {audit_id, test_results}
β Output: {certificate, agent_id, expires_at}
2. Certificate Operations
GET /certificate/verify/{agent_id}
β Verify another agent's certificate
β Output: {valid, score, tier, issued_at, expires_at}GET /api/public-key
β Get AgentShield's public signing key
β Output: {public_key (Ed25519, base64)}
3. Trust Handshake
POST /handshake/initiate
β Start Trust Handshake with another agent
β Input: {requester_id, target_id}
β Output: {handshake_id, challenges}POST /handshake/complete
β Complete handshake with signed challenges
β Input: {handshake_id, signatures}
β Output: {session_key, trust_boost}
Rate Limits
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" 2. Challenge: Server generates random challenges for both agents 3. Sign: Both agents sign their challenges with private keys 4. Verify: Server verifies signatures with public keys 5. Complete: Server generates shared session key 6. Trust Boost: Both agents +5 trust scoreCryptography
π Roadmap
Current (v1.0.31):
Coming Soon:
π Learn More
π― TL;DR
AgentShield is SSL/TLS for AI agents.
Get certified β Verify others β Establish trust handshakes β Communicate securely.
# 1. Get certified
python3 initiate_audit.py --auto2. Handshake with another agent
python3 handshake.py --target agent_xxxxx3. Verify others
python3 verify_peer.py agent_yyyyy
Building the trust layer for the agent economy. π‘οΈ
π Privacy & Security Guarantees (v1.0.31+)
β EXPLICIT WHITELIST (What Gets Sent):
β NEVER SENT (Explicitly Excluded):
π Code-Level Enforcement:
audit_client.py line 108: _sanitize_test_details() whitelist--dry-run flag shows exact payload before submissionVerification:
# See what WOULD be submitted (no API call)
python3 initiate_audit.py --auto --dry-run
All code is open-source: github.com/bartelmost/agentshield
π Data Transmission Transparency
What Gets Sent to AgentShield API
During Audit Submission:
{
"agent_name": "YourAgent",
"platform": "telegram",
"public_key": "base64_encoded_ed25519_public_key",
"test_results": {
"score": 85,
"tests_passed": 74,
"tests_total": 77,
"tier": "PATTERNS_CLEAN",
"failed_tests": ["test_name_1", "test_name_2"]
}
}
What is NOT sent:
~/.agentshield/agent.key)API Endpoint:
https://agentshield.live/api (proxies to Heroku backend)π‘οΈ Consent & Privacy
File Read Consent (v1.0.30+): 1. β Explicit consent prompt BEFORE reading IDENTITY.md/SOUL.md 2. User sees: "π PRIVACY CONSENT - Read IDENTITY.md for agent name? [Y/n]" 3. If declined: Exits with message "Please run with: --name 'YourAgentName'" 4. 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:
When NOT to use:
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
2. Manually review audit_client.py whitelist
3. Only then use --yes for automation
Best Practice:
# Step 1: Dry-run to see payload
python3 initiate_audit.py --auto --dry-runStep 2: Review output, verify sanitization
(Should only show test IDs + pass/fail, no payloads)
Step 3: If satisfied, run for real
python3 initiate_audit.py --autoStep 4: For CI/CD, add --yes ONLY after manual verification
python3 initiate_audit.py --auto --yes
Privacy-First Mode:
export AGENTSHIELD_NO_AUTO_DETECT=1
python initiate_audit.py --name "MyBot" --platform "telegram"
β Zero file reads, manual input onlySee PRIVACY.md for complete data handling documentation.