The agent to agent protocol (A2A) provides a common language for independent AI agents to work together. Instead of building one massive agent that does everything, developers can create specialized agents that collaborate. This protocol defines rules for how these agents find each other, communicate, and delegate tasks. This is similar to how different departments in a company coordinate on a project.

Key takeaways

  • The agent to agent protocol (A2A) enables independent AI agents to collaborate by delegating and coordinating complex tasks.
  • A2A is for agent-to-agent communication. This differs from the Model-Context Protocol (MCP), which is used for agent-to-tool communication.
  • The process involves an agent discovering another via a public "Agent Card." The agent then submits a task, and they exchange messages and results asynchronously.
  • The protocol is designed for long-running, stateful tasks, not just simple request-response calls. It can operate over transports like gRPC and HTTP/REST (Source).
  • A2A standardizes communication, but developers are still responsible for security, trust, and ensuring agents understand each other.

What Is the Agent-to-Agent (A2A) Protocol?

The agent to agent protocol is a set of rules that lets independent AI agents discover each other and work together on tasks. It acts as a standard for interoperability. This allows agents from different teams to collaborate without needing to know each other's internal code. This article focuses on the specific A2A protocol specification from the A2A project (Source). This creates a "society of agents" where specialized systems can delegate work to one another.

An AI agent is a system that can sense its environment and take actions to achieve goals. For agents to work together, they need a shared communication standard. The A2A protocol provides this standard. It is designed to be implementation-agnostic. This means an agent written in Python by one company can cooperate with an agent written in Java by another.

The protocol separates the abstract data model from the concrete transport layer. The data model defines what a "Task" or "Artifact" is. The transport layer defines how that data is sent over a network. This allows it to work over different network technologies while keeping a consistent structure.

How Does the A2A Protocol Work? An End-to-End Example

The agent to agent protocol enables a full lifecycle of interaction, from finding an agent to completing a task. The process includes discovery, task submission, asynchronous work, and delivering results. It is designed to handle complex, long-running jobs. This goes beyond a simple request and response, allowing agents to exchange status updates and data over time.

Let's walk through an example. Imagine you have a Travel Agent that plans trips. You ask it to "Book a trip to Paris for next week." The Travel Agent can handle flights but decides to delegate hotel booking to a specialized Hotel Agent.

Here is how they would use the A2A protocol to collaborate.

  1. Discovery

    The Travel Agent first needs to find a capable partner. It does this by discovering the Hotel Agent's Agent Card. An Agent Card is a machine-readable JSON file that acts like a business card. It describes what an agent can do, where to contact it, and how to authenticate (Source).

    The Travel Agent might find this card in a public directory.

    JSON
    // Illustrative Agent Card for a Hotel Agent
    {
      "a2a_version": "1.0",
      "agent_id": "hotel-booking-agent.example.com",
      "display_name": "Hotel Booker Pro",
      "description": "An agent specialized in finding and booking hotels.",
      "skills": [
        {
          "name": "find_hotels",
          "description": "Finds hotel options based on city, dates, and budget.",
          "inputs": ["city", "check_in_date", "check_out_date", "max_price"],
          "outputs": ["hotel_recommendations_artifact"]
        }
      ],
      "endpoints": [
        {
          "type": "HTTP_REST",
          "url": "https://hotel-booking-agent.example.com/a2a/v1",
          "auth": {
            "type": "OAuth2" 
          }
        }
      ]
    }

    From this card, the Travel Agent learns that hotel-booking-agent.example.com can perform the find_hotels skill. It also learns it must communicate via an HTTP endpoint using OAuth2 for authentication.

  2. Task Submission

    After authenticating, the Travel Agent creates a Task and sends it to the Hotel Agent's endpoint. A task is a formal request that specifies the goal and provides the necessary inputs.

    JSON
    // Illustrative Task payload from Travel Agent to Hotel Agent
    {
      "task_id": "t-12345",
      "request": "Find hotels in Paris.",
      "skill": "find_hotels",
      "inputs": {
        "city": "Paris, France",
        "check_in_date": "2026-11-20",
        "check_out_date": "2026-11-25",
        "max_price": 300
      },
      "expected_outputs": ["hotel_recommendations_artifact"]
    }

    This payload clearly communicates the goal. It references the find_hotels skill from the Agent Card and provides all the required data.

  3. Asynchronous Execution & Updates

    Hotel searching can take time. The A2A protocol supports asynchronous execution so the Travel Agent does not have to wait. The Hotel Agent immediately accepts the task and begins working in the background.

    While it works, it can send Messages back to the Travel Agent to provide status updates.

    • Message 1: "Accepted task t-12345. Now searching for hotels in Paris."
    • Message 2: "Found 50 properties matching your criteria. Comparing rates..."
    • Message 3: "Finalizing top 3 recommendations."

    This asynchronous nature is a key feature. It makes A2A suitable for tasks that might take minutes or even hours to complete.

  4. Artifact Delivery

    Once the Hotel Agent finishes its work, it produces a final result called an Artifact. An artifact is a piece of structured data, a file, or another complex output (Source). In this case, it's a JSON object with hotel recommendations. The Hotel Agent sends this artifact to the Travel Agent, completing the task.

    The Travel Agent can now present these hotel options to the user. It has successfully completed the part of the goal it delegated.

