Overview
While MCP connects agents to tools and A2A enables agent-to-agent communication, AG-UI addresses the user-facing layer: how do agents interact with humans through modern applications?
AG-UI streams structured events between agent backends and frontends, enabling rich, interactive experiences.
The Protocol Stack
┌─────────────────────────────────────────┐
│ User Interface (AG-UI) │
└────────────────────┬────────────────────┘
│
┌────────────────────┴────────────────────┐
│ Agent Backend │
├─────────────────┬───────────────────────┤
│ Tools (MCP) │ Other Agents (A2A) │
└─────────────────┴───────────────────────┘
Core Event Types (~17 total)
Message Events
TEXT_MESSAGE_START: Begin streamingTEXT_MESSAGE_CONTENT: Token chunksTEXT_MESSAGE_END: Complete message
Tool Events
TOOL_CALL: Request tool executionTOOL_RESULT: Return results
State Events
STATE_DELTA: Incremental patchesSTATE_SNAPSHOT: Full sync
Control Events
INTERRUPT: Pause for user confirmationERROR: Report failuresLIFECYCLE: Start/stop signals
Key Features
Real-Time Streaming
Tokens stream as generated. Works over SSE, WebSockets, or webhooks.
Shared State
Using STATE_DELTA, agents and frontends stay synchronized with minimal data transfer.
Human-in-the-Loop
The INTERRUPT event enables safety-critical patterns:
{
"type": "INTERRUPT",
"action": "delete_all_records",
"message": "Are you sure?",
"options": ["approve", "deny"]
}
Framework Support
First-party integrations:
- Microsoft Agent Framework
- Google ADK
- AWS Strands Agents
- LangGraph
- CrewAI
Adoption
- 619K+ Python downloads/week
- 178K+ JavaScript downloads/week
- Oracle adopted for Agent Spec
When to Use AG-UI
Use AG-UI for:
- Chat interfaces with streaming
- Collaborative AI editing
- Human-in-the-loop workflows
- Real-time dashboards
Don't use AG-UI for:
- Backend orchestration (use A2A)
- Tool calling (use MCP)