Interactive guide · Day 2

Agent Tools & Interoperability

A standalone agent is a custom machine in a garage. An interoperable agent is a member of a global workforce. This guide summarizes the "Agent Tools & Interoperability" paper (Kanchana Patlolla, Łukasz Olejniczak & Pier Paolo Ippolito, Google) in interactive format: the protocol stack — MCP, A2A, A2UI, AP2 and UCP — with clickable diagrams, simulators, quiz and cheatsheets.

📄 Paper: Day 2 ⏱ ~30 min study time 🔌 5 open protocols ✅ 8-question quiz 🌐 EN · ES · PT-BR
👥 Who this guide is for
👩‍💻 Software engineers 🧑‍💼 Engineering managers 🏛 Architects & technical leaders ⚡ Vibe coders

Assumes familiarity with Day 1 (Agentic Engineering and the Factory Model). Does not assume prior knowledge of the protocols — MCP, A2A, A2UI, AP2 and UCP are introduced from scratch, with analogies.

orchestrator@workspace — shift 12 · the protocol stack in action
user$ "find flights to Tokyo, book the cheapest, file the expense" ▸ MCP tools.list() → 3 servers · 14 tools · 42ms ▸ A2A travel_agent.discover(registry) → matched ✓ ▸ A2A travel_agent.send(task:"search NRT, Nov 14–21")   ← "3 options · best: ¥68,200 nonstop" ▸ A2UI render(FlightCard×3, CompareTable) → surface:main ✓ ▸ AP2 mandate.check($682 ≤ $1000) → approved ✓ ▸ UCP order.confirm(flight_id:NH211) → PNR:XK4T2 ✓ user$
0
open protocols forming the stack: MCP · A2A · A2UI · AP2 · UCP
0
components in the A2UI basic catalog — generative UI without writing React
0
endnotes in the original paper — all listed in the references section
01

Introduction: the stack that gets the agent out of the garage

Agent = Model + Harness — and the protocols are the standardized nuts and bolts that make the harness connectable to the world.

Day 1 established the paradigm shift: from hand-written code to Agentic Engineering, where the developer operates as a Factory Model — designing the production line, not tightening every bolt. The central equation from that paper remains the foundation for everything that follows:

Agent
=
Model
+
Harness
the model reasons · the harness connects, orchestrates, protects and persists

The harness — the scaffolding of tools, memory, transport and security around the model — only reaches its potential when it connects to the world through open standards. Without standards, every integration is a custom-machined part: it works in your garage, breaks at the first change. With standards, the harness becomes a plug-and-play modular platform.

The paper presents five protocols as the "industry standards" — the uniform threads and sockets of the agentic ecosystem. Click each one to explore:

Two more pieces complete the picture: the OpenResponses & Interactions API works as 'Power Plugs' — modern API approaches to LLM inference that support long-running tasks, blurring the line between a stateless single turn and a stateful agent. And Skills are 'Playbooks' — very simple markdown instructions with scripts or tools ready to run in a sandbox environment like a terminal.

🔌

MCP

the "USB-C"
📻

A2A

the "factory radio"
🪟

A2UI

the "generative storefront"
💳

AP2

the "payments vault"
🛒

UCP

the "supply chain"

MCP — Model Context Protocol

🔧

Without protocols

the Conductor role
  • each agent is an isolated "custom machine" in the garage
  • fragile bespoke wrappers for every external API
  • the developer is stuck in the Conductor role: manual wiring, point to point
  • technical debt that grows with every integration
🏭

With protocols

the Orchestrator role
  • plug-and-play modular platform
  • tools and specialist agents discovered and connected in minutes
  • the developer rises to Orchestrator: composes capabilities, doesn't wire cables
  • full focus on high-value business logic
Paper focus

How vibe coders can use the protocols to build a virtual data and execution team in a single afternoon — discovering, connecting and orchestrating tools and agents like assembling blocks.

02

Why this paper, why now

In the vibe coding era, less structure demands MORE trust — and protocols are what build that trust.

Vibe coding removed the friction of writing code — and with it, some of the structure that guaranteed predictability. Speed remains the primary engine, but now harnesses and protocols carry the weight of trust: they define clear contracts between the agent and the external world.

Without open standards, every API becomes a "standard-of-one": a custom parser, a custom error format, a custom auth flow. The result is technical debt that accumulates silently — and a list of low-leverage tasks that consume the developer's time:

🧶

Writing fragile wrappers

every bespoke integration is new code nobody wants to maintain — and it breaks at the first API change.

🩹

Maintaining the bridges

token refresh, retry, rate limit, schema drift: maintaining each bridge is a recurring tax.

🔄

Adapting to changes

when the vendor changes the API, all bespoke consumers break at once.

The role shift

With protocols, the developer stops being the builder who wires every connection and becomes the high-level orchestrator who composes standardized capabilities — spending energy on the logic that differentiates the product, not on plumbing.

