The ABCs of agent building

By Google Cloud Tech

Share:

Key Concepts

  • ADK (Agent Development Kit): Google’s open-source framework for building and deploying AI agents.
  • MCP (Model Context Protocol): A standard for connecting agents to external tools and data sources dynamically.
  • A2A (Agent-to-Agent Protocol): A framework for agent discovery and inter-agent communication.
  • UCP (Universal Commerce Protocol): A standard for machine-readable merchant discovery and automated checkout.
  • AP2 (Agent Payments Protocol): A security layer for managing spending limits, mandates, and audit trails.
  • A2UI (Agent-to-User Interface Protocol): A declarative UI framework using 18 primitives to render interfaces on the fly.
  • AG-UI (Agent-to-User Streaming Protocol): A standard for streaming real-time agent events (tool calls, thoughts, results) to frontends.

1. Model Context Protocol (MCP)

  • Problem: Traditional API integration requires hard-coding dozens of tools, which is unscalable.
  • Solution: MCP allows agents to connect to "MCP servers" that dynamically expose available tools at runtime.
  • Application: The kitchen manager agent connects to three MCP servers (inventory, recipes, supplier emails) using only three lines of code in ADK.
  • Benefit: Simplifies prototyping; adding a new data source only requires pointing to a new MCP server URL.

2. Agent-to-Agent Protocol (A2A)

  • Problem: Agents often lack specialized knowledge (e.g., real-time pricing or quality grades) held by other systems.
  • Solution: Standardized agent discovery via "agent cards" hosted at well-known URLs.
  • Methodology: The primary agent fetches the card, discovers capabilities, and sends messages to the specialist agent without needing to know the underlying framework or implementation.
  • Benefit: Enables organizational scaling where different teams build specialized agents that can be delegated tasks via a simple URL.

3. Universal Commerce Protocol (UCP)

  • Problem: Agents cannot "browse" websites like humans; they require machine-readable data for catalogs and checkout.
  • Solution: A standardized endpoint (/.well-known/ucp) that provides structured product discovery and checkout flows.
  • Application: The agent sends a typed JSON request containing line items and quantities, eliminating the need for HTML parsing or guessing checkout steps.

4. Agent Payments Protocol (AP2)

  • Problem: Lack of audit trails, spending limits, and authorization guardrails in automated purchasing.
  • Solution: Introduces Typed Mandates.
    • Checkout Mandate: Defines approved merchants and purchase types.
    • Payment Mandate: Enforces spending limits and payment methods.
    • Signed Receipts: Creates an immutable audit trail for every transaction.
  • Benefit: Moves security from "instructions" (which are unreliable) to "enforceable protocol guardrails."

5. Agent-to-User Interface Protocol (A2UI)

  • Problem: Agents typically return walls of text, which are poor for user interaction.
  • Solution: Uses 18 UI primitives (cards, buttons, sliders, etc.) to compose interfaces declaratively.
  • Methodology: The agent generates a JSON payload containing a rendering surface, a component tree, and a data model.
  • Benefit: Decouples the agent logic from the frontend; the same JSON payload can be rendered natively by different frameworks like Lit, Angular, or Flutter.

6. Agent-to-User Streaming Protocol (AG-UI)

  • Problem: Users often face long wait times with no feedback while an agent processes complex tasks.
  • Solution: Standardizes streaming events (e.g., text_message, tool_call_result, run_finished).
  • Benefit: Provides real-time transparency. The user can watch the agent execute the entire chain—from checking inventory (MCP) to placing an order (UCP) and receiving a receipt (AP2)—as it happens.

Synthesis and Conclusion

The transition from a "plain" agent to a capable system requires moving away from human-centric interfaces (HTML, manual browsing) toward machine-readable protocols.

  • Data & Expertise: MCP and A2A provide the "brain" and "knowledge."
  • Commerce & Security: UCP and AP2 provide the "action" and "governance."
  • Interaction: A2UI and AG-UI provide the "visibility" and "usability."

Actionable Insight: These protocols are modular. Developers should not attempt to implement all six at once but rather adopt them based on the specific bottleneck—whether it is data access, inter-agent collaboration, or user experience—using the ADK framework to simplify the integration process.

Chat with this Video

AI-Powered

Load the transcript when you're ready to chat so the initial page stays lighter.

Related Videos

Ready to summarize another video?

Summarize YouTube Video