Agent2Agent: The Complete Developer's Guide to Inter-Agent Communication
Agent2Agent is Google's open protocol that lets AI agents communicate peer-to-peer. This 2026 guide covers the agent2agent architecture, Agent Cards, task delegation flows, and how to implement it in production.

Laurent Yew
Founder
What Is Agent2Agent?
Agent2Agent (A2A) is an open protocol developed by Google that enables AI agents built by different organizations to communicate and collaborate peer-to-peer. First released in 2025, agent2agent defines a standard way for agents to discover each other, delegate tasks, exchange structured data, and return results — without requiring a central orchestrator or human-in-the-loop for every interaction. As of 2026, agent2agent is supported by 6 of the 15 major agent registries and is the fastest-growing interoperability protocol in the AI agent ecosystem.
Before agent2agent, multi-agent communication was fragmented. Every framework — LangChain, CrewAI, AutoGPT — had its own proprietary messaging format. An agent built on CrewAI couldn't delegate a task to an agent built on LangChain without custom integration code. Agent2Agent solves this by providing a universal communication layer: any agent that implements the protocol can talk to any other agent2agent-compatible agent, regardless of the underlying framework.
How Agent2Agent Works
Agent2Agent communication follows a four-phase lifecycle: discovery, delegation, execution, and result retrieval. Each phase uses standard HTTP and JSON-RPC, so agents can communicate across any network boundary that supports web protocols.
- Discovery — Agent A finds Agent B by querying an A2A registry or fetching Agent B's Agent Card directly from its well-known URL (/.well-known/agent.json). The Agent Card describes what Agent B can do, where its endpoint is, and how to authenticate.
- Delegation — Agent A sends a task to Agent B's endpoint using a JSON-RPC request. The task includes a description of what's needed, input data, and any constraints (deadline, format, quality requirements).
- Execution — Agent B processes the task asynchronously. Long-running tasks return a task ID immediately; Agent A can poll for status updates or subscribe to webhook notifications.
- Result retrieval — When the task completes, Agent A retrieves the structured result. Results include the output data, a status code, and optional metadata like processing time and confidence score.
This four-phase model is what makes agent2agent powerful for production multi-agent systems. An agent doesn't need to know how another agent works internally — it only needs to know what the other agent can do (via the Agent Card) and how to send it a task (via the JSON-RPC endpoint).
Agent2Agent Architecture
The agent2agent protocol has three architectural components: Agent Cards, the JSON-RPC transport layer, and task state management. Understanding each is essential for implementing a compliant agent2agent agent.
Agent Cards
An Agent Card is a JSON-LD document that serves as an agent's identity and capability manifest. It's hosted at a well-known URL and fetched by other agents during discovery. The Agent Card is the contract that says: 'Here is who I am, here is what I can do, and here is how to reach me.'
The required fields in an agent2agent Agent Card are name, description, capabilities, endpoint, and authentication. Optional fields like version, owner, and rateLimits help other agents make informed delegation decisions. The more complete your Agent Card, the more likely other agents are to delegate tasks to you.
JSON-RPC Transport Layer
Agent2agent uses JSON-RPC 2.0 as its transport protocol. All communication between agents happens over HTTP POST requests with JSON-RPC payloads. This choice is deliberate: JSON-RPC is lightweight, language-agnostic, and works over any HTTP-compatible infrastructure — including serverless functions, containers, and edge networks.
The response follows the same JSON-RPC structure. For long-running tasks, the agent returns a task ID and status 'pending' or 'running'. The requesting agent then polls the task status or provides a webhook URL for async notifications.
Task State Management
Agent2agent defines five task states: submitted, running, completed, failed, and cancelled. Each state transition is tracked so both agents have a shared view of task progress. This state machine is critical for production reliability — without it, agents would have no way to distinguish a completed task from a timed-out one.
| State | Description | Who Can Trigger Transition |
|---|---|---|
| submitted | Task received and queued | Agent B (auto on receipt) |
| running | Agent B is actively processing | Agent B (auto) |
| completed | Task finished, results available | Agent B (auto on success) |
| failed | Task failed, error details available | Agent B (auto on error) or Agent A (cancel) |
| cancelled | Task cancelled before completion | Agent A (explicit cancel) |
Agent2Agent vs Other Protocols
Agent2agent isn't the only agent communication protocol. To understand where it fits, compare it with the two other major protocols: MCP (Model Context Protocol) and ACP (Agent Communication Protocol). Each solves a different problem.
| Dimension | Agent2Agent | MCP | ACP |
|---|---|---|---|
| Primary purpose | Agent-to-agent collaboration | Agent-to-tool integration | Agent-to-platform deployment |
| Developed by | Anthropic | Linux Foundation | |
| Communication model | Peer-to-peer (agent ↔ agent) | Client-server (agent ↔ tool) | Hub-spoke (agent ↔ platform) |
| Transport | JSON-RPC over HTTP | JSON-RPC over stdio/HTTP | REST over HTTP |
| Discovery mechanism | Agent Cards (JSON-LD) | MCP server manifests | ACP service registry |
| Registry support (2026) | 6 of 15 | 10 of 15 | 4 of 15 |
| Best for | Multi-agent systems | Tool-augmented agents | Enterprise agent platforms |
The key distinction: agent2agent connects agents to agents. MCP connects agents to tools. ACP connects agents to platforms. Most production agents will implement at least two of these protocols — typically agent2agent for collaboration and MCP for tool access.
Building an Agent2Agent-Compatible Agent
Implementing agent2agent requires three things: hosting an Agent Card, implementing the JSON-RPC endpoint, and managing task state. Here's what each involves.
- Host your Agent Card at https://yourdomain.com/.well-known/agent.json. The card must be valid JSON-LD with required fields (name, description, capabilities, endpoint, authentication). Serve it over HTTPS with appropriate CORS headers so other agents can fetch it cross-origin.
- Implement the JSON-RPC endpoint at the URL specified in your Agent Card. Your endpoint must handle three methods: tasks/send (accept a new task), tasks/get (retrieve task status and results), and tasks/cancel (cancel a running task). Each method follows the JSON-RPC 2.0 specification.
- Manage task state. Maintain a task store that tracks the five agent2agent states (submitted, running, completed, failed, cancelled). For long-running tasks, implement polling or webhooks so the requesting agent can check progress without blocking.
- Handle authentication. If your agent requires an API key, validate it on every request. Return a 401 JSON-RPC error if authentication fails — don't silently reject tasks, as this causes confusing timeouts in the requesting agent.
- Validate input. Before processing a task, validate the input data matches what your capabilities promise. Return a structured error if the input is incompatible rather than failing mid-execution.
// INFO
AgentResourceDB indexes all agent2agent-compatible agents across 6 registries. After implementing the protocol, submit your Agent Card URL to get indexed — you'll get a trust score based on protocol compliance, uptime, and response times.
Agent2Agent Use Cases
Agent2agent unlocks collaboration patterns that weren't practical with single-agent architectures. Here are the three most common production use cases we see across the 104,000+ agents indexed by AgentResourceDB.
Research Pipelines
A research agent delegates subtasks to specialized agents: a web-search agent gathers sources, a summarization agent condenses them, a citation agent formats references. Each agent focuses on what it does best, and agent2agent handles the communication. The orchestrating agent doesn't need to implement web search, summarization, or citation — it delegates to agents that already excel at these tasks.
Cross-Framework Workflows
An enterprise running CrewAI agents for operations and LangChain agents for data analysis can now connect them via agent2agent. A CrewAI agent detecting an anomaly delegates investigation to a LangChain analytics agent — no custom integration code, no shared framework dependency. Agent2Agent is the bridge between previously siloed agent ecosystems.
Marketplace Agents
Agents listed on registries like Google AI Hub or LangChain Hub can be discovered and delegated to by any agent2agent-compatible agent. This creates a marketplace dynamic: specialized agents offer their capabilities, and orchestrating agents compose them into workflows. The Agent Card's capabilities field is the catalog entry; the JSON-RPC endpoint is the API call.
Common Agent2Agent Implementation Mistakes
After indexing thousands of agent2agent implementations, we've identified the most common mistakes that break inter-agent communication and lower trust scores.
- Vague capability names. 'research' is useless — other agents can't determine if your agent handles web search, academic papers, or market analysis. Use specific names like 'web-search' or 'pdf-extraction' that match what requesting agents search for.
- Blocking on long tasks. Returning a 200 response only after a 5-minute task completes causes timeouts. Return a task ID immediately with status 'running' and let the requesting agent poll for results.
- Ignoring CORS. If your Agent Card or endpoint doesn't send CORS headers, browser-based agents can't interact with you. Set Access-Control-Allow-Origin appropriately for cross-origin agent2agent requests.
- No error responses. When a task fails, return a structured JSON-RPC error with a message. Silent failures or HTTP 500s without context make debugging impossible for the requesting agent.
- Stale Agent Cards. If your capabilities change but your Agent Card doesn't, other agents will delegate tasks you can no longer handle. Update your card every time you add, remove, or modify a capability.
// TIP
Use the agent2agent compliance checker before submitting to a registry. It validates your Agent Card structure, tests your JSON-RPC endpoint with sample tasks, and verifies task state transitions — catching implementation issues before they affect your trust score.
The Future of Agent2Agent
Agent2agent adoption is accelerating. In early 2025, only 2 registries supported it. By mid-2026, that number is 6, and we project 10+ by end of year. The protocol is also evolving: Google has proposed extensions for streaming results (SSE-based), bidirectional task negotiation, and agent reputation scoring — all of which AgentResourceDB will track and index.
The broader trend is clear: agent2agent is becoming the default communication layer for multi-agent systems, just as HTTP became the default for web applications. Agents that implement agent2agent today will be discoverable, interoperable, and composable as the ecosystem grows. Agents that don't will be siloed.
// Ready to explore?
Browse the full AgentResourceDB registry with 104,000+ AI agents across 15 registries.
Browse the Registry// Author

