A2A agents are AI agents that communicate over the Agent2Agent (A2A) protocol. Each one publishes an Agent Card describing its skills and endpoints, accepts tasks from other agents over HTTP, and returns results as artifacts without exposing its model, prompts or tools. An A2A agent can act as a client that delegates work, a remote agent that does the work, or both.
Google announced A2A in April 2025 with more than 50 partners, and the specification reached v1.0 in March 2026 under the Linux Foundation. Frameworks such as LangGraph, CrewAI and Google's Agent Development Kit (ADK) now expose agents over A2A. The A2A protocol page covers the wire format; this one covers the agents: their roles, what they publish, how they are built and how they trust each other. Bifrost, the open-source AI gateway, sits between A2A agents to control who can call each one.
How agent-to-agent communication works in A2A
Agent-to-agent communication in A2A is a client-server exchange over HTTPS. A client agent reads a remote agent's Agent Card, sends it a message, and gets back a direct reply or a task that it follows until artifacts arrive. Neither sees the other's memory, prompts or tools.
A2A runs on existing web standards: HTTP(S), JSON-RPC 2.0, gRPC, and server-sent events (SSE) for streaming. It is often called a universal translator for agents, but it translates nothing; it fixes the envelope, the discovery document and the task lifecycle.
Inside a remote agent, the official SDKs split an A2A request across four parts: a request handler that parses each operation, an agent executor that holds the agent's own logic, an event queue that carries status and artifact events out, and a task store that keeps task state between calls.