03

Who this paper is for — and the applied tip from Day 1

A practical guide for those who prioritize speed and visual output — without sacrificing rigor.

The paper was designed for software engineers, engineering managers, architects and technical leaders who recognize that the shift to Agentic Engineering requires strict adherence to protocols to maintain fidelity and reliability of results. It serves as a practical guide for "vibe coders" who prioritize speed and visual output, showing how to build a virtual data and execution team.

📌Applied tip · inherited from Day 1

Four habits the paper reinforces before any code

Before coding

Use an AGENTS.MD file for standard coding agent guidance. And think deeply before coding: declare assumptions, expose tradeoffs and stop to ask when encountering ambiguity — instead of guessing silently.

During execution

Write the minimum code: no speculative features, no unrequested abstractions. Make surgical edits — only the exact lines needed, keeping the style. And run goal-driven: step-by-step plan, success criteria, failing test first, loop until it passes.

In the series sequence

A deeper dive into Agent Skills comes in the next whitepaper; security is the topic of the one after. This paper focuses on tools and interoperability.

04

MCP: discovery, configuration and connection

The "USB-C" of agents — a standardized socket that replaces bespoke wiring with three steps.

In traditional enterprise, connecting an agent to a tool means bespoke wiring: custom REST wrappers, manual API key management, OAuth token refresh, hand-written JSON parsers for every response format. Every new tool is a project. MCP (Model Context Protocol) replaces that friction with a standardized socket — discover, configure, connect.

STEP 1
🔍

Discovery

find MCP servers that expose the tools you need

STEP 2
⚙️

Configuration

credentials and permissions via environment files

STEP 3
🤝

Connection

handshake: list the tools and validate the schemas

Discovery

Applied tip · security first

Before connecting any MCP server: look up the vendor's official instructions, never pass credentials to unverified public servers, and consider a protection layer like Model Armor. Servers on public registries are not audited — use at your own risk.

05

Solving the NxM problem

The math of integration: N models × M tools — and why MCP turns combinatorial explosion into linear addition.

Every agentic platform faces the same math: N models × M tools. In the traditional approach, each model-tool pair requires a bespoke integration — O(N×M) integration points. With 5 models and 10 tools, that's 50 integrations to maintain. If one tool's API changes, multiple parser loops break at once.

asciithe math of integration — traditional vs MCP
TRADICIONAL — O(N×M): cada par precisa do seu próprio conector

  gemini ──┬── calendar   5 modelos
  claude ──┼── gmail      ×
  llama ───┼── bigquery   10 ferramentas
  gpt ─────┼── maps       = 50 integrações bespoke
  mistral ─┴── drive      (e 50 lugares para quebrar)

COM MCP — O(N+M): todos falam o mesmo protocolo

  gemini ─┐              ┌── calendar
  claude ─┤              ├── gmail
  llama ──┼── [ MCP ] ──┼── bigquery
  gpt ────┤              ├── maps
  mistral─┘              └── drive
           5 + 10 = 15 adaptadores

With MCP, each model implements the protocol once and each tool implements the protocol once — total cost drops to O(N+M), linear scale. Drag the controls and watch the difference explode:

Traditional · O(N×M)12
With MCP · O(N+M)7
bespoke integrations
12
MCP adapters
7
savings
5
With 3 models and 4 tools, MCP already eliminates 5 integrations. The advantage grows multiplicatively with scale — and every API that changes now breaks one adapter, not N.
06

Why this matters: the transports

Standardized tool definitions + standard transports = the harness connects directly, no custom layers.

Because tool definitions are standardized, MCP can be plugged directly into the harness via standard transports — no custom integration layers. Two transports cover virtually all cases. Click each one:

🖥️

stdio

Standard Input/Output · local & prototyping
🌐

SSE over HTTP

Server-Sent Events · local or remote

stdio

In both cases, the vibe coder gains the same superpower: connecting tools without writing multiple layers of custom integration — the transport is handled by the protocol, not by you.

07

Debugging problems with MCP servers

When the agent hallucinates parameters or calls the wrong tool: don't tweak the prompt blindly — inspect the transport.

When the agent hallucinates parameters, calls the wrong tool, or fails to parse a payload, the instinct is to rewrite the system instructions. Resist. The problem is almost always in what the agent sees — and the right way to diagnose it is to inspect the transport pipes directly, without starting the agent's main workflow.

🔬

MCP Inspector

Native development tool: a local web panel to manually interrogate any MCP server (local or remote).

  • see the active schemas of the tools
  • test input payloads manually
  • inspect the raw JSON-RPC 2.0 packets
  • all of this without triggering the agent's workflow
🧰

Chrome DevTools

For web development environments and SSE connections, DevTools is the ideal complement:

  • trace the incoming web streams
  • check the server latency per request
  • debug the SSE connection frame by frame
  • correlate network errors with agent failures
The golden rule of MCP debugging

