Agent Network Protocol (ANP)
Type: full-code · Vendor: Agent Network Protocol · Language: Python, TypeScript · License: MIT · Status: active · Status in practice: experimental
Open specification (and reference implementation) for decentralised agent-to-agent communication: cross-platform DID identity, dynamic protocol negotiation, and an application-layer description / discovery protocol so agents from different vendors can talk without a central broker.
Description. Agent Network Protocol (ANP) is an open communication protocol for intelligent agents, positioned by its authors as 'the HTTP of the Agentic Web era'. It defines a three-layer architecture: an Identity and Secure Communication Layer based on W3C DID (with the did:wba method) for cross-platform identity and end-to-end encrypted channels; a Meta-Protocol Layer that lets agents negotiate the actual wire protocol in natural language and then run AI-generated code over it; and an Application Protocol Layer with the Agent Description Protocol (ADP) and an agent discovery protocol. The reference Python SDK lives in the AgentConnect repo.
Agent loop shape. Network-protocol layer rather than a single agent loop. Each participating agent embeds an ANP client. Step 1: identity / handshake — the client signs the first HTTP request with its DID key; the peer fetches the DID document and verifies the signature, returning a token for subsequent calls. Step 2: meta-protocol negotiation in natural language to agree the wire protocol (or reuse a cached one). Step 3: discovery via ADP description documents and the discovery protocol. Step 4: application-layer message exchange over the negotiated protocol, tagged with a 2-bit Protocol Type (meta / application / natural-language / verification).
Primary use cases
- cross-organisation agent-to-agent communication without a central broker
- decentralised agent identity (W3C DID / did:wba) and end-to-end encrypted channels
- agent capability description (ADP) and peer discovery
- interop between heterogeneous agent runtimes / vendors
- research on self-organising, self-negotiating agent networks
Key concepts
- Three-layer protocol architecture (docs) — Identity & Secure Communication Layer + Meta-Protocol Layer + Application Protocol Layer — the spec's top-level structure separating trust, negotiation, and capability description.
- W3C DID (did:wba method) → decentralized-agent-network (docs) — Decentralised identifiers and DID documents give each agent a cross-platform identity; ANP's did:wba method extends did:web for agent communication so peers can verify each other without a central authority.
- Agent Description Protocol (ADP) → inter-agent-communication (docs) — Application-layer protocol by which an agent publishes a structured description document declaring its capabilities and supported application protocols.
- Agent Discovery Protocol → decentralized-agent-network (docs) — Mechanism for one agent to locate peers and fetch their ADP description documents — the discovery surface for an open agent network.
- Meta-protocol negotiation (docs) — Two agents negotiate the actual wire protocol in natural language, then generate code to handle it; cached negotiation results can be reused on subsequent calls.
- Protocol Type (PT) header → performative-message (docs) — 2-bit field at the head of every decrypted ANP message labelling the speech-act category: 00 meta protocol, 01 application protocol, 10 natural language protocol, 11 verification protocol.
- End-to-end encrypted channel (ECDHE) (docs) — Each agent's DID key pair is used both for authentication and for an ECDHE-based end-to-end encryption scheme, so intermediate forwarders cannot decrypt traffic.
Patterns this full-code implements —
- ·Decentralized Agent Network
ANP's whole purpose is a decentralised agent network: W3C-DID-based mutual identity verification without a central authority, and the explicit goal of an 'open, secure, and efficient collaboration ne…
- ★Inter-Agent Communication
ANP exists to make heterogeneous agents talk: the README's 'Why We Need ANP' section frames interconnection, native interfaces, and efficient collaboration as the three problems the protocol solves,…
- ★★Performative Message
Every ANP message carries a 2-bit Protocol Type (PT) in its binary header that labels the speech-act category of the payload — meta-protocol, application-protocol, natural-language, or verification —…