Home Posts AI Agent A2A Reference [2026] Interaction Patterns
Developer Reference

AI Agent A2A Reference [2026] Interaction Patterns

AI Agent A2A Reference [2026] Interaction Patterns
Dillip Chowdary
Dillip Chowdary
Tech Entrepreneur & Innovator · May 01, 2026 · 11 min read

Bottom Line

Use A2A as the network contract between autonomous agent services, not as a replacement for local handoffs or tool calling. In most production stacks, the winning pattern is local orchestration first, MCP for tools, and A2A only when the other side is a real remote agent.

Key Takeaways

  • As of May 1, 2026, A2A 1.0.0 is the current released spec baseline.
  • Latest A2A discovery starts at /.well-known/agent-card.json, not older 0.2.x paths.
  • Use MCP for tools and resources; use A2A for remote, stateful, multi-turn agent collaboration.
  • Core A2A ops center on SendMessage, SendStreamingMessage, GetTask, SubscribeToTask, and push configs.

Agent-to-agent architecture got much less hand-wavy in 2026. The current A2A 1.0.0 spec gives you a concrete contract for discovery, long-running tasks, streaming, authenticated capability cards, and update delivery, while MCP stays focused on tools and resources underneath the agent. This reference is the practical map: when to use each boundary, which operations matter, how to wire the page UX, and what to avoid when you want interoperable agents without building a distributed mess.

  • May 1, 2026 baseline: A2A 1.0.0 is the current released spec.
  • Discovery first: start at /.well-known/agent-card.json and validate capabilities before advanced calls.
  • Boundary rule: MCP is for tools and data; A2A is for peer agents with task state and negotiation.
  • Fastest path: local handoffs first, remote A2A second, push delivery only for genuinely long jobs.
PatternBest ForState ModelTransportEdge
Local handoffSame-process specialists and prompt routingSingle run, shared app controlIn-process SDK callsLatency
MCPTool use, resources, prompts, capability exposureClient-server sessionSTDIO or Streamable HTTPStructured tool access
Remote A2AIndependent agents owned by another service or teamTask lifecycle with streaming and async deliveryHTTP, JSON-RPC, SSE, REST bindingInteroperability

Quick Map

Bottom Line

Treat A2A as the contract between autonomous services, not as a fancier function call. Use MCP for tools, use local handoffs for same-process specialists, and only pay the A2A coordination cost when the other side is a real remote agent.

Choose the boundary deliberately

  • Use local handoffs when specialists live in the same app and one agent should take over the turn.
  • Use agents as tools when the manager should keep ownership of the final answer.
  • Use MCP when an agent needs structured access to tools, resources, and prompts.
  • Use A2A when the other side is independently deployed, stateful, and expected to negotiate, stream, or run long tasks.

What changed enough to matter in 2026

  • The current public discovery path is /.well-known/agent-card.json.
  • The latest A2A method surface centers on SendMessage, SendStreamingMessage, GetTask, ListTasks, CancelTask, and SubscribeToTask.
  • The REST binding uses endpoints like POST /message:send and POST /tasks/{id}:subscribe.
  • The Agent Card now exposes optional features in capabilities, including streaming, pushNotifications, and extendedAgentCard.

Live Search JS Filter

For a Type B reference page, the fastest usability win is instant filtering over command cards, tables, and pattern notes. Keep the contract tiny: one search input, one empty state, and one data-ref-item per searchable block.

const search = document.querySelector('[data-ref-search]');
const items = [...document.querySelectorAll('[data-ref-item]')];
const empty = document.querySelector('[data-ref-empty]');

function applyFilter(query) {
  const q = query.trim().toLowerCase();
  let visible = 0;

  for (const item of items) {
    const haystack = [
      item.dataset.title || '',
      item.dataset.tags || '',
      item.textContent || ''
    ].join(' ').toLowerCase();

    const match = !q || haystack.includes(q);
    item.hidden = !match;
    if (match) visible += 1;
  }

  if (empty) empty.hidden = visible !== 0;
}

search?.addEventListener('input', (e) => {
  applyFilter(e.target.value);
});

applyFilter(search?.value || '');

Minimal markup contract

<input data-ref-search type='search' placeholder='Filter A2A commands, states, and patterns' />