Raw transport data > blind prompt tweaks. If the schema says date: string and the agent sends a number, the fix belongs in the schema or the example — not in one more instruction sentence.

08

The vibe coder's toolkit: MCP consumption best practices

What to do and what never to do when consuming MCP servers.

✅ Do

Audit public servers before connecting — review the source code.
Use RAG for tools: load/discard schemas dynamically from context, avoiding attention dilution.
Leverage API Gateways and internal registries — approved, governed schemas.
Use the MCP Inspector — raw transport data, not blind prompt-tweaking.
Include HITL: show the tool inputs before the call, preventing data exfiltration.
Log tool usage for auditing.

❌ Don't

Don't build if you can consume — look for an existing MCP server first.
Don't use unverified public MCPs in production — security and reliability risks.
Don't hardcode credentials — use environment variables.
Don't connect in production — use a development project with non-production or obfuscated data.
Don't use it for updates — read-only mode if you need real data.
Don't grant broad access to all projects — scope it to the specific project.
09

Agent-to-Agent (A2A) interoperability

AI systems are becoming distributed networks of specialists — and standardized communication is what scales that network.

AI systems are evolving from isolated applications into distributed networks of domain specialists. In this reality, standardized communication is not a convenience — it is a prerequisite for scale. A2A (Agent-to-Agent) is the foundational layer that resolves ecosystem fragmentation: it lets developers discover, orchestrate, and monetize a globally interoperable virtual workforce.

The evolution of agentic architectures

There is a recurring pattern in the history of computing: the manual and low-level gives way to the declarative and intent-based. The user says WHAT, not HOW. This trajectory has repeated three times — and now it is happening with agents:

🏗️

Infrastructure → Infrastructure as Code

from hand-configured servers to desired-state declarations.

O QUÊ, não COMO
🤖

ML → AutoML

Pichai's vision (2017): ML pipelines that build themselves from intent.

O QUÊ, não COMO

Code → Vibe coding

today: entire applications generated from natural-language intent.

O QUÊ, não COMO
🧩

Monolith → Microservices → Agents

the trajectory mirrors Fowler & Lewis (2014): from monolithic applications to specialized, composable services.

O QUÊ, não COMO
“One way we hope to make AI more accessible is by simplifying the creation of machine learning models called neural networks. Today, designing neural nets is extremely time intensive... That's why we've created an approach called AutoML, showing that it's possible for neural nets to design neural nets. We hope AutoML will take an ability that a few PhDs have today ….”
— Sundar Pichai (2017) · endnote 15
10

The monolithic ceiling

The "Swiss Army knife" of an agent only works up to a point — after that, the architecture itself becomes the limit.

Early vibe coding naturally produces the Single Agent Monolith: a "Swiss Army knife" with a sophisticated prompt, one agent wearing multiple hats, and dozens of tools. You can prototype it in a weekend — but it soon hits the Monolithic Ceiling:

📏

Scaling friction

You can't optimize the "banking logic" without confusing the "UI logic". More tools → worse decisions: the search space grows too large and hallucinated parameters and wrong tools appear.

🧠

Contextual overload

System instructions + dozens of tool schemas + conversation history → the model's working memory overflows. Everything competes for the same attention.

💥

Single point of failure

A bug in one tool or instruction → the whole agent hallucinates or crashes. Corrupted data propagates to every capability.

🔪Analogy · The Swiss Army knife

Great for camping — terrible for building a house

The monolith

A Swiss Army knife has 30 tools in a single piece: everything available all the time, but each tool is mediocre and the whole thing is heavy to carry. That is the monolithic agent — versatile, fragile, impossible to scale.

The alternative

An organized toolbox: each tool in its place, specialized, grabbable on demand. That is the multi-agent architecture — each specialist carries only what it needs.

11

Internal specialization

Specialization is a fundamental law of systems design — and agents follow the same blueprint as ML and software.

The solution follows the blueprint that ML and software engineers already know. AutoML proved its business value and was then decomposed into observable stages — data versioning, feature stores, drift detection. The same happens with the monolithic agent: specialization is the scaling mechanism.

🏛️ Figure 3 · Monolithic multi-agent architecture — internal specialization
How it works
rootthe monolithic agent is logically partitioned into sub-agents with distinct purposes
subeach sub-agent: a highly focused system prompt + a relevant subset of tools
limiteit is still a monolith: sub-agents do NOT communicate across network boundaries
limitethey share the runtime and memory of the same process
Three direct benefits
reduced search spacefewer errors
less attention dilutionsharper reasoning
optimized contextual load+ signal, − noise

Reduced search space: restricting each sub-agent's tools reduces errors and hallucinations. Attention-dilution mitigation: a single-domain prompt produces sharper reasoning. Contextual-load optimization: the orchestrator routes the task and each sub-agent receives context with a high signal-to-noise ratio.

12

Distributed multi-agent architecture