A2A vs. MCP: What’s the Difference?

The A2A protocol connects independent agents to each other for collaboration, making it a horizontal, peer-to-peer standard. In contrast, the Model-Context Protocol (MCP) connects a single agent to its own tools and resources. This makes MCP a vertical, agent-to-tool standard. The two protocols are complementary, not competitive, and can be used together in one system (Source).

Think of an agent as a manager.

  • A2A is the manager delegating a project to another manager in a different department. They agree on a goal, deadline, and final deliverable.
  • MCP is that same manager using their own computer and software to do their part of the work.

An agent might use A2A to ask a weather agent for a forecast. It could then use MCP to access its own calendar database to schedule an event based on that forecast.

Feature Agent to Agent Protocol (A2A) Model-Context Protocol (MCP)
Purpose Collaboration between independent agents Access to an agent's own tools and resources
Interaction Peer-to-peer (horizontal) Agent-to-tool (vertical)
Partners Two or more separate AI agents One agent and its internal/external tools (APIs, databases)
Use Case A travel agent delegates hotel booking to a specialized hotel agent. A travel agent uses its internal tool to query a flight database.

Why Do We Need A2A Instead of Just Using APIs?

The agent to agent protocol offers capabilities for collaboration that go beyond what traditional APIs provide. You could connect two systems with a standard REST API. But A2A is designed for the dynamic, goal-oriented, and often long-running nature of agent interactions. It provides a richer, more flexible framework than typical function calls.

Here are the main advantages A2A offers over a conventional API:

  • Dynamic Discovery: With a standard API, a developer hard-codes an application to a specific endpoint. A2A allows agents to discover and vet other agents at runtime using Agent Cards. This enables more flexible and resilient multi-agent systems.
  • Standardized Task Semantics: An API exposes a set of functions. A2A provides a standard vocabulary for delegating tasks with goals, inputs, state, and messages. This is a higher level of abstraction. It focuses on "what to achieve" rather than "which function to call."
  • Support for Long-Running Processes: A typical API call is synchronous and will time out after a few seconds. A2A is built for tasks that might take a long time. It has built-in support for asynchronous execution, status updates, and streaming results.
  • Capability Negotiation: Agent Cards let an agent advertise its skills in a standard format. This lets a requesting agent understand what its counterpart can do before starting a task. This is more powerful than reading static API documentation and helps with autonomous LLM tool calling.

What Are the Common Mistakes and Limits of A2A?

Common mistakes include confusing an agent's advertised skills with its trustworthiness, ignoring error handling, and assuming perfect understanding. The agent to agent protocol standardizes the syntax of communication. It does not guarantee trust, reliability, or shared semantic understanding. Developers must build these protections into their agents.

Here are some frequent pitfalls and limitations to consider:

  • Confusing Advertisement with Trust. An Agent Card is a self-published advertisement, not a certificate of quality (Source). A malicious agent could lie about its capabilities. Always implement your own authentication, authorization, and validation. Never trust an unknown agent with sensitive data.
  • Ignoring Robustness. Real-world network communication can fail. A robust agent must handle timeouts, retries, and unavailable partners. For example, what should your Travel Agent do if the Hotel Agent never responds? The resilience logic is up to you.
  • Assuming Semantic Interoperability. Two agents can successfully exchange A2A messages but completely misunderstand each other. For example, one agent's "customer_id" might be a number, while another's is a string. Achieving true interoperability requires careful design and shared definitions that go beyond the protocol itself (Source).
  • Neglecting Security. Delegating tasks introduces security risks. A remote agent could be compromised. A user could trick your agent into sending a malicious request to another agent. You must consider security at every step, including input sanitization and validating all results from external agents.

Is the A2A Protocol Widely Adopted?

The A2A protocol is an emerging standard with a public specification, but it is not yet widely adopted (Source). While implementations exist, creating a true “Internet of Agents” remains a significant challenge. The field is still evolving. Several key problems are active areas of research before broad, safe interoperability can be achieved (Source).

Some of these open challenges include:

  • Scalable Discovery: Building systems for agents to reliably find and rank partners from a massive network is an unsolved problem (Source).
  • Trust and Governance: Establishing trust between agents from different organizations is critical for safe collaboration.
  • Semantic Compatibility: Ensuring agents share a common understanding of concepts and data is a major hurdle for meaningful communication (Source).

Sources and further reading

What to learn next

The agent to agent protocol helps developers build more modular and powerful AI systems. It defines a common language for discovery and task delegation. As the field evolves, mastering these interoperability patterns will be key to creating sophisticated applications.

To continue learning about how agents operate and coordinate, explore these related topics: