AG-UI Protocol
What is AG-UIβ
AG-UI (Agent User Interaction Protocol) is an open, event-based protocol that standardizes how AI agents communicate with user-facing applications. Created by CopilotKit, it defines the wire format for streaming agent output (text, tool calls, state updates, reasoning) to frontends in real time.
- Status: Actively maintained, heading toward v1.0
- License: MIT
- GitHub stars: 14.4K
- Contributors: 121+
Why it's interestingβ
- Fills a protocol gap β MCP (Anthropic) handles agentβtools, A2A (Google) handles agentβagent; AG-UI handles agentβUI.
- Event-based streaming β ~16 typed event types covering lifecycle, text messages, tool calls, state sync, reasoning, and activities.
- Transport-agnostic β SSE, WebSockets, binary, or webhooks. The events are the contract, not the transport.
- Human-in-the-loop first-class β interrupts, typed approvals, approve-with-edits pattern, full audit trail.
- Massive framework support β Microsoft Agent Framework, Google ADK, AWS Bedrock AgentCore, LangGraph, CrewAI, Mastra, Pydantic AI, LlamaIndex.
- Language-agnostic β SDKs in TypeScript, Python, Go, Kotlin, Rust, Ruby, Java.
When to useβ
- Building custom agent-powered UIs where you need a standardized event format
- Multi-agent systems that report progress to users in real time
- Teams that want to swap agent backends (LangGraph β CrewAI) without changing frontend code
- Applications requiring human-in-the-loop approval flows with audit trails
When NOT to useβ
- Simple chat UIs where a higher-level SDK (TanStack AI, Vercel AI SDK) handles the protocol layer for you
- If you're already using TanStack AI or CopilotKit β you're speaking AG-UI under the hood already
- Projects that don't need real-time streaming (batch-style AI processing)
Protocol stack positioningβ
βββββββββββββββββββββββββββββββββββββββββββββββββββ
β A2A (Google) Agent β Agent coordination β
βββββββββββββββββββββββββββββββββββββββββββββββββββ€
β MCP (Anthropic) Agent β Tools & Data β
βββββββββββββββββββββββββββββββββββββββββββββββββββ€
β AG-UI (CopilotKit) Agent β User Interface β
βββββββββββββββββββββββββββββββββββββββββββββββββββ
Resourcesβ
- Official docs
- GitHub
- Interactive Dojo β live examples of all event types
- CopilotKit β reference implementation