Skip to content

Agent-to-Agent (A2A) Protocol: How Agents Talk Across Vendors

The A2A protocol lets AI agents built on different frameworks discover each other, delegate tasks, and stream results. Learn how it works and when to use it.

TechnoKeen Engineering 8 min read Published
On this page

The Agent-to-Agent (A2A) protocol is an open standard that lets one AI agent discover another, hand it a task, and receive results, even when the two agents are built by different teams on different frameworks. It treats the remote agent as an opaque peer with its own reasoning, not as a function to call. If MCP is how an agent reaches its tools, A2A is how an agent reaches a colleague.

Key takeaways

  • A2A defines how agents advertise capabilities (the Agent Card), exchange messages, track long-running tasks, and return artifacts, over standard HTTP-based transports.
  • The core design choice is opacity: the calling agent does not see the remote agent’s prompts, tools, or memory. That protects intellectual property and lets each side evolve independently.
  • Use A2A at organizational or vendor boundaries. Inside a single codebase, a direct function call or in-process sub-agent is usually simpler.
  • Delegation across agents multiplies your trust surface. Authenticate every peer, scope what each can ask for, and treat remote output as untrusted.
  • A2A and MCP are complementary. Most real systems that use A2A also use MCP or native tools inside each agent.

Why agents need their own protocol

Most multi-agent systems today live inside one repository and one framework. An orchestrator calls sub-agents as functions, shares memory, and passes state directly. That works well, and our guide to multi-agent systems covers those patterns.

The picture changes when the agents belong to different owners. Consider a procurement agent at a manufacturer that needs a quote from a supplier’s sales agent. Or an internal IT agent that needs to hand off a hardware request to a vendor’s fulfillment agent. Neither side will expose its internals to the other. Each runs on its own stack and its own release cycle.

You could model the remote agent as a tool. But tools are expected to be fast, stateless, and deterministic in shape. A remote agent may take minutes or hours, ask clarifying questions, produce files, and fail in ways that need negotiation. A2A gives those behaviors first-class representation.

The protocol was introduced by Google and is now developed as an open project under the Linux Foundation. The specification and SDKs are at a2a-protocol.org.

The core concepts

A2A has a small vocabulary. Once you know these five terms, the spec reads quickly.

Agent Card

An Agent Card is a JSON document that describes an agent: its name, what it does, where its endpoint is, which capabilities it supports, how to authenticate, and a list of skills. Agents typically publish it at a well-known URL on their domain so clients can discover it, and registries can index cards for search.

Here is a trimmed example for a hypothetical supplier quoting agent:

{
  "name": "Acme Supply Quoting Agent",
  "description": "Prices and quotes industrial fasteners and fittings. Handles bulk discounts and lead-time estimates.",
  "url": "https://agents.acme-supply.example/a2a",
  "version": "1.4.0",
  "capabilities": {
    "streaming": true,
    "pushNotifications": true
  },
  "defaultInputModes": ["text/plain", "application/json"],
  "defaultOutputModes": ["text/plain", "application/json", "application/pdf"],
  "securitySchemes": {
    "oauth": {
      "type": "oauth2",
      "flows": {
        "clientCredentials": {
          "tokenUrl": "https://auth.acme-supply.example/oauth/token",
          "scopes": { "quotes:create": "Request price quotes" }
        }
      }
    }
  },
  "security": [{ "oauth": ["quotes:create"] }],
  "skills": [
    {
      "id": "bulk-quote",
      "name": "Bulk quote",
      "description": "Returns a priced quote for a list of SKUs and quantities, including lead time.",
      "tags": ["pricing", "quotes", "procurement"],
      "examples": ["Quote 5,000 units of M8 hex bolts, zinc plated, delivered to Rotterdam."]
    }
  ]
}

Notice what the card does not contain: system prompts, tool lists, or model choice. The supplier can rebuild its agent on a different framework tomorrow without breaking callers, as long as the skills and interface hold.

Messages and parts

A message is one turn of communication, with a role (user for the caller, agent for the remote side) and a list of parts. Parts carry content of different kinds: plain text, files (inline or by URI), or structured JSON data. Structured data parts matter more than they look. They let two agents exchange a purchase order as a typed object instead of hoping a paragraph of prose gets parsed correctly.

Tasks

A task is the unit of work. When a client sends a message that kicks off real work, the server returns a task with an ID and a status. Tasks move through a defined lifecycle:

submitted --> working --> completed
                 |   \
                 |    --> failed / canceled / rejected
                 v
          input-required  (agent needs more info from caller)
          auth-required   (agent needs additional credentials)
                 |
                 +--> caller replies on same task --> working

