AG-UI Protocol
Last reviewed
May 20, 2026
Sources
No citations yet
Review status
Needs citations
Revision
v1 ยท 3,870 words
Improve this article
Add missing citations, update stale details, or suggest a clearer explanation.
Last reviewed
May 20, 2026
Sources
No citations yet
Review status
Needs citations
Revision
v1 ยท 3,870 words
Add missing citations, update stale details, or suggest a clearer explanation.
The AG-UI Protocol (Agent-User Interaction Protocol) is an open, event-based protocol that standardizes how AI agents communicate with user-facing applications. It defines a streaming wire format, typically delivered over Server-Sent Events, that lets an agent backend emit a continuous sequence of typed JSON events (messages, tool calls, state deltas, lifecycle signals) which a frontend consumes in real time.[^1][^2] AG-UI was created by the team at CopilotKit and announced in May 2025 to address the agent-to-user leg of the emerging agent protocol stack, complementing the Model Context Protocol (agent-to-tool) and the Agent2Agent Protocol (agent-to-agent).[^1][^3] The protocol is published under the MIT license at github.com/ag-ui-protocol/ag-ui and has been integrated by major framework and cloud vendors including Microsoft, Google, Amazon, Oracle, and a range of open-source agent frameworks such as LangGraph, CrewAI, Mastra, Pydantic AI, and Agno.[^2][^4][^5]
| Attribute | Value |
|---|---|
| Full name | Agent-User Interaction Protocol |
| Short name | AG-UI |
| Creator | CopilotKit (Tawkit, Inc.) |
| CEO / co-founder | Atai Barkai |
| Initial announcement | May 12, 2025 |
| Repository | github.com/ag-ui-protocol/ag-ui |
| License | MIT |
| Transport | HTTP POST + Server-Sent Events (binary and WebSocket optional) |
| Standardized event types | ~16 across 5 categories |
| Reference SDKs | TypeScript, Python; community: Kotlin, Go, Dart, Java, Rust |
| Companion protocols | MCP, A2A |
| Series A funding (CopilotKit) | $27M, May 2026 |
The 2024 to 2026 wave of agentic systems exposed a recurring engineering pain point: connecting a non-deterministic, long-running agent backend to an interactive frontend was almost always handled with bespoke code. Teams reinvented streaming chat layers, tool-call rendering, intermediate "thinking" UI, partial state updates, and human-in-the-loop approval flows for every project, often using different mechanisms (WebSockets, ad hoc SSE encodings, JSON-streaming over HTTP, polling, framework-specific stream formats). The result was tight coupling between the choice of agent framework and the frontend implementation, and a lack of portability between backends such as LangChain, LangGraph, and CrewAI.[^1][^6]
CopilotKit, an open-source library for building in-app AI copilots, had repeatedly hit this problem while shipping production integrations. Through partnerships with the LangGraph and CrewAI teams, the company began factoring out a shared event vocabulary that both sides of the connection could agree on. That work was released in May 2025 as AG-UI.[^1][^4] The protocol was framed as the third member of a three-protocol agent stack:
CopilotKit positions the three as complementary layers of a single stack rather than as competing standards. In a typical end-to-end system, a frontend connects to an orchestrator via AG-UI, the orchestrator delegates to specialist agents over A2A, and individual agents fetch data and invoke side effects through MCP servers.[^3][^7]
The announcement post "Introducing AG-UI: The Protocol Where Agents Meet Users" was published on the CopilotKit blog and cross-posted on DEV Community on May 12 to 13, 2025, authored by CopilotKit developer-relations engineer Nathan Tarbert.[^1][^6] Initial materials introduced the protocol specification, a reference TypeScript SDK, a Python SDK, the ag-ui-protocol/ag-ui GitHub organization, and reference adapters for LangGraph and CrewAI. A dedicated documentation site at docs.ag-ui.com was launched alongside the announcement, including an interactive playground and a quickstart based on npx create-ag-ui-app.[^1][^2]
Adoption broadened over the following twelve months. By late 2025 the project had added first-party integrations with Microsoft Agent Framework, Google ADK, AWS Strands Agents, Mastra, Pydantic AI, Agno, LlamaIndex, and AG2.[^2][^8] On December 18, 2025, Oracle announced an AG-UI integration for its Open Agent Specification (Agent Spec), enabling Agent Spec JSON configurations to expose AG-UI endpoints across compatible runtimes including LangGraph, WayFlow, and CrewAI.[^5] In May 2026, CopilotKit raised a $27 million Series A funding round (led by Glilot Capital, NFX, and SignalFire) explicitly tied to AG-UI adoption, citing integrations from Google, Microsoft, Amazon, and Oracle as well as enterprise users such as Deutsche Telekom, Docusign, Cisco, and S&P Global.[^9][^10] CopilotKit's CEO Atai Barkai (previously an engineer on media infrastructure at Meta and lead developer for the Doximity iOS app) led the protocol's commercial development.[^9]
By the time of the Series A, the GitHub repository reported roughly 13.7k stars, 1.2k forks, and 86 watchers under the MIT license, with active biweekly working-group meetings.[^2] Microsoft's Agent Framework documentation, published November 7, 2025 and updated in April 2026, advertised support for all seven canonical AG-UI feature areas (agentic chat, backend tool rendering, human-in-the-loop, agentic generative UI, tool-based generative UI, shared state, and predictive state updates) through an Microsoft.Agents.AI.Hosting.AGUI.AspNetCore NuGet package and a corresponding agent-framework-ag-ui Python package.[^4]
The canonical interaction model is straightforward. A client (typically a browser, React Native shell, or terminal) sends a single HTTP POST request to an AG-UI endpoint, carrying the user's prompt, any frontend context, and a thread or session identifier. The server responds by holding the connection open and emitting a stream of typed JSON events over Server-Sent Events. Clients can also reconnect, cancel runs, and post back user actions, making the interaction effectively bidirectional even though the streaming channel itself is one-way per request.[^1][^11][^12]
The protocol explicitly does not mandate a transport. SSE is the default because it is firewall-friendly, lightweight, and natively supported by browsers, but the specification also allows a binary serialization for higher throughput, as well as alternative transports such as WebSockets and webhooks. The protocol contract is captured by a function-level abstraction of the form run(input: RunAgentInput) -> Observable<BaseEvent>, which an implementation can fulfil over any duplex or streaming channel.[^11]
AG-UI defines roughly sixteen standardized event types grouped into five categories. Each event carries a small JSON payload with the minimum data required for the frontend to update the UI incrementally:[^11][^12][^13]
| Category | Events | Purpose |
|---|---|---|
| Lifecycle | RUN_STARTED, RUN_FINISHED, RUN_ERROR, STEP_STARTED, STEP_FINISHED | Marks the beginning, end, error state, and intermediate steps of an agent execution. |
| Text messages | TEXT_MESSAGE_START, TEXT_MESSAGE_CONTENT, TEXT_MESSAGE_END | Streams generated text token-by-token, producing the typing effect familiar from chat UIs. |
| Tool calls | TOOL_CALL_START, TOOL_CALL_ARGS, TOOL_CALL_END | Streams the model's tool use decisions, including arguments as they are generated, enabling progressive UI rendering. |
| State | STATE_SNAPSHOT, STATE_DELTA, MESSAGES_SNAPSHOT | Synchronizes structured application state. STATE_DELTA uses JSON Patch (RFC 6902) so only differences are transmitted. |
| Special | RAW, CUSTOM | Allows passthrough of vendor-specific or domain-specific events that do not fit the standard categories. |
Some adapters extend the canonical set with an INTERRUPT event used to pause execution and request a user decision before a sensitive action is committed, mapped to a generic "human-in-the-loop" gate.[^13]
A defining feature of AG-UI is that it treats state, not just text, as a first-class object on the wire. The agent backend can send a complete STATE_SNAPSHOT whenever it wants the frontend to reset its model, or a STATE_DELTA that contains a JSON Patch describing only the changes since the last snapshot.[^11][^12] Because both sides of the connection agree on the shape of the state, the frontend can render structured UI directly from the shared state (for example, dashboards, forms, or planning trees) and the backend can use the same state to drive its own behavior. The result is closer to an event-sourced shared store than to a chat transcript.
This design also allows write-back. A user can edit a value in the UI; the client sends the edit back to the agent as an action; the agent re-broadcasts an updated state delta; both sides remain consistent. CopilotKit's product surface exposes this pattern under the label "shared state."[^2][^8]
AG-UI supports two flavors of generative UI. In "tool-based generative UI", the agent invokes a frontend-registered tool whose contract corresponds to a UI component. The tool call streams arguments via TOOL_CALL_ARGS, and the frontend renders the component progressively as the arguments arrive. This is the mechanism behind features such as embedded charts, structured cards, and forms that pre-fill while the model is still emitting them.[^4][^13][^12]
In "static generative UI" or "agentic generative UI" mode, the backend keeps long-running work in flight (for example, document drafting or planning) and emits state deltas that drive a typed component tree the frontend already knows how to render. The intent is to constrain what the agent can put on screen to a small, audited vocabulary of components rather than allowing arbitrary HTML, which differentiates AG-UI's approach from systems that ship freeform model-generated markup such as Claude Artifacts or v0-style code generation associated with Vercel's product line.[^2][^4]
Tool execution can be configured as approval-required. When the agent reaches such a tool, the backend emits a tool-call start event with the proposed arguments and then waits for a user decision before proceeding. The frontend uses the standard UI controls to accept, modify, or reject, and the response is posted back to the same session. Microsoft's Agent Framework integration documents an ApprovalRequiredAIFunction abstraction that maps directly onto this AG-UI pattern.[^4][^2]
AG-UI also defines a "predictive state updates" pattern in which the model's tool-call arguments stream through TOOL_CALL_ARGS events and the frontend can optimistically project those arguments into its local state model before the tool actually runs. This is similar in spirit to optimistic UI rendering, but standardized at the protocol level so that any AG-UI-compatible client gets it for free.[^4][^11]
The reference implementations live in the ag-ui-protocol GitHub organization. The primary SDKs are written in TypeScript and Python, and they expose both server-side helpers (for emitting and serializing events) and client-side helpers (for consuming the SSE stream and merging state).[^1][^2] Microsoft, AWS, and Google publish their own first-party integrations as part of their agent frameworks. Microsoft's Microsoft.Agents.AI.Hosting.AGUI.AspNetCore package exposes a MapAGUI extension method on ASP.NET Core, automatically converting Agent Framework events into AG-UI events. The Python equivalent, agent-framework-ag-ui, hooks AG-UI into a FastAPI endpoint.[^4]
Community SDKs in active development include Kotlin, Go, Dart, Java, Rust, Ruby, and C++, with .NET and Nim work underway. Frontend bindings beyond CopilotKit's React and Angular clients include community work in Vue and Svelte, and a community React Native client.[^2] An "AG-UI Dojo" sample application, hosted at dojo.ag-ui.com, demonstrates each of the seven canonical features against multiple backend frameworks in roughly 50 to 200 lines of code per example.[^2][^4]
The CopilotKit React library remains the canonical client. It consumes AG-UI streams via an HttpAgent registration in its runtime, and exposes hooks for shared state, frontend tools, generative UI, and human-in-the-loop controls. CopilotKit also offers an enterprise tier (CopilotKit Enterprise Intelligence) that bundles observability and analytics on top of standard AG-UI streams.[^4][^9]
AG-UI's integration surface as of mid-2026 spans both proprietary and open-source agent frameworks:[^2][^4][^8]
| Vendor or framework | Integration status | Notes |
|---|---|---|
| LangGraph | First-party (launch partner) | One of the two original launch integrations, May 2025. |
| CrewAI | First-party (launch partner) | One of the two original launch integrations, May 2025. |
| Microsoft Agent Framework | First-party | Supports all seven AG-UI feature areas via MapAGUI and FastAPI. Documented November 2025. |
| Google ADK | First-party | Google integration listed alongside the Series A announcement. |
| AWS Strands Agents | First-party | Listed in the official AG-UI integrations page. |
| AWS Bedrock AgentCore | First-party | Available alongside Strands. |
| Mastra | First-party | TypeScript-first agent framework. |
| Pydantic AI | First-party | Python-first typed-agent framework. |
| Agno | First-party | Listed under official integrations. |
| LlamaIndex | First-party | Listed under official integrations. |
| AG2 | First-party | AG2 published a dedicated AG-UI tutorial in February 2026. |
| Oracle Agent Spec | Integration via Agent Spec | Announced December 18, 2025; allows Agent Spec configurations to expose AG-UI endpoints. |
| OpenAI Agents SDK | In progress | Listed as in-development. |
| Cloudflare Agents | In progress | Listed as in-development. |
| AWS Bedrock Agents | In progress | Listed as in-development. |
CopilotKit lists the OpenAI hosted models, Ollama, and direct LLM access as out-of-the-box backends for AG-UI when an agent framework is not used. On the frontend side, CopilotKit's React and Angular libraries are the official clients, with a Terminal + Agent CLI client maintained by the community.[^2][^8]
AG-UI is one of several efforts to standardize the front edge of agentic systems. The most relevant points of comparison are not direct competitors so much as overlapping mechanisms that address subsets of the same problem.
| Approach | Layer | Format | Generative UI | Notes |
|---|---|---|---|---|
| AG-UI | Agent-to-user | SSE / JSON events (16 types) | Tool-based and state-based | Vendor-neutral, framework-agnostic standard. |
| Vercel AI SDK UI stream | LLM-to-UI helper | Custom data-stream protocol over SSE | Yes, via streamUI / RSC | Tightly bound to Next.js and Vercel runtime; not a multi-vendor standard. |
| LangGraph streaming | Backend stream | Multiple modes (values, updates, messages) | None at the protocol level | Native LangGraph format; AG-UI sits above it. |
| Anthropic API tool-use streaming | LLM streaming | SSE with provider-specific message events | None | Single-vendor stream; AG-UI normalizes equivalents into TOOL_CALL_*. |
| OpenAI Responses API streaming | LLM streaming | SSE with provider-specific event types | None | Same scope as Anthropic streaming; AG-UI sits above it. |
| OpenAI Realtime API | Voice or chat | WebRTC / WebSocket | Limited (voice tool use) | Designed for low-latency speech rather than generative UI. |
| OpenAI Apps SDK | App embedding | MCP-based app rendering | Yes, MCP UI | Apps are exposed inside ChatGPT; complementary to AG-UI. |
The clearest distinction is that AG-UI is purely a wire format, deliberately neutral with respect to the LLM provider, agent framework, and frontend stack. Provider-specific streaming formats from Anthropic and OpenAI cover roughly the "text + tool call" subset of AG-UI but do not include shared state, JSON Patch deltas, or human-in-the-loop semantics. The Vercel AI SDK's UI stream is the closest single-vendor equivalent, but it is opinionated about runtime (Next.js plus Vercel's React Server Components), whereas AG-UI is designed to plug into any framework that can hold an SSE connection open.[^1][^6][^4]
A separate but related effort, A2UI ("Agent-to-User Interface"), was open-sourced by Google in December 2025. CopilotKit has positioned A2UI and AG-UI as complementary rather than competing: A2UI defines a declarative UI vocabulary for agents to render structured interfaces, while AG-UI defines the transport and lifecycle around that vocabulary. The official AG-UI documentation lists A2UI under "MCP Apps Compatibility" and related interop tracks.[^4][^14]
AG-UI is used in production for a range of agent-driven interfaces. Documented use cases include:
CopilotKit reports that AG-UI is used by a "majority of the Fortune 500 and Global 50" customers of its own product, including named references to Deutsche Telekom, Docusign, Cisco, and S&P Global.[^9][^10]
AG-UI's significance is structural rather than algorithmic. It does not propose a new model architecture, a new training method, or a new agent reasoning loop. It proposes a contract that lets any backend agent talk to any frontend UI without either side knowing the other's internals. By 2026 the agent ecosystem had accumulated three of these contracts: MCP for tools and data, A2A for inter-agent communication, and AG-UI for user-facing rendering, with AP2 (the Agent Payments Protocol) emerging for transactional flows. Together they make it plausible to assemble an agent application from independently developed parts in roughly the same way the early web stack assembled HTTP, HTML, and CSS.[^7][^3][^9]
For developers, the practical effect is portability: an interface written against AG-UI can swap between LangGraph and CrewAI without rewriting the UI, and a backend written for AG-UI can be exposed in React, Angular, Vue, a CLI, or a mobile shell without rewriting the agent.[^4][^2] For enterprises, the effect is governance: a single observability and audit layer can attach to AG-UI streams across heterogeneous agent stacks.[^5][^9]
The protocol has clear limitations as of mid-2026, which are not hidden in the documentation:
CUSTOM events, raising risk of fragmentation.[^11][^13]Public discussion of AG-UI in 2025 and early 2026 has been mixed in detail. The most substantive critique has come from developers who note that the small core protocol relies on CUSTOM events to express anything beyond the canonical features, which risks recreating the very fragmentation it intended to solve. GitHub discussion threads on the repository explicitly debate what counts as "in scope" for the standard, with maintainers attempting to balance minimalism against expressive power.[^2] Some commentators have also pointed out that the boundary between AG-UI (agent-to-user wire format) and tools such as Claude Artifacts, Apps SDK, or Vercel v0 (model-driven UI generation in specific products) is not always cleanly drawn in marketing materials, and have argued for a clearer separation between the protocol layer and the UI-generation layer.[^14][^4]
A secondary line of discussion concerns the relationship with Google's A2UI, announced December 22, 2025. CopilotKit has framed the two as compatible by treating A2UI as a vocabulary for UI components and AG-UI as the streaming carrier, but the standards have overlapping ambitions and the long-term resolution is still being negotiated through interop work.[^14][^4]
TOOL_CALL_* events.