<section data-ref-item data-title='SendMessage' data-tags='a2a request task blocking'>...</section>
<section data-ref-item data-title='SubscribeToTask' data-tags='a2a sse stream async'>...</section>
<p data-ref-empty hidden>No matches.</p>

If you are pasting lots of example payloads, run them through the Code Formatter before publishing so the search surface stays predictable.

Keyboard Shortcuts

Cheat sheets live or die on scan speed. Bind a few memorable keys and stop there.

ShortcutActionWhy It Matters
/Focus searchFastest path to any command or pattern
EscClear search or blur inputReturns the page to full scan mode
jJump to next visible result cardWorks well after filtering
kJump to previous visible result cardCompletes the scan loop
g cJump to commandsUseful for repeated lookup sessions
g aJump to advanced usageGood for returning readers
cCopy focused code blockPairs well with copy buttons on <pre>
document.addEventListener('keydown', (e) => {
  if (e.key === '/' && document.activeElement?.tagName !== 'INPUT') {
    e.preventDefault();
    document.querySelector('[data-ref-search]')?.focus();
  }

  if (e.key === 'Escape') {
    const el = document.activeElement;
    if (el?.matches?.('[data-ref-search]')) {
      el.value = '';
      el.blur();
      el.dispatchEvent(new Event('input', { bubbles: true }));
    }
  }
});

Commands Grouped by Purpose

Discovery and negotiation

PurposeOperationREST BindingUse It When
Public discoveryAgent CardGET /.well-known/agent-card.jsonYou need identity, skills, supported interfaces, and capabilities.
Extended discoveryGetExtendedAgentCardGET /extendedAgentCardYou need authenticated details beyond the public card.
Capability checkcapabilities.streaming, capabilities.pushNotifications, capabilities.extendedAgentCardCard fieldYou want to avoid unsupported operations before calling them.

Starting work

PurposeJSON-RPCREST BindingNotes
Blocking or polled requestSendMessagePOST /message:sendDefault fit for direct response or task creation.
Live stream from first token or first task eventSendStreamingMessagePOST /message:streamUse when the card advertises streaming.

Monitoring and control

PurposeJSON-RPCREST BindingNotes
Get current task stateGetTaskGET /tasks/{id}Polling path; supports history length semantics in the protocol.
List tasksListTasksGET /tasksUseful for context-level views and pagination.
Cancel taskCancelTaskPOST /tasks/{id}:cancelIdempotent, but terminal tasks are not cancelable.
Resume updatesSubscribeToTaskPOST /tasks/{id}:subscribeFirst SSE event must be the current Task.

Async delivery

PurposeJSON-RPCREST BindingNotes
Create webhook configCreateTaskPushNotificationConfigPOST /tasks/{id}/pushNotificationConfigsFor long jobs where the client may disconnect.
Inspect webhook configGetTaskPushNotificationConfigGET /tasks/{id}/pushNotificationConfigs/{configId}Use in reconciliation flows.
Enumerate configsListTaskPushNotificationConfigsGET /tasks/{id}/pushNotificationConfigsUseful when clients attach multiple callbacks.
Delete configDeleteTaskPushNotificationConfigDELETE /tasks/{id}/pushNotificationConfigs/{configId}Clean up after terminal tasks.

Neighboring patterns you will use with A2A

  • MCP discovery: initialize, notifications/initialized, tools/list, resources/read, prompts/list.
  • MCP execution: tools/call plus optional notifications such as notifications/tools/list_changed.
  • OpenAI local orchestration: handoffs when the specialist should take over the turn; agent.asTool() when the manager should stay user-facing.

Configuration

Minimal A2A Agent Card

{
  "name": "Invoice Review Agent",
  "description": "Reviews invoices, flags anomalies, and returns audit notes.",
  "supportedInterfaces": [
    {
      "transport": "HTTP+JSON"
    }
  ],
  "version": "1.0.0",
  "capabilities": {
    "streaming": true,
    "pushNotifications": true,
    "extendedAgentCard": true
  },
  "defaultInputModes": ["text/plain", "application/json"],
  "defaultOutputModes": ["text/plain", "application/json"],
  "skills": [
    {
      "id": "invoice_audit",
      "name": "Invoice audit",
      "description": "Validates invoice data and identifies likely issues.",
      "tags": ["finance", "audit", "validation"]
    }
  ]
}