The input-required state is the feature that most clearly separates A2A from tool calling. A remote agent can pause and ask, “Do you want zinc-plated or stainless?” The calling agent, or a human behind it, answers in a follow-up message on the same task.

Simple requests can skip the task machinery entirely: the server may reply with a direct message when there is nothing long-running to track.

Artifacts

An artifact is an output the task produces: a quote PDF, a JSON object, a generated report. Artifacts are separate from the conversational messages, so the caller can distinguish “here’s what I’m thinking” from “here’s the deliverable.” Artifacts can also be streamed in chunks for large outputs.

Transport and interaction modes

A2A runs over HTTPS. The core binding uses JSON-RPC 2.0, and the spec has added further bindings such as gRPC and a REST-style interface. Three interaction modes cover most needs:

Mode How it works Use when
Request/response Client sends a message, then polls the task for status Short tasks, simple clients
Streaming Server pushes status updates and artifact chunks over server-sent events Interactive UIs, progress reporting
Push notifications Server calls a client-provided webhook when the task changes Tasks that run minutes to days

A minimal client, end to end

The official SDKs handle most of this for you, but writing a raw client once makes the protocol concrete. The example below uses httpx against the JSON-RPC binding. Method and field names have shifted across spec revisions, so check them against the version your peers implement.

import asyncio
import uuid

import httpx

AGENT_BASE = "https://agents.acme-supply.example"
TERMINAL_STATES = {"completed", "failed", "canceled", "rejected"}


async def rpc(client: httpx.AsyncClient, url: str, method: str, params: dict) -> dict:
    payload = {"jsonrpc": "2.0", "id": str(uuid.uuid4()), "method": method, "params": params}
    resp = await client.post(url, json=payload)
    resp.raise_for_status()
    body = resp.json()
    if "error" in body:
        raise RuntimeError(f"A2A error {body['error']['code']}: {body['error']['message']}")
    return body["result"]


def text_of(message: dict) -> str:
    return "\n".join(p["text"] for p in message.get("parts", []) if p.get("kind") == "text")


async def request_quote(token: str, request_text: str, order: dict) -> dict:
    async with httpx.AsyncClient(
        headers={"Authorization": f"Bearer {token}"}, timeout=30.0
    ) as client:
        # 1. Discover the agent and its endpoint.
        card = (await client.get(f"{AGENT_BASE}/.well-known/agent-card.json")).json()
        endpoint = card["url"]

        # 2. Send the initial message: prose plus a structured data part.
        result = await rpc(client, endpoint, "message/send", {
            "message": {
                "role": "user",
                "messageId": str(uuid.uuid4()),
                "parts": [
                    {"kind": "text", "text": request_text},
                    {"kind": "data", "data": order},
                ],
            }
        })

        # A direct message reply means no task was created.
        if result.get("kind") == "message":
            return {"state": "completed", "reply": text_of(result), "artifacts": []}

        task = result

        # 3. Poll until the task finishes or needs input.
        while task["status"]["state"] not in TERMINAL_STATES:
            if task["status"]["state"] == "input-required":
                question = text_of(task["status"].get("message", {}))
                return {"state": "input-required", "task_id": task["id"], "question": question}
            await asyncio.sleep(2)
            task = await rpc(client, endpoint, "tasks/get", {"id": task["id"]})

        return {
            "state": task["status"]["state"],
            "task_id": task["id"],
            "artifacts": task.get("artifacts", []),
        }

In production you would prefer streaming or push notifications over polling, cache the Agent Card with a sensible TTL, and validate that card["url"] is on a domain you expect before sending it credentials. When the result is input-required, your agent either answers from its own context or escalates to a human, then sends a new message referencing the same taskId.

When A2A is the right choice

A2A adds a network hop, an authentication handshake, and an asynchronous lifecycle. Those costs are worth paying only in some situations.

Use A2A when:

  • The remote agent is owned by another team, business unit, or company.
  • The remote side needs to keep its prompts, tools, and data private.
  • Tasks are long-running, need clarification, or produce rich artifacts.
  • You want to swap one vendor’s agent for another without rewriting the caller.

Skip A2A when:

  • Both agents live in the same codebase and deploy together. Use in-process sub-agents.
  • The “agent” is really a deterministic function. Expose it as a tool, often through MCP.
  • You need tight, low-latency loops with shared state. Cross-network delegation will be slow and awkward.

A useful test: if you would write an API contract and an SLA between the two sides, A2A is probably a fit. If you would just import a module, it isn’t.

Security and trust between agents

