What Is the A2A Protocol, and How Does It Work?
The A2A protocol lets AI agents from different vendors exchange tasks and results. This guide explains agent cards, messages, tasks and when A2A fits.
On this page
Short answer
The A2A protocol, short for Agent2Agent, is an open protocol that lets AI agents built by different teams or vendors work together. One agent sends a task to another, the other agent works on it and returns a result, and both sides use a shared format for messages, state and artifacts. It was designed so agents do not need a shared codebase to cooperate.
What is the A2A protocol?
The A2A protocol is an open standard for communication between AI agents. It defines how one agent finds another, sends it a task, follows the progress and receives the result, using common web standards such as HTTP and JSON-RPC.
Before protocols like A2A, agents from different vendors could not easily work together. Each agent spoke its own format, so connecting two agents meant writing custom glue code for every pair. A2A replaces that glue with one shared format.
| Part | What it is | What it does |
|---|---|---|
| Agent card | A public description of an agent | Says what the agent can do and how to reach it |
| Task | A unit of work sent to an agent | Tracks the job from start to finish |
| Message | A turn in the conversation | Carries text, data or instructions |
| Artifact | A result the agent produces | Returns files, data or a completed answer |
| Push notification | An update sent while work runs | Tells the caller when a task changes state |
The protocol does not decide how an agent thinks or which model it uses. It only standardises the conversation between agents, so a planning agent from one vendor can hand a task to a research agent from another and get a usable result back.
How does an A2A exchange work?
An A2A exchange follows a simple pattern: find the agent, send the task, follow its progress and collect the result. Each step uses the same message format, so any agent that speaks A2A can take part.
- Discover the agent. The calling agent reads the other agent's agent card to learn what it can do and where it lives.
- Send a task. The caller sends a task with the goal, the input data and any limits on time or cost.
- Receive updates. The working agent sends messages and artifacts as it goes, or the caller polls for progress.
- Collect the result. When the task finishes, the agent returns its artifacts and a final state, such as completed or failed.
- Handle failure. If the task fails, the error is reported in the same format, so the caller can retry or try another agent.
Because the exchange is built on HTTP, it works across organisations and clouds. An agent in your system can call an agent in a partner's system without either side sharing its code or its model. See MCP vs A2A for how this compares with the model context protocol.
A2A vs MCP: what is the difference?
A2A and MCP solve different problems, and they are often used together. A2A connects agents to each other, while MCP connects an agent to tools and data. Mixing them up leads to the wrong architecture.
| Question | A2A | MCP |
|---|---|---|
| What does it connect? | Agent to agent | Agent to tools and data |
| What is exchanged? | Tasks, messages, artifacts | Tool calls and context |
| Who is on each side? | Two agents | One agent and one server |
| Typical use | Handing work between agents | Giving an agent access to a database or API |
| Do you need both? | Often, yes | Often, yes |
A typical setup uses MCP for the agent's tools and A2A for the conversation between agents. One agent might use MCP to read a CRM, then use A2A to hand the result to a second agent that drafts the reply. For the tool side, what is an MCP server explains the other half of the picture.
When does A2A make sense?
A2A makes sense when work crosses team or vendor boundaries. If one team owns the planning agent and another owns the research agent, A2A lets them cooperate without either team rewriting its code.
Good fits include multi-vendor agent systems, partner integrations, and products where agents from different companies must share a workflow. It also fits when agents need to be swapped: if one agent is replaced, the others keep working because the format stays the same.
A2A is less useful when a single team owns all the agents and they share a codebase. In that case, direct function calls are simpler and faster. The protocol pays off when the boundary between agents is also a boundary between teams, vendors or organisations.
What do you need to build with A2A?
Building with A2A starts with the agent card, because that is how other agents find and trust your agent. A clear card states what the agent does, what input it needs and what it returns.
The pieces you need:
- An agent card. A public description of skills, endpoints and authentication.
- A task handler. Code that receives tasks, runs them and returns artifacts.
- Authentication. A way to check who is calling, such as API keys or tokens.
- State tracking. A record of each task's state, so callers can follow progress and retry.
- Logging. A trace of tasks, messages and results for debugging and audit.
Keep the agent's scope narrow. An agent that does one job well is easier to describe, test and replace than an agent that tries to do everything. For the wider design, multi-agent systems covers how several agents are organised into one product.
Example (hypothetical): two agents booking a trip
Example (hypothetical): a travel company runs a planning agent and a booking agent built by different teams. A customer asks for a three-day trip with flights and a hotel, and the planning agent must work with the booking agent to finish it.
The planning agent reads the booking agent's agent card, sees it handles flights and hotels, and sends a task: find options for two adults, three days, with a budget the customer set. The booking agent returns artifacts: three flight options and four hotels, each with prices.
The arithmetic is simple. Without A2A, the two teams would write custom glue code for this one pair of agents, and a third agent would need a second integration. With A2A, each agent speaks the same format: two agents need one shared format, and adding a third agent costs one more card, not a new integration per pair.
The planning agent then picks the best combination and asks the customer to confirm. If the booking agent fails, the error comes back in the same format, so the planning agent can retry or offer an alternative instead of breaking the whole trip.
What are the common mistakes?
The most common mistakes are treating A2A as a tool protocol, building agents that are too broad, and skipping authentication between agents.
- Confusing A2A with MCP. A2A connects agents; MCP connects agents to tools. Use each for its own job.
- Agents that do too much. A broad agent is hard to describe in a card and hard to replace.
- No authentication between agents. Any agent that can call yours should be checked first.
- Ignoring task state. Long tasks need progress updates, or callers time out and retry.
- No logging of agent conversations. Without traces, a failed multi-agent job is hard to debug.
Start with one pair of agents and one task. Once that exchange is reliable, add more agents one at a time and watch the traces before each new connection.
Key takeaways
- A2A is an open protocol that lets agents from different vendors work together
- Agent cards describe what an agent can do; tasks, messages and artifacts carry the work
- A2A connects agents to each other, while MCP connects agents to tools and data
- A2A pays off across team or vendor boundaries, not inside one codebase
- Keep each agent narrow, authenticate every call and log every task
Frequently asked questions
What does A2A stand for?
A2A stands for Agent2Agent. It is an open protocol that lets AI agents built by different teams or vendors exchange tasks and results using a shared format for messages, state and artifacts.
Is A2A the same as MCP?
No. A2A connects agents to each other, while MCP connects an agent to tools and data such as databases and APIs. The two are often used together: MCP gives an agent its tools, and A2A lets it hand work to another agent.
Who created the A2A protocol?
The A2A protocol was introduced as an open standard for agent communication, with support from several large technology vendors. Because it is open, any team can build an agent that speaks it without paying a licence fee.
Do I need A2A for a single agent?
No. A single agent does not need A2A, because there is no other agent to talk to. A2A becomes useful when two or more agents from different teams or vendors must share a workflow.
How is an agent card used?
An agent card is a public description of what an agent can do, what input it needs and how to reach it. A calling agent reads the card first, so it knows whether the other agent fits the task before sending anything.
Is A2A secure?
A2A itself is a message format, so security comes from how you use it: authenticate every caller, limit what each agent can do, and log every task. Treat each agent as an untrusted caller until it proves otherwise.