When specialists leave your process and cross network boundaries — and the "build vs. buy" lens comes into play.

The ecosystem is migrating to distributed multi-agent architectures: industry leaders (Google, Salesforce, ServiceNow, Workday) already publish specific domain agents. The orchestrator delegates across network boundaries — no longer within a single process.

🔨

Build · custom sub-agents for 3P platforms

significant maintenance tax
  • the developer takes on full responsibility for updating prompt logic, tool definitions, and API schema changes
  • every change in the 3P platform becomes your job
  • you maintain what you didn't actually build
🤝

Buy · official specialist agents

maintained by domain experts
  • the specialist is maintained by those who know the domain deeply
  • your orchestrator focuses on unique value for the user and on core innovation
  • updates arrive via protocol, not via rewriting
The fragmentation bottleneck

Each specialist may be built by a different team, with different technology: Google's agent in Python, Go, or Java with ADK, Salesforce's in LangChain, Workday's in something entirely bespoke. Different languages, different payload structures, different conversational-state handling, different transport layers. If every integration demands custom code and bespoke error-correction loops, the "virtual team" becomes an integration project — and the maintenance tax consumes the entire project.

13

Bounded × unbounded domains

Why a specialist agent can't be treated like an ordinary tool — the kitchen-renovation analogy.

🔨Analogy · The kitchen renovation

Tools are passive instruments; specialists are collaborative partners

Buying tools and manuals (DIY)

You buy the saw, the level, and the manual. The tool does exactly what you command — and nothing more. If the wall is crooked, the saw won't warn you. That is the standard tool: fire-and-forget, one perfectly formatted request → one response.

Hiring someone who builds kitchens for a living

You don't hand over the blueprint and leave. The specialist finds edge cases, points out oversights, pauses, consults about trade-offs, and resumes. It is an agent: an unbounded problem-solving space.

The real world has ambiguous data structures, misleading requirements, and conflicting user preferences — the "digital equivalent of crooked walls". It is rarely possible to specify every detail without multi-turn clarification. It is this need to negotiate, pause, and resume that separates an agent from an API.

14

The GOTO problem in agentic architecture

Forcing an unbounded domain into a tool wrapper is the new GOTO — and A2A is the structured block that was missing.

An agent's domain is unbounded. Forcing it into a synchronous tool wrapper is equivalent to resurrecting GOTO: the control flow abandons the expected structured context and can do anything — reach an interrupted state, ask for more information, never return the expected output, or be abandoned when the user changes their mind halfway through.

We need a paradigm that isolates the messy multi-turn state — a protocol that allows pausing execution → returning to the Orchestrator → negotiating → resuming without losing conversational state. A2A fills exactly that gap. By isolating collaborative routing in the A2A layer, the tools layer (MCP) stays clean, predictable, and strictly structured.

The decisive question (endnote 19)

"Does the caller need a result, or does the caller need another participant to take responsibility?"

Result → tool (MCP). Responsibility → agent (A2A).

15

Building the virtual workforce

A2A + specialization create new marketplaces of expertise — with the Agent Card as the standardized résumé.

A2A + specialization are the foundation of new marketplaces of expertise. Without A2A, each agentic application fights rising complexity alone. With A2A, a developer can focus on a high-value niche — for example, "Real-Time Regulatory Compliance" — and have their specialist discovered and "hired" by orchestrators around the world.

🪪

The Agent Card — the "résumé" of the AI world

A standardized document that any orchestrator can read to decide whether to hire the specialist:

  • Capabilities: which tasks the agent performs
  • Security & Compliance: data-handling policies and permission requirements
  • Interaction Schemas: how other agents communicate via A2A
🗂️

The registries — where expertise is published

Two discovery channels, two governance models:

  • Public registries (marketplaces): the global talent agency — list your specialist and license the expertise to thousands
  • Private registries: a secure, governed environment — internal workflows shared across departments
In one sentence

A2A transforms isolated agentic applications into foundational members of a global, interoperable digital workforce.

16

Implementing the A2A protocol

Two development moves: exposing your agent (supply) and connecting remote agents (demand).

To turn your agent into a hireable specialist, three steps — from business card to live endpoint:

🪪

1 · Agent Card

the formal specification: capabilities, security, and interaction schemas

🔁

2 · Agent Executor

the translation layer: A2A requests/responses ↔ framework calls (ADK, LangGraph, bespoke)

🌐

3 · A2A Endpoint

the agent published and discoverable on the network

On the demand side, the orchestrator understands user intent, manages the workflow, and delegates to remote A2A agents — autonomous contractors, bounded to their domain. Two connection patterns:

Pattern 1 · Direct point-to-point

Fixed, known endpoint — simple and predictable, ideal for stable integrations.

pythonRemoteA2aAgent with hardcoded endpoint
from google.adk.agents import LlmAgent
from google.adk.models import Gemini