Delegation is where agent security gets hard. When your agent asks a remote agent for help, you are trusting it with data and trusting its output enough to act on. When you expose your own agent over A2A, you are letting outside parties steer an LLM that has access to your systems.

On the server side

  1. Authenticate every caller using the schemes declared in your Agent Card. Standard options like OAuth 2.0 client credentials or mutual TLS are well understood; don’t invent your own.
  2. Authorize per skill. A partner allowed to request quotes should not be able to trigger refunds just because both skills live on the same agent.
  3. Assume incoming messages are adversarial. Every message is a prompt injection attempt until proven otherwise. The remote caller is, after all, another LLM that may itself be compromised. The OWASP Top 10 for LLM Applications is a good checklist here.
  4. Limit what the agent can do on behalf of external callers with least-privilege credentials scoped to the external use case.

On the client side

  1. Pin trusted agents. Discover through a curated registry or an allow-list of domains, not open search.
  2. Minimize what you send. Pass only the data the task needs. Remember that the remote agent’s logs are outside your control.
  3. Validate artifacts before acting on them. A quote that comes back as structured JSON should be schema-validated and range-checked before it enters your ERP.
  4. Keep a human in the loop for any delegated action with financial or legal effect. Our human-in-the-loop guide covers practical approval patterns.

Tracing across boundaries

When a task fails across two organizations, you need to reconstruct what happened. Propagate trace context (W3C traceparent headers) on A2A calls where both sides agree to it, and log task IDs on both ends. Even if the remote side won’t share its internal traces, matching task IDs and timestamps will let you have a productive incident call.

How A2A and MCP fit together

The two protocols are easy to confuse because both involve agents talking to remote services. The distinction is about what sits on the other end.

MCP A2A
Connects An agent to tools, data, and prompts An agent to another agent
Remote side is A capability provider, usually deterministic An autonomous peer with its own reasoning
Typical latency Milliseconds to seconds Seconds to days
State Session-scoped, mostly stateless calls Task lifecycle with clarification turns
Visibility Caller sees tool schemas Caller sees only skills, not internals

A typical architecture uses both. Your procurement agent uses MCP servers to read your inventory system and draft purchase orders. It uses A2A to ask a supplier’s agent for a quote. The supplier’s agent, in turn, uses its own MCP servers internally. Neither side needs to know what the other uses inside.

Adoption checklist

If you are considering A2A, work through this list before writing code:

  1. Identify a concrete cross-boundary workflow where both parties benefit from automation.
  2. Confirm the counterpart will implement or host an A2A endpoint.
  3. Agree on skills, input and output schemas for data parts, and SLAs.
  4. Choose authentication and agree on scopes per skill.
  5. Decide which interaction mode fits the task duration.
  6. Define escalation: what happens when a task enters input-required and your agent cannot answer.
  7. Build evals for the delegation itself, including malformed and adversarial responses.
  8. Instrument both sides with correlated task IDs.

FAQ

Do we need A2A to build a multi-agent system?

No. Most multi-agent systems run inside one application and use direct calls between agents. A2A becomes valuable when agents cross ownership boundaries, such as between teams with separate deployment pipelines or between companies.

Can an A2A agent also be an MCP server?

You can wrap an agent behind an MCP tool, and some teams do for convenience. You lose the task lifecycle, clarification turns, and streaming artifacts that A2A provides, so this works best for quick, single-shot requests. For anything long-running or conversational, use A2A directly.

Is A2A tied to a specific framework or model?

No. A2A is framework- and model-agnostic by design. SDKs exist for several languages, and agents built with different frameworks can interoperate as long as they implement the same protocol version.

How do we discover agents from other companies?

Through their published Agent Cards, typically at a well-known URL on their domain, or through a registry that indexes cards. For business workflows, discovery is usually configured by contract rather than found dynamically, which is also the safer approach.

Working with TechnoKeen

We design and secure agent systems that cross team and vendor boundaries, including A2A endpoints, authentication, and cross-organization tracing. If you are scoping an interoperability project, get in touch or see how we approach agent engineering.

  • #A2A protocol
  • #agent interoperability
  • #multi-agent systems
  • #agent architecture

TechnoKeen Engineering

TechnoKeen is an enterprise agentic AI company. Our engineers design, deploy, and govern AI agents for organizations in regulated and complex industries, and share what we learn in the field.

About TechnoKeen →

Keep reading

Engineering 9 min read

How to Choose an AI Agent Framework in 2026

How to choose an AI agent framework: compare graph, role-based, provider SDK, and minimal approaches by control, observability, lock-in, and team fit.

Ready to put agents to work?

Book a 45-minute executive briefing. We will review your priority workflows, current AI efforts, and risk posture, then outline a clear path to agents in production.