Agent-to-Agent (A2A) Interoperability and UI Handoffs
Master A2A protocol specifications and AG-UI handshakes for cross-domain agent task delegation, UI state coordination, and human oversight.
Executive TL;DR:
- Multi-agent systems operating across organisational boundaries require a standardised message transport and state coordination layer to delegate tasks safely without exposing proprietary enclaves.
- The Agent-to-Agent (A2A) protocol establishes a decentralised client-server architecture over secure HTTP(S) utilising strict JSON-RPC 2.0 payloads to handle asynchronous task lifecycles.
- To support human oversight, A2A couples with the Agent-User Interaction (AG-UI) protocol to securely pause execution and hand off control via declarative JSON schemas to the client frontend, eliminating untrusted code execution risks.
Supported Protocol Version: A2A v1.0 (current; v1.0.1 released 2026-05-26) publishes the Agent Card at
/.well-known/agent-card.json. Legacy A2A v0.2 used/.well-known/agent.json; the rename landed in v0.3.0. The Agent Gateway reads Agent Cards from legacy v0.2 (agent.json) and v0.3 and later including v1.0 (agent-card.json). Primary specification source: A2A Releases.
How Does the A2A Protocol Enable Cross-Boundary Agent Delegation?
Originally developed by Google and governed by the neutral Linux Foundation, the Agent-to-Agent (A2A) protocol is an open, universal standard that enables autonomous AI agents on disparate frameworks to discover, negotiate, and delegate tasks securely. It enforces operational opacity, ensuring collaborating agents interact through standardised schemas without exposing internal prompts, memory arrays, or proprietary tool implementations.
- The Agent Card: A standardised JSON metadata file hosted at
/.well-known/agent-card.json(for A2A v0.3+ and v1.0; legacy A2A v0.2 used/.well-known/agent.json) that advertises an agent's identity, endpoints, capabilities, skills, and authentication requirements to enable cross-domain discovery. - The Task State Machine: A deterministic workflow model that tracks units of work through sequential, asynchronous execution states, transitioning from
submittedandworkingtoinput-required,completed, orfailed. - The DataPart Schema & AG-UI Handshake: The mechanism within the A2A task payload that transmits structured declarative JSON schemas (rather than raw HTML or JS) to negotiate and dynamically render interactive UI widgets in the client frontend.
How to Implement A2A Task Delegation with Drizzle ORM
Operationalising A2A task delegation and human-in-the-loop (HITL) overrides requires a robust relational database schema to persist asynchronous session states and task executions without schema-migration bottlenecks. The following Drizzle ORM schema defines the agent_tasks table and displays an illustrative JSON-RPC 2.0 payload under The Agent Gateway compliance framework utilising the A2A.SendMessage method to request an interactive UI handoff.
import { pgTable, uuid, text, pgEnum, timestamp, jsonb } from "drizzle-orm/pg-core";
// Core database enums mapping protocol and compliance tiers
export const agentProtocolEnum = pgEnum("agent_protocol", ["A2A", "MCP", "AG-UI", "WALLED_GARDEN"]);
export const taskStateEnum = pgEnum("task_state", ["submitted", "working", "input-required", "completed", "failed"]);
// The agent_tasks table handles high-velocity state machine mutations for asynchronous A2A workflows
export const agentTasks = pgTable("agent_tasks", {
id: uuid("id").defaultRandom().primaryKey(),
sessionId: uuid("session_id").notNull(),
clientAgentId: uuid("client_agent_id").notNull(),
remoteAgentId: uuid("remote_agent_id").notNull(),
currentState: taskStateEnum("current_state").default("submitted").notNull(),
// High-performance JSONB storage for task payloads, messages, and negotiated UX options
manifestData: jsonb("manifest_data").default({}).notNull(),
createdAt: timestamp("created_at").defaultNow().notNull(),
updatedAt: timestamp("updated_at").defaultNow().notNull(),
});
// Illustrative JSON-RPC 2.0 payload showcasing an A2A.SendMessage transition to 'input-required' via the DataPart schema
export const a2aUiHandoffPayload = {
"jsonrpc": "2.0",
"method": "A2A.SendMessage",
"params": {
"taskId": "tsk_01HQ2X4M9VZ",
"state": "input-required",
"message": {
"id": "msg_99xY271ab",
"parts": [
{
"type": "TextPart",
"text": "The credit evaluation requires additional beneficiary verification. Please provide the authorized officer signature."
},
{
"type": "DataPart",
"data_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"authorized_officer": { "type": "string" },
"verification_token": { "type": "string" },
"spend_allocation": { "type": "number", "maximum": 500 }
},
"required": ["authorized_officer", "verification_token"]
},
"ux_modality": "signature_form"
}
]
}
},
"id": 104
};
| Feature Parameter | A2A Protocol (Agent-to-Agent) | Model Context Protocol (MCP) |
|---|---|---|
| Primary Focus | Collaborative task delegation and negotiation between autonomous agents. | Standardised local model-to-tool and model-to-data integration. |
| Interaction Paradigm | Cross-boundary peer-to-peer Agent → Agent execution. | Localized Agent → static Database/API tool attachment. |
| Transport Specification | Secure JSON-RPC 2.0 over HTTPS with optional Server-Sent Events (SSE) streaming. | Lightweight, tool and resource schema exposure over Streamable HTTP and stdio. |
| Identity / Discovery Primitive | Decentralised Agent Cards hosted at root /.well-known/agent-card.json manifests (legacy v0.2 agent.json). | Composite MCP Servers declaring structured Tools, Resources, and Prompts. |
Which Verified Agents Support the A2A Standard?
To integrate secure, pre-vetted multi-agent coordination pipelines directly into your production codebase, access our active extranet registry. Solutions Architects and DevSecOps leads can programmatically query and filter the directory to retrieve verified agents holding active A2A certifications, complete with real-time latency benchmarking, cryptographically signed Agent Cards, and validated transport security.
Browse all A2A-certified agents in the directory →
The Agent Compliance Grader assesses A2A identity manifests against Gateway enterprise standards. Register for early access to queue your endpoint for assessment.
Common A2A Architecture Questions Answered
- Q: How does the A2A state machine handle a task that transitions to an
input-requiredstate when a human user is entirely offline or asynchronous?- A: When a remote agent hits a state transition requiring human intervention, the task is paused and the execution state is serialised into the
agent_taskstable as a durable session. The system yields control by emitting a Server-Sent Event (SSE) streaming notification to the client gateway rather than keeping the execution thread active. Upon human re-engagement, the Next.js API router reads the validated state, hydrates the context from the database, and resumes the workflow synchronously without losing context or reasoning history.
- A: When a remote agent hits a state transition requiring human intervention, the task is paused and the execution state is serialised into the
- Q: Why does the A2A protocol strictly mandate "opacity" regarding agent internals during cross-boundary task delegation?
- A: Opacity is a core security primitive of the A2A specification designed to protect corporate intellectual property and insulate enclaves from adversarial data harvesting. By restricting inter-agent communication strictly to public inputs, outputs, messages, and artifacts, agents can collaborate without ever exposing their proprietary system prompts, internal memory arrays, or model weights. This strict separation prevents logic-layer exploits from propagating across vendor boundaries and secures multi-tenant integrations.
Latest Articles
View allDeploying Model Context Protocol (MCP) Servers for Agent Discovery
Deploy Model Context Protocol (MCP) servers over Streamable HTTP and stdio for secure tool exposure and agent discovery.
Enforcing Walled Garden Guardrails: SAP API Policies and Adobe CX
Enforce enterprise guardrails across SAP API policies and Adobe CX to prevent data exfiltration, token leakage, and unauthorized agent actions.
The AISO Blueprint: Implementing llms.txt, JSON-LD, and Markdown
Traditional web architectures rely heavily on client-side rendering and narrative-heavy content, which render platforms virtually invisible to autonomous agents and non-human web crawlers. AI Search Optimization (AISO) and Generative Engine Optimization (