def get_sales_dashboard(region: str) -> dict:
    """Build a data-bound sales dashboard for `region`."""
    data = fetch_sales(region)
    return {
        "version": "v0.9",
        "updateComponents": {
            "surfaceId": "sales",
            "components": [
                { "id": "root",  "component": "Column", "children": ["title", "total", "drill"] },
                { "id": "title", "component": "Text",   "text": { "path": "/title" }, "variant": "h1" },
                { "id": "total", "component": "Text",   "text": { "path": "/total" } },
                { "id": "drill", "component": "Button", "child": "drill-label",
                  "action": { "event": { "name": "expand_details" } } },
                { "id": "drill-label", "component": "Text", "text": "Drill Down" },
            ],
        },
    }

agent = LlmAgent(
    name="sales_agent",
    model=Gemini(model="gemini-flash-latest"),
    tools=[get_sales_dashboard],
)

# Conecte o conversor no setup do executor para que a resposta desta
# ferramenta vire uma parte A2UI:
#   from a2ui.adk.send_a2ui_to_client_toolset import A2uiPartConverter
#   A2aAgentExecutorConfig(event_converter=A2uiPartConverter(catalog, bypass_tool_check=True))

Pattern 2 · Discovery via Agent Registry

The orchestrator queries the registry and resolves the specialist dynamically — the foundation of the virtual workforce.

pythonregistry.get_remote_a2a_agent
agent = registry.get_remote_a2a_agent(
    capability="real_time_compliance",
)
# o registry resolve o Agent Card
# e devolve um agente pronto para uso
Figure 5 · the complete cycle

Exposure (supply side) publishes the specialist; consumption (demand side) discovers and delegates to it. Both sides meet at the Agent Card — the contract that makes the workforce interoperable.

17

The extensibility layer — and monetization

A2A solves fragmentation; extensions build rich transactional applications on top — and open the door to Agent-as-a-Service.

The A2A core is the transport and negotiation backbone. Rich transactional applications require higher-order capabilities — and the A2A Extensions framework standardizes them: advertise, negotiate, and execute optional functionality. Three foundational frameworks live as native extensions:

🪟

A2UI

dynamic, stateful user experiences.

🛒

UCP

autonomous, secure agentic commerce.

💳

AP2

trustworthy, verifiable agentic payments.

Monetizing A2A agents — the Agent-as-a-Service model

Following the SaaS paradigm, AaaS is a consumption-based model, sold through multiple channels. Google Cloud Marketplace serves as the monetization engine, and Gemini Enterprise acts as the agentic platform — with Agent Registries and a native A2A client, serving simultaneously as an AaaS platform (Assistant API) and a host for remote agents. A common hybrid pricing model: "fixed fee plus usage" — predictable base + overages per token/compute.

📦

Publish

expose the agent with an Agent Card

🔍

Discover

orchestrators find it in the registry

🤝

Negotiate

terms and extensions via A2A

Execute

the task runs on the specialist

💰

Monetize

consumption-based billing / marketplace

Permissionless microtransactions · x402 / L402

The extensions framework enables the x402 (or L402) pattern: the server intercepts an unpaid request and responds with HTTP 402 Payment Required + a machine-readable invoice. The calling agent pays autonomously and resends with a cryptographic proof-of-payment token. Result: pay-per-call endpoints with automated, strictly stateless billing.

18

Agent-to-UI Interoperability (A2UI)

Agents shouldn't just return JSON — they should return entire interfaces, securely.

The communication gap: ask a colleague "how did Q4 go by region?" and they draw a bar chart, circle the highlights, and add context. An agent returns raw JSON — and you build the chart yourself: import libraries, configure axes, manage state. That context switch breaks the vibe coding flow. A2UI changes the game: agents generate complete interactive UIs as output, not just JSON blobs.

Generative UI is the LLM creating interfaces dynamically at runtime, based on user intent and context. Instead of hardcoding every UI state, the model composes the right interface on demand: "compare Q4 sales by region" → the system assembles an interactive layout with cards, filters, and controls. The central challenge is security: code injection, XSS, and uncontrolled side effects.

🎼Analogy · The sheet music

The composer doesn't deliver the recording — they deliver the sheet music

The sheet music

The same sheet music plays on piano, orchestra, or synthesizer — each instrument interprets it with its own voice. A2UI is the sheet music of UI: the agent writes the intent, and any renderer (React, Angular, Lit, Flutter, Jetpack Compose, SwiftUI) performs it natively.

Separation of concerns = security

The agent does not generate executable code (a security nightmare) nor send pre-rendered pixels (no reflow, no interaction). It requests components from a trusted catalog; the client assembles them with its own library. "Compositional, like LEGO bricks — but the bricks are UI components from your design system."

The agent doesn't need to know the target (web, mobile, wearable, appliance) — it only knows the catalog and the examples. The catalog defines what's available, the agent decides the arrangement, the client assembles.

20

Generating A2UI: two patterns

The fundamental choice: where does the layout decision live — in the LLM or in the tool?

