An AI skill (for Claude or any other AI coding tool) and a plain guide for developers on building secure agent-to-agent communication between personal AI assistants owned by different people — for example, a friend's assistant asking yours when you're free, or passing a message that you answer with one tap.
It is distilled from a working implementation between two self-hosted assistants, including the problems found in its security reviews.
- The A2A protocol (v1.0, with 0.3 fallback) — a small subset, no SDK needed
- Ed25519 signatures on every request and response instead of bearer tokens, with replay protection
- Pairing by comparing fingerprints out-of-band, and an owner-only address book
- Human approval for every answer and every outbound message
- Containing prompt injection: other agents' text is always untrusted data
- Instant delivery of answers (push to the address-book URL only) with polling as fallback
- AI-suggested replies through an isolated, tool-less drafter with a private-memory filter
- A full threat model, a go-live checklist and a list of tests to write
SKILL.md the skill: design, rules and why
references/signature-scheme.md exact signing spec + test vector
references/protocol.md message shapes, versions, push/polling, limits
references/threat-model.md every risk and its control
references/ai-in-the-loop.md suggested replies and context, safely
references/test-checklist.md tests to write, one or more per protection
scripts/a2a_sign.py reference signer/verifier (Python, `cryptography`)
scripts/a2a-sign.mjs reference signer/verifier (Node.js, built-in crypto)
It works with any AI, or none: the format is a standard SKILL.md skill, but everything in it is plain Markdown
and ordinary Python/Node code. The design doesn't depend on which AI model your assistant uses.
As a Claude skill: copy this folder into your skills directory (e.g. ~/.claude/skills/secure-a2a/).
Claude will use it when you ask to connect your agent with someone else's.
With other AI coding tools (Codex, Cursor, Copilot, …): put the folder in your project, or wherever your tool
loads skills from, and point the assistant at SKILL.md. It links to the other files when they're needed.
As a plain guide: start with SKILL.md (design and rules), then references/ for the details. The scripts in
scripts/ are standalone reference code you can use in any project.
Check interoperability: both sides should pass the same test vector:
python scripts/a2a_sign.py --selftest # pip install cryptography
node scripts/a2a-sign.mjs --selftest
- This repository contains no secrets. The only key in it is a public test key (32 bytes of
0x01) used for the test vector. Never use it for a real agent; generate your own (python scripts/a2a_sign.py --keygen) and keep the private key off GitHub. - The guidance reduces risk; it does not remove it. The human approval step is the last line of defence, and whatever you send to another agent is then governed by their security.
- Review the threat model against your own setup before going live.
MIT — see LICENSE.