Loading patterns…
AG-UI Protocol (Agent-User Interaction)(AGUI)
Open, event-based protocol (originated by CopilotKit, 2025) that standardizes the last mile between an agent backend and any frontend. The backend streams roughly 16 structured event types (text and token deltas, tool-call start/args/result, state snapshots and deltas, run lifecycle, and cancellation) over SSE, WebSocket, or plain HTTP, so a frontend can render live agent activity and feed user actions back into the same execution loop, framework-agnostically. Native emitters exist for LangGraph, CrewAI, Mastra, and the Microsoft Agent Framework, among others. It is the agent-to-UI edge of the protocol triangle, sitting beside MCP (agent-to-tool) and A2A (agent-to-agent). Distinct from `chat-interface-patterns`: those are frontend rendering conventions, whereas AG-UI is the wire protocol that carries the underlying event stream.
In 30 seconds
- What
- Standardized event protocol streaming agent activity (text, tool calls, state, lifecycle) to any frontend over SSE/WebSocket/HTTP, enabling bidirectional control and live rendering.
- When to use
- Building agent UX where frontend must display live execution, support mid-run interrupts (pause, approve, edit, cancel), and work across multiple backend frameworks.
- Watch out
- Event ordering and state consistency breaks if frontend and backend clocks drift or network drops packets; requires robust replay and reconciliation logic.
Ask the AI expert about this pattern
Opens the assistant with your question prefilled. You review it before sending.
AG-UI Protocol (Agent-User Interaction): Overview
Open, event-based protocol (originated by CopilotKit, 2025) that standardizes the last mile between an agent backend and any frontend. The backend streams roughly 16 structured event types (text and token deltas, tool-call start/args/result, state snapshots and deltas, run lifecycle, and cancellation) over SSE, WebSocket, or plain HTTP, so a frontend can render live agent activity and feed user actions back into the same execution loop, framework-agnostically. Native emitters exist for LangGraph, CrewAI, Mastra, and the Microsoft Agent Framework, among others. It is the agent-to-UI edge of the protocol triangle, sitting beside MCP (agent-to-tool) and A2A (agent-to-agent). Distinct from `chat-interface-patterns`: those are frontend rendering conventions, whereas AG-UI is the wire protocol that carries the underlying event stream.
- Roughly 16 structured event types: token deltas, tool-call lifecycle, state deltas, run lifecycle, cancel
- Transport-agnostic streaming over SSE, WebSocket, or plain HTTP
- Bidirectional loop: frontend renders activity and feeds user actions back to the agent
- Shared-state sync via a full snapshot plus incremental deltas
- Framework-agnostic emitters (LangGraph, CrewAI, Mastra, Microsoft Agent Framework)
- Mid-run interrupts: pause, approve, edit, retry, and cancel a running agent
Get the Agent UX field guide
All 21 agent-UX patterns condensed into one guide: what each is, when to reach for it, and what bites in production. The link arrives with your confirmation, alongside the weekly Agent Architect.
Weekly email, one-click unsubscribe. We only use your address to send the briefing.
References
The papers, specifications, and repositories this pattern is based on.
From the engineer behind this catalog
Get your agent architecture reviewed
This page documents one pattern. Your system runs dozens, and most failures live in how they fit together. Have the whole design reviewed against the 288 patterns in this catalog: architecture, reliability, evaluation and cost, every finding mapped to the pattern that fixes it.
€750 instead of €1,500, one week, written report and walkthrough call, until 30 September