🧠

Pattern 1 · LLM generates A2UI directly (default)

intent-driven layout
  • the model owns the layout and adapts to user intent
  • the same agent responds to "compare regions" and "show trends" with different interfaces
  • in production: use the official a2ui-agent-sdk
🧩

Pattern 2 · Tool returns fixed structure (specialization)

input-driven layout
  • one tool call, zero LLM tokens on UI generation, fully predictable
  • right when the layout is deterministic from the inputs — the tool becomes a server-side template
  • the tool does two things: builds the structure with data bindings (path references, not f-strings) and returns it; the A2uiPartConverter intercepts and routes it to the client as an A2UI part — the tool remains a plain Python function
pythonSnippet 5 · the LLM-generates-UI pattern — tool as a template with data bindings
from google.adk.agents import LlmAgent
from google.adk.models import Gemini

def get_sales_dashboard(region: str) -> dict:
    """Build a data-bound sales dashboard for `region`."""
    data = fetch_sales(region)
    return {
        "version": "v0.9",
        "updateComponents": {
            "surfaceId": "sales",
            "components": [
                { "id": "root",  "component": "Column", "children": ["title", "total", "drill"] },
                { "id": "title", "component": "Text",   "text": { "path": "/title" }, "variant": "h1" },
                { "id": "total", "component": "Text",   "text": { "path": "/total" } },
                { "id": "drill", "component": "Button", "child": "drill-label",
                  "action": { "event": { "name": "expand_details" } } },
                { "id": "drill-label", "component": "Text", "text": "Drill Down" },
            ],
        },
    }

agent = LlmAgent(
    name="sales_agent",
    model=Gemini(model="gemini-flash-latest"),
    tools=[get_sales_dashboard],
)

# Conecte o conversor no setup do executor para que a resposta desta
# ferramenta vire uma parte A2UI:
#   from a2ui.adk.send_a2ui_to_client_toolset import A2uiPartConverter
#   A2aAgentExecutorConfig(event_converter=A2uiPartConverter(catalog, bypass_tool_check=True))

Data values arrive in a parallel updateDataModel message that resolves {path: "/title"} references — clients re-render on data updates without resending the structure. And the LLM only sees the tool's structured response (not the rendered UI), so context stays focused.

User queryOutput typeWho decides the layout
"What's the average?"Data (text)
"Compare these regions"LLM-generated UIthe model (intent)
"Show my dashboard"Tool-built UIdeterministic template
API-to-APIData (JSON)
Decision rule

Use A2UI when interaction/visualization adds value beyond raw data. Choose the pattern by who owns the layout: the LLM (intent-driven) or a deterministic template (input-driven).

21

Interactive artifacts & the Canvas

When the UI stops being output and becomes a living workspace, edited by agent and human in real time.

Traditional chat is linear: each response is static. The Canvas is a persistent workspace that agent and user edit together — a living document where the agent modifies sections and you edit manually, in real time. Combined with A2UI, persistence meets interactivity: the UI isn't just rendered — it's a communication medium. The agent observes your interactions and responds accordingly.

👤

User

edits, clicks, adjusts

🤖

Agent

observes and responds

🗒️

Canvas

persistent workspace + interactive A2UI

Best practices — let the LLM generate A2UI

Writing A2UI JSON by hand is tedious. Use the official SDK (pip install a2ui-agent-sdk): the A2uiSchemaManager builds the system prompt with the catalog schema + worked examples; the catalog ships its own JSON-Schema validator; the SDK provides a parser for <a2ui-json> blocks and validates and retries on schema errors.

pythonSnippet 6 · A2uiSchemaManager
from a2ui_agent_sdk import A2uiSchemaManager

manager = A2uiSchemaManager(catalog="basic")
system_prompt = manager.build_prompt()   # schema + exemplos

try:
    ui = manager.parse(llm_output)        # valida o JSON
except SchemaError:
    ui = fallback_text(llm_output)        # nunca vaze payload malformado
Production

Wrap create_ui() in try/except and fall back to text on validation failures. LLM output is stochastic — the renderer should never see a malformed payload.

Hybrid output for flexibility

Provide data and UI together — each consumer chooses. API clients ignore the ui field and use data; human-facing clients render the A2UI message.

jsonSnippet 7 · hybrid output schema
{
  "data": { "avg": 42.7, "regions": ["…"] },                                  // para APIs
  "ui":   { "version": "v0.9",
           "updateComponents": { "surfaceId": "main", "components": ["…A2UI…"] } }, // para humanos
  "ui_available": true                                                    // sinaliza a UI
}
A2UI summary

Generative UI creates interfaces at runtime from intent; A2UI is Google's open-source, framework-agnostic standard for declaring UI intent. The same message renders natively in Lit, Flutter, React, or your design system — and the security model ensures the agent does not inject arbitrary code, it only requests components from a trusted catalog.

22