Local specialist graph with OpenAI Agents SDK

import { Agent, run } from '@openai/agents';

const billing = new Agent({
  name: 'Billing Agent',
  instructions: 'Handle billing disputes and invoice questions.',
  model: 'gpt-5.4'
});

const security = new Agent({
  name: 'Security Agent',
  instructions: 'Handle auth, access, and privacy issues.',
  model: 'gpt-5.4'
});

const triage = Agent.create({
  name: 'Triage Agent',
  instructions: 'Route users to the right specialist.',
  handoffs: [billing, security]
});

const result = await run(triage, 'Why was this account locked after invoice review?');
console.log(result.finalOutput);

This is the right default when the specialists are still your code, your process, and your deployment boundary.

MCP bootstrap reminder

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "initialize",
  "params": {
    "protocolVersion": "2025-06-18",
    "capabilities": {
      "elicitation": {}
    },
    "clientInfo": {
      "name": "agent-host",
      "version": "1.0.0"
    }
  }
}

After initialization, the client sends notifications/initialized, then it can discover tools with tools/list and execute them with tools/call.

Advanced Usage

High-value patterns

  • Set returnImmediately when you want SendMessage to create work fast and move status tracking to GetTask, SubscribeToTask, or push delivery.
  • Use messageId for dedupe because A2A explicitly allows idempotency handling around duplicate messages.
  • Prefer SubscribeToTask over polling if users are actively waiting; the spec requires the current Task as the first event, which reduces the state race.
  • Use ListTasks with context and pagination to build operator views, retry dashboards, or stuck-work sweeps.
  • Scrub traces, cards, and payload samples before storing them; the Data Masking Tool is a cheap guardrail for production docs and support exports.
POST /message:send HTTP/1.1
Host: agent.example.com
Content-Type: application/a2a+json
Authorization: Bearer $TOKEN
A2A-Version: 1.0

{
  "message": {
    "role": "ROLE_USER",
    "parts": [{ "text": "Generate an audit summary for invoice batch 42" }],
    "messageId": "msg-42"
  },
  "configuration": {
    "returnImmediately": true
  }
}
Watch out: Do not turn every subtask into A2A. Networked agent boundaries increase auth, observability, timeout, and schema drift costs. If the other side is just your own specialist function, keep it local.
Pro tip: A practical production stack is manager agent locally, MCP for data and tools, then A2A only for external agents that own their own lifecycle. That split preserves clarity in logs, auth, and failure handling.

Primary sources: A2A Protocol Specification, MCP Architecture Overview, OpenAI Agents SDK Handoffs, and OpenAI Agents SDK Tools.

Frequently Asked Questions

What is the difference between A2A and MCP? +
A2A is for agent-to-agent collaboration across a service boundary: discovery, task state, streaming, and async updates. MCP is for agent-to-tool and agent-to-resource access inside or beneath an agent. A clean rule is simple: if the other side reasons and owns a task lifecycle, use A2A; if it exposes a capability, use MCP.
When should I use A2A instead of local handoffs or tool calling? +
Use A2A when the specialist is independently deployed, owned by another team, or expected to maintain state over multiple turns. Use local handoffs when specialists live in the same app and should take over the turn. Use tool calling when the manager should remain in charge and the callee is just a capability.
What does an A2A agent card need in 2026? +
At minimum, an Agent Card should expose a human-readable name, description, supportedInterfaces, version, capabilities, input and output modes, and skills. The public discovery path is /.well-known/agent-card.json. Clients should inspect capabilities before attempting streaming, push notifications, or extended card retrieval.
How do I handle long-running A2A tasks without blocking the client? +
Send the request with returnImmediately when you want the task created quickly and status handled elsewhere. Then choose one of three follow-ups: poll with GetTask, stream with SubscribeToTask, or register webhooks with push notification config methods. In active UI flows, streaming is usually the cleanest operator experience.

Get Engineering Deep-Dives in Your Inbox

Weekly breakdowns of architecture, security, and developer tooling — no fluff.

Found this useful? Share it.