Figure 1: The protocol ends at the request handler; everything behind it is the agent's own code, which the client never sees.
The client chooses how to follow the work: poll with GetTask, hold an SSE stream open, or register a webhook for push notifications.
A2A agent roles: client agent, remote agent and orchestrator
An A2A agent plays one of two protocol roles on each connection: A2A client (the client agent) or A2A server (the remote agent). The specification adds a third actor, the user, who starts the request. An orchestrator is an agent that plays both roles at once, serving its own caller while delegating to others.
| Role | What it does | What it must implement |
|---|---|---|
| User | A person or service that sets the goal | Nothing in A2A |
| A2A client (client agent) | Discovers remote agents, sends messages, follows tasks | Card parsing, credentials, one binding |
| A2A server (remote agent) | Accepts messages, runs the work, returns artifacts | An Agent Card, the A2A operations, task state |
| Orchestrator | Receives a task, then splits it across remote agents | Both sides, plus routing by skill |
The remote agent is opaque by design: a client sees declared skills, task states and artifacts, nothing more. That is why identity, authorization and audit sit outside the protocol, in each agent or in an agent gateway in front of them.
What an A2A agent publishes: Agent Card, skills and extensions
An A2A Agent Card is the JSON document an A2A agent publishes to describe itself: its name, description, version, skills, the interfaces where it accepts requests, its capabilities and the authentication it requires. Version 1.0 makes eight fields required, and clients usually fetch the card from /.well-known/agent-card.json.
Each skill has a required ID, name, description and tags, but no input schema: the remote agent interprets whatever text, files or data it receives. An MCP tool, by contrast, declares a JSON Schema for its arguments, as A2A vs MCP explains. Skills meant only for authenticated callers go in an extended card, fetched with GetExtendedAgentCard. The A2A agent card guide shows full examples.
Extensions add behavior the core protocol does not define. An agent lists them in the card's extensions array, each with a uri, optional params and a required flag, and a client activates them with the A2A-Extensions header. The A2A specification describes four kinds: data-only, profile, method (new RPC methods) and state machine (new task states). Data-only extensions should never be marked required.
A2A tasks, messages and artifacts explained
A2A agents exchange five objects. Messages carry each turn, parts hold the content, a task tracks the work, artifacts hold the results, and a context ID groups related tasks into one conversation. A remote agent decides whether a request gets a direct message reply or a task.
| Object | Created by | Holds | What the remote agent does with it |
|---|---|---|---|
| Message | Client or agent | A role (user or agent) and parts | Reads instructions, asks follow-ups |
| Part | Either side | Text, a file (URL or bytes) or structured data | Interprets the content for the skill |
| Task | Remote agent | An ID, context ID, state and history | Reports progress and moves it to a terminal state |
| Artifact | Remote agent | Parts forming an output, such as a report | Streams it, appending chunks |
| Context ID | Remote agent, reused by the client | A conversation identifier | Lets new tasks inherit earlier context |
A client continuing a task resends its task ID and context ID, and an agent must reject a message whose context ID does not match the referenced task. Follow-ups that build on earlier work list those tasks in referenceTaskIds. The A2A protocol page covers the eight task states and streaming events.
How to build an A2A agent server
Building an A2A agent server means wrapping existing agent logic in four pieces: an Agent Card, an agent executor that runs the logic, a request handler with a task store, and an HTTP app that serves both. The SDKs supply the handler, task store and routes; you write the card and the executor.
- Describe the agent. Define its skills and card, with the preferred binding first in
supportedInterfaces. - Implement the executor. In the Python SDK, subclass
AgentExecutorand writeexecuteandcancel, which receive aRequestContextand anEventQueue. - Wire the handler. Pass the executor, a
TaskStoreand the cards toDefaultRequestHandler. An in-memory store loses tasks on restart. - Serve it. Mount the card and JSON-RPC routes in an ASGI app such as Starlette.
class ResearchAgentExecutor(AgentExecutor):
async def execute(self, context: RequestContext, event_queue: EventQueue) -> None:
task = context.current_task or new_task_from_user_message(context.message)
if not context.current_task:
await event_queue.enqueue_event(task)
updater = TaskUpdater(event_queue=event_queue, task_id=task.id, context_id=task.context_id)
await updater.update_status(state=TaskState.TASK_STATE_WORKING)
answer = await research(get_message_text(context.message)) # your model and tool calls
await updater.add_artifact(parts=[new_text_part(text=answer, media_type="text/plain")])
await updater.update_status(state=TaskState.TASK_STATE_COMPLETED)
async def cancel(self, context: RequestContext, event_queue: EventQueue) -> None:
raise NotImplementedError("cancellation not supported")
Official SDKs exist for Python, Go, Java, JavaScript, C#/.NET and Rust. The A2A Inspector guide shows how to test an agent before production.
A2A agents in LangGraph, CrewAI and Google ADK
Agent frameworks wrap the SDK to expose or consume agents, each implementing a different subset of bindings and operations.
| Framework | Expose an agent over A2A | Call a remote A2A agent | Limits to check |
|---|---|---|---|
| LangGraph on LangSmith Agent Server | Built-in endpoint at /a2a/{assistant_id} | Through the A2A SDK | JSON-RPC binding only; SubscribeToTask and push notifications return -32601 |
| CrewAI | A2AServerConfig on an agent | A2AClientConfig pointing at a card URL | Needs the crewai[a2a] extra, which installs a2a-sdk |
| Google ADK | to_a2a() or adk api_server --a2a | RemoteA2aAgent sub-agent | Experimental in Go and Java |
LangSmith's A2A docs note a detail that breaks clients: v1.0 method names return TASK_STATE_WORKING, while v0.3 names return working. In ADK, to_a2a() generates the Agent Card from the agent definition.
How A2A agents find and trust each other
A2A agents find each other through Agent Cards and trust each other through credentials the card declares. A client can read a public card anonymously, but must obtain the declared token, key or certificate before the remote agent accepts work.
A2A agent discovery and registries
The A2A discovery guide describes three methods:
- Well-known URI. The agent serves its card at
https://{domain}/.well-known/agent-card.json, following RFC 8615. Suits public and cross-organization agents. - Curated registry. A central catalog answers queries by skill, tag or provider, and can return different cards to different callers. The specification defines no standard registry API yet.
- Direct configuration. The client is given a card URL. Suits private agents, at the cost of reconfiguring clients when the card changes.
Servers should send Cache-Control and an ETag from the card's version, so clients revalidate cheaply.
A2A agent authentication and security model
The A2A security model declares authentication in the card and leaves authorization to each agent. Schemes are API keys, HTTP bearer tokens, OAuth 2.0, OpenID Connect and mutual TLS, sent on every request over TLS. The specification recommends dynamic credentials obtained out of band, never static secrets in the card, and per-skill authorization.
Three risks stand out. Card signing with JSON Web Signature (RFC 7515) is optional, so an unsigned card on a compromised host can redirect clients. Remote artifacts become input to the caller's model, a prompt injection path that AI security at the gateway screens for. And the original caller's identity disappears unless every hop forwards it. The A2A security guide maps the threat model.
Multi-agent orchestration with A2A
Multi-agent orchestration with A2A means one agent, the orchestrator, reads remote agents' cards, picks agents by skill, sends each a task, and combines their artifacts into one answer, while the remote agents stay independent.
- Route by skill. Match the request to each card's skill descriptions and tags.
- Fan out. Send tasks to several agents in parallel and wait on each task ID.
- Chain. Pass one agent's artifacts to the next, listing the earlier task in
referenceTaskIds. - Escalate. When a task reaches
TASK_STATE_INPUT_REQUIRED, ask the user and reply on the same task.
Each agent still reaches its tools over the Model Context Protocol (MCP), so systems run both. To trace one request across agents, carry the context ID and task ID into every model and tool call, and propagate OpenTelemetry trace IDs in W3C Trace Context headers. The Agent Gateway announcement traces one such hand-off.
A2A agents with Bifrost
Bifrost, the open-source AI gateway built by Maxim AI, puts a registry, access control and logs in front of A2A agents through the Agent Gateway in Bifrost, without rewriting the agents.
Registration adds an agent to the Agent Catalog by its full card URL. On every discovery request, Bifrost fetches the current card, rewrites its endpoints and authentication, and serves a gateway card. It relays the card's extensions it can safely pass on: up to 32 per card, with negotiated payloads up to 64 KiB.

