AG-UI standardizes bi-directional event streams between agent backends and frontends so chat, tools, shared state, and human approvals work consistently across frameworks and clients.
Overview
AG-UI (Agent–User Interaction) is an event-based wire protocol that connects any agent runtime to any client application. Instead of bespoke request/response APIs per framework, agents emit typed lifecycle, message, tool, state, and reasoning events that web, mobile, terminal, or chat clients can render uniformly.
Runs begin with a structured input carrying conversation history, frontend-exposed tools, shared state, and context. The agent responds with a stream from eight event families covering text streaming, tool calls, JSON Patch state deltas, human-in-the-loop interrupts, subagent delegation, multimodal attachments, and custom payloads. Transports include HTTP with Server-Sent Events and a binary Protobuf binding; middleware can adapt other sources.
Official client and server SDKs exist for TypeScript, Python, and .NET, with community ports in several other languages. A scaffolding CLI can generate Next.js or terminal starter apps wired to supported agent frameworks such as LangChain, CrewAI, Google ADK, Microsoft Agent Framework, and AWS Strands.
AG-UI complements MCP for tool access and A2A for agent-to-agent work. Generative UI specs like A2UI can ride on AG-UI as payload types. CopilotKit originated the protocol and ships React and other UI clients; demos in the Dojo illustrate each building block interactively.
Key features
- Typed bidirectional agent event streams
- Streaming multi-turn chat with cancel and resume
- Shared JSON state with patch sync
- Frontend-executed tools and human interrupts
- Subagent delegation with traced events
- Multimodal user and tool I/O
- HTTP SSE and Protobuf transports
- CLI project scaffolding for agents
Use cases
- Embedding agents in web or mobile apps
- Terminal or Slack-style agent clients
- Cross-framework agent UI portability
- Human approval flows mid-run
- Showing reasoning and tool progress live