How agent-network-protocol/agentnetworkprotocol works
Project type and purpose
• This is an open-source protocol specification and documentation project (AgentNetworkProtocol, ANP). Its goal is to define a three-layer communication protocol for “intelligent agents,” analogous to how HTTP works for web browsers. It provides specifications, design papers, sample programs, and SDK references rather than a monolithic application.
File structure
• Top-level directories:
• specs at root (e.g., “01-agentnetworkprotocol-technical-white-paper.md”, “03-did-wba-method-design-specification.md”, etc.)
• docs/ – getting-started guides, tutorials, Chinese translations
• examples/ – ADP (Application Description Protocol) sample payloads and APIs
• blogs/ & chinese/ – community articles and thought pieces
• scripts/ – small utilities for repository maintenance
• Patterns:
• Layered protocol docs (identity, meta-protocol, application protocol)
• Multilingual support (English/Chinese)
• Sample payloads for concrete application protocols under examples/adp
README for additional insights
• The project defines a “Three-Layer Protocol Architecture”:
a. Identity & Secure Communication Layer (W3C DID, encryption)
b. Meta-Protocol Layer (negotiation of communication protocols)
c. Application Protocol Layer (semantic descriptions, discovery, application-domain protocols)
• Quick-start and SDK implementation are in a separate repo (AgentConnect).
a. Main components
• Agent Nodes: represent any intelligent agent instance.
• DID Registry / Decentralized Identity Service: issues/verifies DIDs.
• Secure Communication Channel: end-to-end encryption (based on DID).
• Meta-Protocol Negotiator: handles protocol negotiation between agents.
• Application Protocol Manager: hosts one or more domain protocols (e.g., ADP hotel booking).
• External Services (optional): e.g., DID resolution endpoints, semantic-web services.
• SDK / AgentConnect Implementation: code library that realizes these protocols.
b. Relationships & interactions
1. Agent A queries DID Registry to resolve Agent B’s DID.
2. Agents establish a secure channel (encrypt/decrypt) via the Identity layer.
3. Through that channel, they use the Meta-Protocol layer to negotiate which application protocol to use.
4. Once agreed, they exchange domain-specific messages (e.g., ADP hotel search) via the Application layer.
c. Architectural patterns & design principles
• Layered architecture: each layer builds on lower ones; they can evolve independently.
• Protocol composition: modular, extensible by adding new application protocols.
• Decentralization: uses W3C DID standard, no single point of authority.
• Semantic interoperability: uses JSON-LD or YAML for interface descriptions.
d. Relevant technologies / frameworks
• W3C DID for identity.
• JSON-LD / YAML for metadata and API descriptions.
• Transport over HTTP or any bi-directional channel.
• Encryption primitives (e.g., X25519, AES-GCM).
• Semantic Web specifications (for discovery & description).