Figure 2: The orchestrator talks to one endpoint, and Bifrost picks each remote agent's binding, so clients and agents need not share a transport.
Clients call Bifrost over JSON-RPC, REST or gRPC, and Bifrost calls each agent over the first eligible interface its card lists, never replaying a stream (transport selection and recovery). Agent access grants individual agents to virtual keys, and enforce_auth_on_inference rejects anonymous calls.
With credential forwarding, an agent reuses its caller's credential on its own model and MCP calls, sending x-bf-session-id (context ID) and x-bf-agent-correlation-id (task ID). Agent Logs then group each conversation's tasks, LLM calls and MCP calls in one session. The same deployment routes to 10,000+ models across 25+ providers with 11 microseconds of overhead at 5,000 RPS.
To put an A2A agent behind Bifrost, start with the gateway quickstart, then register it by its card URL.
Frequently asked questions
What is an agent card in A2A?
An agent card in A2A is a JSON document describing an A2A agent: its name, version, skills, the endpoints and bindings where it accepts requests, capabilities such as streaming, and required authentication. Agents usually serve it at /.well-known/agent-card.json, and clients read it before sending a task. It can be signed so clients detect tampering.
What is the difference between an A2A agent and an MCP server?
An A2A agent accepts goals, plans its own work and returns artifacts through a stateful task. An MCP server exposes tools, resources and prompts that a model calls with schema-checked arguments for one result. A typical A2A agent is also an MCP client: it receives work over A2A and completes it with MCP tools.
Do A2A agents need a registry?
No. A client can discover an A2A agent from its well-known card URL or a configured URL. A registry helps once an organization runs many agents and wants one catalog to search by skill, control who sees which cards, and audit access. The A2A specification does not yet define a standard registry API.
Can an A2A agent call other A2A agents?
Yes. An agent that receives a task as an A2A server can act as an A2A client toward other agents, which is how orchestrators work. Each hop is a separate connection with its own credentials, so the original caller's identity and task IDs must be forwarded explicitly for downstream logs and access checks.
Which frameworks can build A2A agents?
Official A2A SDKs cover Python, Go, Java, JavaScript, C#/.NET and Rust. LangGraph agents get an A2A endpoint on LangSmith Agent Server, CrewAI agents can delegate and serve over A2A, and Google ADK exposes agents with to_a2a() and consumes them with RemoteA2aAgent. Streaming and push support varies by framework.
- a2a
- ai agents
- agent gateway



