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.
Agent UX Kit
Six core agent UI patterns as production-ready React, TypeScript and Tailwind components, each with a written spec. Pre-order now: delivered by 15 December 2026, fully refundable until then.
References
The papers, specifications, and repositories this pattern is based on.
ReasoningLayer Box
Run these agents in your own office, with unlimited tokens.
The ReasoningLayer Box puts the models, the memory and your AI workers on a box at your place. Nothing leaves the building, nothing is metered, and there is no price per person. The design partner program is open by application: our lowest price and a direct say in the roadmap.
- No token meter, no credits
- Your data never leaves your building
- One box for a team of 10 to 20