Agents and commerce — AP2 and UCP

From "read" operations to actions with real financial implications — the 2 AM burrito run.

The previous sections covered "read" operations (MCP, A2A, A2UI). The natural evolution: agents need to perform "actions" with real-world financial implications. Prioritizing commerce protocols + a robust operational harness is what turns them into industry standards for transactions.

🌯Analogy · The 2 AM delivery

You and your hungry roommates deploy an AI assistant to order food

UCP · the ultimate delivery app

In 2024, the AI opened Chrome, clicked "extra guacamole" on a poorly designed website, and hoped it wouldn't crash. With UCP, every restaurant publishes its menu, hours, and customizations in a standard machine language. The AI asks "are you still open? do you have a veggie burrito?", assembles the order, and the restaurant responds with taxes, delivery fee, and ETA. "UCP is how your AI talks to the store, browses the options, and assembles the perfect order."

AP2 · your parents' card with strict rules

Food's in the cart, and the AI needs to pay — and you're not about to type your debit PIN into a prompt and say "go for it." AP2 is an open protocol with a common language for secure transactions. The Mandate: you approve the rule "spend up to $25 at Taco Bell." The Handshake: the AI presents an encrypted promissory note signed by you; the restaurant's bank verifies the signature. No hidden fees: if the restaurant tries to charge $50 instead of $18.50, AP2 blocks it instantly. "AP2 is the vault that lets your AI pay with your money but ensures it never accidentally buys a $1,000 TV."

1

Discover the menu

the restaurant publishes its menu and hours in a standard machine language.

UCP
2

Assemble the order

the AI asks, customizes, and builds the cart; the restaurant responds with taxes, fees, and ETA.

UCP
3

Check the mandate

the digital rule you approved ("up to $25") is verified before any payment.

AP2
4

Signed handshake

the AI presents the encrypted promissory note; the restaurant's bank validates the digital signature.

AP2
5

Block discrepancies

a charge outside what was signed ($50 ≠ $18.50) is rejected instantly — no hidden fees.

AP2
6

Confirm the order

transaction verified, order confirmed — the burrito is on its way.

UCP
UCPAP2
Rolethe brain that decides what to buy — handles the menu and puts food in the cartthe wallet that handles how to pay securely, without falling for scams
Integrates withany business providerthe payments ecosystem
Pillarsunified integration · shared language · extensible architecture · security-firstauthorization & auditability · authenticity of intent · accountability for agent errors and hallucinations

Key characteristics and benefits of the protocols: typed schemas, security and open source — the combination that directly tackles integration debt and guarantees vendor neutrality.

Hands-on

The lab recommends the codelab codelabs.developers.google.com/next26/adk-agent-commerce to see AP2 + UCP running together.

23

Conclusion: from mechanic to architect

Adopting the foundational standards eliminates the crushing technical debt of bespoke integrations.

1

Standards eliminate debt

Adopting MCP, A2A, A2UI, AP2, and UCP eliminates the crushing technical debt of bespoke integrations — and frees up full focus to orchestrate high-value business logic.

2

A paradigm shift

The developer stops being the mechanic wiring fragile APIs and becomes the architect of a global autonomous workforce.

3

New economies of scale

As standardized communication layers mature, they unlock entirely new economies of scale — transforming how enterprise software is built, consumed, and monetized.

"The next evolution of software isn't written:
it's orchestrated by interoperable agents."
— Agent Tools & Interoperability · Google · May 2026
24

Quiz — test your mastery of the stack

8 questions on protocols, architecture, and agentic commerce.

pergunta 1 / 8
0/8

25

Cheatsheets

Three quick references to copy and paste into your workflow.

mcp-consumption.md
# MCP — CHECKLIST DE CONSUMOFAÇA auditar servidores públicos antes de conectar (revise o código) usar RAG para ferramentas (carregar/descartar schemas dinamicamente) preferir API Gateways e registries internos (schemas governados) debugar com MCP Inspector (dados raw, não prompt às cegas) incluir HITL (mostrar inputs antes da chamada) logar uso de ferramentas para auditoriaNÃO FAÇA✗ construir se pode consumir — procure um servidor MCP existente✗ MCPs públicos não verificados em produção✗ hardcodar credenciais — use variáveis de ambiente✗ conectar em produção — use projeto dev + dados ofuscados✗ usar para updates — read-only com dados reais✗ acesso amplo a todos os projetos — escopo específico
a2a-implementation.md
# A2A — RECEITA DE IMPLEMENTAÇÃOEXPOR (supply side)1. definir o Agent Card  → capabilities · security · interaction schemas 2. implementar o Agent Executor (camada de tradução) → requests/responses A2A ↔ framework (ADK / LangGraph / bespoke) 3. estabelecer o endpoint A2ACONECTAR (demand side)# Padrão 1 · ponto a ponto diretoagent = RemoteA2aAgent(name="x", url="https://…/a2a")# Padrão 2 · descoberta via registryagent = registry.get_remote_a2a_agent(capability="…")REGRA DE DECISÃOchamador precisa de resultado      → ferramenta (MCP) chamador precisa de responsabilidade → agente (A2A)
a2ui-quickref.md
# A2UI — REFERÊNCIA RÁPIDACATÁLOGO BÁSICO (18 componentes)layout:      Row · Column · List display:     Text · Image · Icon · Divider containers:  Card · Modal · Tabs media:       Video · AudioPlayer interactive: Button · TextField · CheckBox · Slider · DateTimeInput · ChoicePickerDOIS PADRÕES DE GERAÇÃO1. LLM gera A2UI     → layout guiado pela intenção (use a2ui-agent-sdk) 2. Ferramenta devolve → layout determinístico, zero tokens de UIQUANDO USAR"qual é a média?"        → dados (texto) "compare estas regiões"  → UI gerada pelo LLM "mostre meu dashboard"   → UI construída pela ferramenta API-para-API             → dados (JSON)SEGURANÇAagente pede componentes do catálogo — nunca injeta código arbitrário
26

