Pular para o conteúdo
← Back to Skalablog

Published article

What Is the A2A Protocol for AI Agents? — Part 4

Software EngineeringClaude CodeAnthropic

The A2A Protocol is an open specification for handing a task from one AI agent to another, even when different vendors built them. A client agent discovers a peer through its Agent Card, sends a message, and follows a task through defined states until an artifact comes back.

Part 4 of a series. Start with What is the A2A protocol for AI agents?, then A2A Protocol Explained: How Agents Talk.

Agent-to-agent delegation is finding a peer and following a task

The A2A Protocol is an open specification for one AI agent to delegate work to another agent built by a different vendor. The orchestrating client agent discovers a remote agent through its published Agent Card, sends a message, and tracks a task through defined states until an artifact returns.

The protocol was originally introduced by Google in 2025 and later donated to the Linux Foundation, which now hosts the project. The current specification and SDKs live at a2a-protocol.org, and the specification varies by version, so check the version banner before copying field names into code.

Two roles carry every exchange. The client agent asks for work and holds the task record. The remote agent performs the work and stays opaque: the client learns what it needs through the Agent Card and task updates, not by inspecting how the remote agent is built.

That split is the point. A payroll agent from one vendor and an HR agent from another can cooperate as long as both speak the protocol, without either team exposing internal APIs or agreeing on private Claude Code for each new pairing.

Why custom point-to-point glue breaks at the fourth agent

Custom Claude Code between agent pairs breaks down because every new agent multiplies the number of connections someone must write and maintain. Three agents need three bespoke integrations; adding a fourth means writing that integration three more times, with a separate contract for each pair.

The transcript illustrates this with an onboarding scenario: Priya starts on Monday, and HR, payroll and IT each run an agent from a different vendor. Each agent has its own API, so making them cooperate means building a link per pair, and each link needs its own error handling and retry logic.

ApproachConnections for 4 agentsPer-pair contract
Point-to-point glue6Yes, written twice
Shared protocol4One, versioned

The arithmetic is simple: four agents produce six unordered pairs, while a shared protocol needs each agent to implement one contract once. That scaling difference is the argument for a standard, not a claim that any particular deployment has migrated.

A2A replaces the per-pair glue with a single protocol surface. Any agent that implements it can exchange tasks with any other implementing agent, subject to that agent's advertised skills and any authentication the deployment enforces. Development teams still write the agent logic; what they stop writing is a custom translation layer for each partner.

This is a scoped claim about integration effort, not a prediction that every multi-agent system adopts A2A. Sibling agents inside one framework often share in-process state, and some workflows stay cheaper that way.

The connection-count problem in practice

With three agents the pairwise count is three and the work looks manageable. With five it becomes ten, and at that size the maintenance cost sits in the links rather than the agents. A shared protocol collapses the link count to one per agent, which is why integration-heavy deployments feel the difference first.

Agent Cards are how an agent advertises its skills

An Agent Card is a machine-readable document in which an A2A agent publishes who it is, how to reach it, and which skills it offers. Discovery comes before any work: the client agent reads the card to decide whether this remote agent can handle the request at all.

The card carries identity and endpoint information plus the capabilities the agent supports, such as streaming or push notifications, and a list of skills with descriptions and sample intents. A caller can match a request against those skills before sending a message.

Cards are usually published at a well-known path on the agent's domain, which is what makes automated discovery possible without a central registry. The exact location and fields depend on the specification version, so read the current A2A specification rather than an older tutorial.

In the onboarding example, the orchestrating agent first locates an HR agent whose card advertises employee-record setup. Only then does it compose a message. Payroll and IT follow the same pattern, and each card describes what that agent can accept and return.

Messages, parts and the task lifecycle

A message in A2A is a container made of parts, and each part can hold text, a file or structured data. The remote agent responds to a message by creating a task, which then moves through a defined set of states rather than returning one immediate reply.

Typical task states run from submitted to working to completed, with failed and canceled paths for work that cannot finish. The exact state names and transitions belong to the specification version in use, and the transcript's simplified submitted, working, done sequence reflects the core idea rather than every state.