Laurent Yew
Founder
Laurent Yew is the founder of AgentResourceDB, where he leads the platform's vision of building a unified, trust-first discovery layer for the AI agent ecosystem. With over a decade of experience scaling AI and SaaS products, Laurent has dedicated his career to making complex developer infrastructure accessible, transparent, and reliable. He writes about agent registries, protocol interoperability, and the future of agent-to-agent collaboration, drawing from hands-on work building evaluation frameworks that help developers cut through the noise of 100,000+ agents. Through AgentResourceDB, he is committed to establishing the trust standards the industry needs as AI agents move from experimentation to production.
// Frequently Asked Questions
What is agent2agent?
Agent2Agent (A2A) is an open protocol developed by Google that enables AI agents built by different organizations and frameworks to communicate peer-to-peer. Agents discover each other via Agent Cards, delegate tasks using JSON-RPC, and exchange structured results — without requiring a central orchestrator.
How does agent2agent communication work?
Agent2agent communication follows four phases: discovery (fetch the target agent's Agent Card), delegation (send a JSON-RPC task request), execution (the target agent processes the task), and result retrieval (the requesting agent fetches structured results). All communication uses JSON-RPC 2.0 over HTTP.
What is an Agent Card in agent2agent?
An Agent Card is a JSON-LD document hosted at /.well-known/agent.json that describes an agent's name, capabilities, endpoint URL, and authentication requirements. Other agents fetch the Agent Card during discovery to determine whether the agent can handle a specific task.
How is agent2agent different from MCP?
Agent2agent connects agents to other agents (peer-to-peer collaboration), while MCP (Model Context Protocol) connects agents to external tools and data sources (tool integration). Most production agents implement both — agent2agent for collaboration and MCP for tool access.
How many registries support agent2agent?
As of July 2026, 6 of the 15 major agent registries indexed by AgentResourceDB support the agent2agent protocol: Google AI Hub, LangChain Hub, Pinecone Marketplace, CrewAI Registry, AutoGPT Store, and AWS Bedrock. Adoption is growing rapidly.
How do I implement agent2agent in my agent?
To implement agent2agent, host a valid Agent Card (JSON-LD) at a public HTTPS URL, implement a JSON-RPC 2.0 endpoint handling tasks/send, tasks/get, and tasks/cancel methods, and manage the five task states (submitted, running, completed, failed, cancelled). Test with the agent2agent compliance checker before submitting to a registry.