Start now — checklists

Three practical tracks. Check off what you've done — progress is saved in your browser.

🔌Adopt MCP in your workflow

Audit a public MCP server before connecting
Configure credentials via environment variables
Connect and validate schemas via handshake
Debug a payload with the MCP Inspector
Add HITL before sensitive calls
0 / 5

🤖Build a multi-agent architecture

Specialize: partition the monolith into focused sub-agents
Apply the build vs. buy lens to each specialist
Expose an agent with Agent Card + Executor + endpoint
Connect a remote specialist via registry
Publish the specialist to a registry (public or private)
0 / 5

🪟Enable generative UI and commerce

Install the a2ui-agent-sdk and generate a UI with the LLM
Map your design system components to the catalog
Choose the generation pattern (LLM vs. tool)
Define an AP2 mandate for a test transaction
Run the agent commerce codelab (UCP + AP2)
0 / 5
27

Glossary

The paper's essential terms, in plain language.

MCP
Model Context Protocol — the "USB-C" that connects models to databases, filesystems, and web APIs via a standardized socket.
A2A
Agent-to-Agent — a protocol for agents to discover, negotiate, and delegate work across network boundaries.
A2UI
Agent-to-User Interface — an open-source standard for agents to declare UI intent securely (the "sheet music").
AP2
Agent Payments Protocol — secure, verifiable agentic payments with a mandate and signed handshake.
UCP
Universal Commerce Protocol — a standard language for agents to discover products, assemble orders, and interact with commerce.
Agent Card
an agent's standardized "résumé": capabilities, security/compliance, and interaction schemas.
Agent Registry
a directory (public or private) where specialists are published and discovered — the talent agency of the virtual workforce.
Harness
the scaffolding around the model — tools, transport, memory, and security. Agent = Model + Harness.
Orchestrator
the agent (or dev) that understands intent, manages the workflow, and delegates to specialists — instead of wiring every connection.
Conductor
the opposite role: manual, point-to-point wiring of every integration — what the protocols eliminate.
NxM Problem
the combinatorial explosion of N models × M tools (O(N×M)); MCP reduces it to O(N+M).
stdio / SSE
the two MCP transports: stdio for local subprocess/prototyping; SSE over HTTP for real-time streaming, local or remote.
Generative UI
LLMs creating interfaces dynamically at runtime, based on user intent and context.
Agent-as-a-Service (AaaS)
a consumption-based monetization model for agents — the SaaS of the agentic workforce.
x402 / L402
permissionless microtransaction standards: HTTP 402 + machine-readable invoice + cryptographic proof-of-payment token.
Mandate (AP2)
the human-approved digital rule that limits what the agent can spend — e.g., "up to $25 at Taco Bell."
28

Continue the journey

The companion papers in the series — each guide follows the same interactive, trilingual format.

HUBstarting point

Agents Whitepaper Series — hub

All the guides in the series, in one place.

indexnavigation
D1foundations

The New SDLC with Vibe Coding

Agentic Engineering, the Factory Model, and the Agent = Model + Harness equation.

vibe codingfactory modelharness
D3context & memory

Context Engineering: Sessions, Memory

How to assemble the right information inside the context window, turn by turn.

sessionsmemoryRAG
D4security & evaluation

Vibe Coding Agent Security and Evaluation

How to evaluate and protect agents: quality gates, metrics, and production security.

evaluationquality gatesagent security
D5production

Spec-Driven Production Grade Development

Spec-driven development to bring vibe coding to production grade.

spec-drivenproduction gradeworkflow
29

References

The 21 endnotes from the original paper, in the order they appear.

Paper citation

PATLOLLA, Kanchana; OLEJNICZAK, Łukasz; IPPOLITO, Pier Paolo. "Agent Tools & Interoperability" — Agents Whitepaper Series, Google, May 2026.