- unwind ai
- Posts
- AI Agent Protocols 101
AI Agent Protocols 101
How to fix AI Agent hallucinations and paralysis with hierarchical context engineering
New agent protocols are dropping every month.
MCP, A2A, AG-UI, A2UI, AP2, UCP. The list keeps growing.
Most explanations compare them like competing frameworks. "MCP vs A2A." "When to use AG-UI vs A2UI." This framing is wrong.
These aren't competing standards. They're layers in a stack.
Each protocol solves a different problem at a different layer. Once you see them as layers, you know exactly when to reach for what.
The stack in 60 seconds
Think of agent protocols like the networking stack.
TCP/IP handles packets. HTTP handles requests. HTML handles content.
Each layer does one thing well.

Multiple layers. Zero overlap. Each does exactly one job.
MCP: Agent to tools
Anthropic shipped MCP in late 2024. It solved a problem everyone had: connecting agents to external resources was a mess.
Before MCP, every integration was custom. Agent needs a database? Write custom code. Different agent, same database? Start over.
MCP is USB-C for AI. One standard connector. Build an MCP server for your database, every MCP-compatible agent can use it. Build an MCP client in your agent, it works with every MCP server.
This is your foundation. If your agent touches anything external, it goes through MCP.

A2A: Agent to agent
Google launched A2A in April 2025. By June, they donated it to the Linux Foundation. IBM killed their competing protocol (ACP) and merged it in. Now AWS, Microsoft, Cisco, Salesforce, and 100+ companies back the same standard.
A2A's core concept is the "Agent Card," a JSON document where agents advertise their capabilities and endpoints. Think of it as a business card other agents read programmatically. One agent discovers another's capabilities, sends tasks, receives results.
Use this when one agent isn't enough. Complex workflows. Specialized agents collaborating. Delegation chains.

AG-UI: Agent to frontend
CopilotKit released AG-UI in May 2025. It solves why your agent demo feels like a hackathon project while Cursor feels like magic.
The problem: agents don't work like normal APIs. They stream tokens. They call tools mid-response. They need human approval for sensitive actions. They maintain state across long conversations.
Traditional REST doesn't handle this. You end up with custom WebSocket hacks, janky polling, state sync nightmares.
AG-UI standardizes all of it. Your frontend knows when the agent is thinking, calling a tool, waiting for approval, or updating state.
Use this for any user-facing agent. If humans interact through a UI, AG-UI is your layer.

A2UI: Agent-generated interfaces
Google announced A2UI in December 2025. It answers a simple question: why should agents only return text?
Sometimes users need a form. A chart. A confirmation dialog. A product comparison card. A2UI lets agents generate these directly. The agent outputs a structured format, the frontend renders it.
AG-UI is the pipe. A2UI is what flows through it.

AP2: Agent payments
Google announced AP2 in September 2025 with Mastercard, PayPal, Coinbase, Stripe, and 60+ partners.
The problem: traditional payments assume a human clicks "buy." When an agent makes a purchase, how do you prove authorization? Handle disputes? Assign liability?
AP2 introduces "Mandates," cryptographically-signed credentials proving user intent. An Intent Mandate captures what the user wants. A Cart Mandate captures what they approved. A Payment Mandate authorizes the transaction. Every step has cryptographic proof.
Use this any time agents handle money. Purchases, subscriptions, bookings.

UCP: Agent commerce
UCP is the newest layer. Google and Shopify co-developed it, announced January 2026. Walmart, Target, Etsy, Best Buy, Home Depot, and 20+ retailers already committed.
The problem: commerce is fragmented. Every retailer has different APIs for discovery, inventory, carts, checkout, loyalty, returns. Building a shopping agent means custom integrations for each merchant.
UCP standardizes all of it. Agents discover merchant capabilities through profiles. One integration handle checkout, inventory, subscriptions, post-purchase.
The clever part: UCP works over REST, MCP, or A2A depending on what the merchant supports. It uses AP2 for payment security. It's a layer built on the other layers.

Multiple Protocols in Action
You ask your shopping agent for running shoes under $150.
MCP pulls your size and purchase history. A2A coordinates with price-comparison and inventory agents across retailers. UCP queries merchants for real-time stock and pricing. Results stream to your phone via AG-UI. The agent renders a comparison card using A2UI. You tap buy. AP2 signs the payment with cryptographic proof of your intent.
Six protocols. One flow. Each layer did exactly one job.
What to actually use
Start simple. Add layers as complexity grows.
Building a simple agent with tools? MCP only. This covers 80% of basic use cases.
Multiple agents coordinating? Add A2A. Each agent uses MCP for its tools. A2A handles the coordination between them.
Users interact through a UI? Add AG-UI. Stream state to your frontend. Handle human-in-the-loop approvals. Show tool calls in progress.
Need richer interfaces than text? Add A2UI. Generate forms, charts, interactive widgets instead of describing them.
Agents handle money? Add AP2. Don't roll your own payment authorization for agents.
Building commerce features? Add UCP. Don't build custom integrations with every retailer.
The layers are independent. Use one, use all six. Add them as your use case demands.
The mental model
"Should I use MCP or A2A?" Wrong framing. MCP connects agents to tools. A2A connects agents to agents. Different layers. You'll probably need both.
A year ago, this space looked chaotic. Now there's real convergence. The major players aligned around complementary layers rather than competing standards.
More protocols will ship. The ones that stick will fill gaps in the stack, not duplicate existing layers.
Layers, not competitors. Each protocol doing one job well.
Pick one. Ship something this week. Add layers as you need them.
We share in-depth blogs and tutorials like this 2-3 times a week, to help you stay ahead in the world of AI. If you're serious about leveling up your AI skills and staying ahead of the curve, subscribe now and be the first to access our latest tutorials.
Reply