The important design choice is that the task is the unit of tracking. A long-running payroll setup survives across many messages, and the client can query or subscribe to the same task instead of starting a new conversation each time.

When a task needs more input

Work sometimes stalls because the remote agent lacks information. Payroll cannot finish without Priya's bank details, so it pauses the task in an input-required state and asks the client agent for the missing data.

The client answers on the same task, and the task resumes. This interrupts-and-resumes pattern keeps the interaction tied to one record, so the final artifact belongs to a traceable chain rather than to a separate follow-up exchange.

State names and payload shapes should be read from the specification for the version you target. Treat a code snippet from any tutorial as an example to verify, because field names between major versions can differ.

Streaming and push notifications for slow work

A2A supports two ways to follow long-running work: streaming updates over Server-Sent Events while the client stays connected, and push notifications for work that outlives the connection. Short tasks stream progress live; tasks that wait days rely on a callback.

Server-Sent Events give the client a one-way stream of task updates so it can show progress without polling. A streaming capability has to be advertised in the Agent Card, so the client knows whether to expect a stream or a plain response.

For a laptop order that takes days, the client registers a webhook and the remote agent calls back when the task reaches a conclusion. The client does not need to hold a connection open for the whole wait.

Both paths need operational care. The HTTP/1.1 and Server-Sent Events standards define the transport underneath, including how connections and content negotiation work, and a production deployment still has to handle reconnects, timeouts and duplicate notifications on its own.

Artifacts are what a finished task returns to the client

An artifact is the output of a completed A2A task, returned to the client agent as the concrete result of the delegated work. In the onboarding scenario, an HR record, a payroll setup confirmation and a laptop order come back as three separate artifacts, each owned by the task that produced it.

Artifacts carry content parts, and they can be streamed as the task progresses so the client sees an output take shape rather than waiting for a single final payload. The client can also request updated content for an artifact during a long task.

For the client agent, artifacts are the handoff point between automation and downstream action. The orchestrator can read an HR record artifact and use it to confirm that Priya is ready for Monday, without knowing how the HR agent produced the record.

A2A connects agents, MCP connects agents to tools

A2A and the Model Context Protocol solve different problems: A2A moves a task between agents, while MCP gives an agent access to its own tools and data. Most production systems that use both need each protocol for its own layer.

MCP, introduced by Anthropic 2024, standardizes how a model or agent calls external tools and reads resources. A2A operates one level up, where the agent that owns those tools accepts work from a peer it may not share code with.

ProtocolConnectsTypical use
A2AAgent to agentDelegating an onboarding task to a peer agent
MCPAgent to tools and dataReaching a payroll database or a records API

Keeping the layers separate avoids a common design error. An agent that exposes its internal tools to a peer has confused tool access with delegation, and it has given away the opacity that makes the remote role useful.

The two protocols can be adopted independently. A single-agent application may need only MCP, and an orchestrator may use A2A with peers whose internal tool wiring it never sees.

FAQ

  • What is the A2A Protocol in one sentence? It is an open specification that lets one AI agent delegate a task to another agent built by a different vendor, using Agent Cards for discovery, messages and tasks for the exchange, and artifacts for the result.
  • Who maintains the A2A specification? Google introduced the protocol in 2025 and donated it to the Linux Foundation. The specification, SDKs and versioned documentation are published at a2a-protocol.org.
  • Does A2A replace MCP? No. A2A handles agent-to-agent delegation, while the Model Context Protocol handles an agent's access to its own tools and data. Many systems use both protocols at different layers.
  • How does an agent find another agent to delegate work to? Each A2A agent publishes an Agent Card describing its identity, endpoint, capabilities and skills. A client agent reads that card to judge whether the remote agent can handle the request before sending anything.
  • What happens when a task needs more information? The remote agent moves the task into an input-required state and asks the client for the missing data. The client answers on the same task, and the task resumes without a new conversation.

Source video