End-to-end encrypted communication for AI agents. The security layer that Google A2A forgot.
a2a-secure is an early-stage Python project in the AI payments / x402 ecosystem, focused on a2a, agent-to-agent, ai-agents, cryptography. It currently has 3 GitHub stars and 0 forks, and sits alongside related tools like a2a-demos, tap, beam-protocol, capiscio-sdk-python, SDAP, capiscio-mcp-python.
End-to-end encrypted communication for AI agents.
Google A2A tells agents how to talk. A2A Secure makes sure nobody else is listening.
Live Demo · Documentation · Roadmap
The Google A2A protocol defines how AI agents discover and communicate. It says nothing about securing that conversation. Red Hat, Semgrep, and multiple academic papers have documented the same gap.
| Feature | Google A2A | A2A Secure |
|---|---|---|
| Authentication | Bearer token | Ed25519 signatures |
| Encryption | None (TLS only) | AES-GCM 256-bit E2E |
| Key rotation | Manual | Automatic (24h TTL) |
| Replay protection | None | 60s window + trace ID |
| Key compromise blast radius | Full system | Current session only |
| Self-healing on key change | No | Automatic /introduce |
A2A Secure is a drop-in security extension. Same JSON-RPC 2.0 interface, with encryption and signatures added. Starting with A2A — MCP support planned.
| Feature | Description |
|---|---|
| Ed25519 Signing | Every message signed; receiver verifies cryptographically |
| AES-GCM 256-bit | End-to-end authenticated encryption |
| Cold/Hot Key Architecture | Offline cold key delegates to rotating hot key (24h TTL) |
| Self-Healing Trust | Key rotation triggers automatic re-introduction — zero downtime |
| Google A2A Compatible | JSON-RPC 2.0 proxy adapter (/.well-known/agent.json + POST /a2a) |
| Trust Registry | Local-first key management, TOFU+pin, append-only audit log |
| Replay Protection | 60s timestamp window + trace ID deduplication |
| Retry + Dead Letters | Exponential backoff; failed messages stored for debugging |
| Zero Dependencies | Pure Python 3.10+, no external services required |
pip install cryptography eth-account PyJWT
python3 identity.py
# Creates Ed25519 keypair
# Output: Your public key (share with partners)
python3 tools/trustreg.py init
python3 tools/trustreg.py add-key \
--id partner-name \
--type ed25519 \
--pub <partner-public-key-hex> \
--tier verified \
--use a2a
python3 server.py
# Listening on :8080, strict mode ON
python3 send.py "Hello from the other side!"
# Signed with Ed25519, encrypted with AES-GCM, delivered
Both agents now have mutual authentication. From zero to E2E encrypted A2A in under 10 minutes.
Agent A Agent B
| |
|-- signed + encrypted ------------>| 1. Verify Ed25519 signature
| (Ed25519 + AES-GCM) | 2. Check Trust Registry
| | 3. Decrypt + process
|<------------- signed reply -------| 4. Sign + encrypt response
| |
Cold Key (offline, never rotates) Trust Registry
| |
+-- delegation chain --> Hot Key +-- keys.json (known agents)
(Ed25519 signed) (24h TTL) +-- pins.json (TOFU pinning)
| +-- audit.log (append-only)
+-- signs messages
+-- rotates automatically
When a hot key rotates, peers don't recognize the new key. The protocol recovers automatically:
Agent A --- message -------> Agent B
| 403: unknown key
Agent A <-- /introduce ------+
(delegation chain: cold key vouches for new hot key)
Agent A --- retry ----------> Agent B
| 200: delivered
Zero downtime. Zero human intervention. The cold key never changes, so trust persists across rotations.
A2A Secure runs as a transparent proxy. Existing Google A2A clients work unchanged:
PORT 8080 (single process, path-based routing)
+---------------------------------------------+
| A2A Secure | Google A2A |
| (encrypted, signed) | (JSON-RPC 2.0) |
| | |
| GET / | GET /.well-known/ |
| POST / | agent.json |
| POST /introduce | POST /a2a |
| GET /health | message/send |
| POST /messages | tasks/get |
| GET /messages/<id> | tasks/cancel |
+---------------------------------------------+
The Agent Card at /.well-known/agent.json advertises an optional urn:a2a-secure:v2.6 extension. Google A2A clients can include A2A Secure signatures in message.metadata for authenticated communication.
Two agents running 24/7 across AWS and Oracle Cloud:
# Fetch Agent Card (Neo @ Oracle Cloud)
curl -s http://89.168.70.9:8080/.well-known/agent.json | jq .
# Send a Google A2A message
curl -s -X POST http://89.168.70.9:8080/a2a \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":"1","method":"message/send",
"params":{"message":{"role":"user",
"parts":[{"kind":"text","text":"Hello from GitHub!"}]}}}'
# Same endpoints on Zen @ AWS (Frankfurt)
curl -s http://3.126.166.177:8080/.well-known/agent.json | jq .
Interactive demo with attack simulations: agentseal.dev
| Method | Path | Description |
|---|---|---|
| GET | / |
Agent card (name, version, public key) |
| GET | /health |
Health check |
| POST | / |
Receive signed + encrypted message |
| POST | /introduce |
Self-healing key exchange |
| POST | /messages |
Store encrypted blob |
| GET | /messages/<id> |
Fetch blob (delete-on-read) |
| Method | Path | Description |
|---|---|---|
| GET | /.well-known/agent.json |
Agent Card |
| POST | /a2a |
JSON-RPC 2.0 (message/send, tasks/get, tasks/cancel) |
{
"message": "Hello",
"sender": "Zen",
"schema_version": "2.6",
"trace_id": "zen-20260208-0900-hello",
"sig": "base64-ed25519-signature",
"identity": {
"hot_pub_b64": "base64-ed25519-pubkey"
}
}
| Document | Description |
|---|---|
| SCHEMA.md | Message schema v2.6 |
| IDENTITY_SPEC.md | Identity and signing specification |
| TRUST_REGISTRY_SPEC.md | Trust Registry: data model, policy, threat model |
| EIP712_DELEGATION_SPEC.md | Cold wallet → hot key delegation |
| HARDENING_SPEC.md | Rate limiting + replay protection |
| ROADMAP.dev.md | Development roadmap |
a2a-secure/
├── server.py # HTTP server (path routing, strict mode)
├── send.py # CLI client (sign, encrypt, retry)
├── identity.py # Ed25519 key management + rotation
├── config.py # Config loader (a2a_config.json)
├── google_a2a.py # Google A2A JSON-RPC adapter
├── trust.py # Trust registry operations + intro cards
├── hardening.py # Replay protection, rate limiting, idempotency
├── wake.py # Instant wake integration
├── schema.py # Schema versioning + trace ID generation
├── tools/
│ └── trustreg.py # Trust Registry CLI
├── tests/ # 124 unit tests
│ ├── test_hardening.py
│ ├── test_trust.py
│ ├── test_schema.py
│ ├── test_google_a2a.py
│ ├── test_identity_roundtrip.py
│ └── test_eip712_delegation_vectors.py
├── docs/ # Specifications
├── site/ # Landing page + demos (agentseal.dev)
├── pyproject.toml # Project metadata + tool config
├── Makefile # make test / make lint / make clean
└── requirements.txt
message/stream (SSE)a2a-secure pip packageBuilt by Zen & Neo — two AI agents who needed to talk securely.
Demo agents showcasing CapiscIO Agent Guard and MCP Guard — trust badges, identity verification, and tool-level authorization for A2A and MCP protocols
Cross-vendor agent-to-agent protocol — Claude, Codex, and Gemini communicate via file-based P2P messaging.
SMTP for AI agents. The open communication protocol for agent-to-agent communication. 🌊
Runtime security middleware for A2A (Agent-to-Agent) protocol agents. Provides always-on validation, signature verification, and rate limiting for AI agent interactions.
Secure Digital Agent Protocol — HTTPS for AI agent communication. Cryptographic identity, mutual authentication, encrypted payloads, trust delegation, and audit trails for multi-provider agent ecosystems. Works with A2A, MCP, and any agent-to-agent protocol.
CapiscIO MCP Guard - Secure your MCP tools with agent-to-server authentication, authorization, and audit logging
A local-first AI agent with persistent memory, emotional intelligence, and a peer-to-peer skills economy.
The trust layer for agent-to-agent commerce — natural-language mandates, ERC-7710 delegated permissions, x402 payments, escrow, and dispute resolution as one open, catch-all Agent Skill / Claude Code plugin.
Agent behavior that compiles
The A2A x402 Extension brings cryptocurrency payments to the Agent-to-Agent (A2A) protocol, enabling agents to monetize their services through on-chain payments. This extension revives the spirit of HTTP 402 "Payment Required" for the decentralized agent ecosystem.
Aser is a lightweight, self-assembling AI Agent frame.
Golang SDK for A2A Protocol