
Ag Ui
Event-based protocol for connecting AI agents to any frontend app
Replaces Copilotkit

Who it's for
AG-UI gives frontend developers a typed event interface for agent state without having to understand the agent's internal runtime. A React or Vue developer connects a CopilotKit client (or builds their own) to any AG-UI-compatible backend, subscribes to event types, and renders agent state directly in the UI without bespoke protocol code.
Your agent integration is simple (single text stream, no tool calls or shared state). A direct SSE endpoint is simpler for that case.
One AG-UI-compatible backend can serve a web frontend, a mobile app, a Slack integration, and a terminal client simultaneously. Teams building multi-surface agent products get a single event contract to maintain rather than separate WebSocket implementations for each surface.
You are building for a single client surface and have full control over both sides of the connection. Direct protocol is simpler when you own both ends.
Organizations that mix LangChain, CrewAI, Pydantic AI, or other frameworks across different product lines share a single frontend integration layer across all of them. The frontend does not change when the agent backend switches frameworks.
Your team is standardized on one agent framework and CopilotKit's React integration already serves your use cases. CopilotKit is a production-ready client on top of AG-UI.
Platform teams building internal AI tooling or developer experience products can adopt AG-UI as the event contract for all agentic features, enforcing consistent interrupt, state sync, and generative UI patterns across the company without each product team reinventing the protocol.
Your organization's frontend is predominantly non-web or uses a framework with no community AG-UI client yet. Terminal and mobile are supported, but web frameworks have the most polished integration story.
The problem
Building a frontend for an AI agent requires handling outputs that look nothing like a REST API response: long-running executions, interleaved text tokens and tool call events, state updates that may arrive out of order, and user interrupts that must pause or redirect mid-execution. The traditional request-then-render cycle has no model for this, so most teams build custom WebSocket handlers or SSE parsers that work for one specific agent framework and break when the backend changes. The harder problem is portability. A custom event protocol written for a LangChain agent cannot be reused for a CrewAI workflow without significant refactoring. Teams running multiple agent frameworks end up maintaining separate frontend integrations for each. This creates a repeated engineering cost where each change to the agent layer forces refactoring the frontend wiring alongside it.
How it works
Agent backends emit events from a standardized set covering text tokens, tool call start and end, state diffs, generative UI trees, interrupt signals, and thinking steps. Frontend clients subscribe to these events without needing to know which agent framework produced them. The fixed vocabulary makes the agent-frontend boundary testable and debuggable.
AG-UI builds on HTTP and WebSockets as a protocol layer, not a transport specification. SSE, WebSockets, and webhooks all work without code changes on the frontend side. The reference implementation ships as a TypeScript/Node.js HTTP server, but any backend language works: Go, Rust, Python, Java, Kotlin, C++, and .NET SDKs are available.
Agents and frontends share a typed state store with event-sourced diffs. The agent can read and write shared state while the user edits it simultaneously, with conflict resolution built into the protocol. This enables collaborative patterns like a document editor where the agent and user work on the same canvas in real time.
Any mid-flow execution can be paused for user approval, edited, retried, or escalated without losing state. The interrupt event is a first-class protocol event. Frontend clients display the pending action and resume the agent once the user responds, keeping the full execution trace intact.
Agents can hand off typed actions to the frontend to execute (file opens, navigation, form fills) and receive the result back. These typed handoffs are distinct from backend tool calls: the agent delegates UI-layer work to the client rather than trying to control the browser from the server side.
First-party SDKs ship for TypeScript/JavaScript. Community SDKs cover Go, Rust, Kotlin, Dart, Java, Ruby, C++, and .NET. Each SDK includes a getting-started guide in the GitHub repo. This means a Python FastAPI backend, a Go service, or a JVM-based enterprise application can all serve AG-UI events without language-specific glue code.
Features
- Around 16 standard event types
- Transport-agnostic middleware layer
- Bi-directional state synchronization
- Human-in-the-loop interrupts
- Frontend tool calls
- SDK coverage across 9 languages
How to install
Install a new AG-UI application using the project setup tool.
npx create-ag-ui-app my-agent-appRecommended for this setup
Strengths
- MIT license with no service dependency: The protocol spec and all SDKs are MIT licensed. Running AG-UI adds no licensing cost, no per-seat pricing, and no calls to a managed service. Every byte of the agent-frontend communication stays on infrastructure you control. This contrasts with frameworks that bundle protocol handling with hosted services.
- 20+ framework integrations with 1st-party support: LangChain, CrewAI, Google ADK, Microsoft Agent Framework, AWS Strands, Pydantic AI, Mastra, Agno, LlamaIndex, and AG2 all ship first-party AG-UI integrations with documentation and working demos. Amazon Bedrock AgentCore and Oracle's Agent Spec also carry 1st-party status. Switching agent frameworks does not require rewriting the frontend layer.
- One backend, any client surface: The protocol describes an event stream, not a rendering target. The same agent backend can serve a React web app, a React Native mobile client, a Slack and Microsoft Teams bot (via the Channels SDK), and a terminal simultaneously. CopilotKit, Dojo demos, and OpenBot are each distinct clients built on the same protocol.
- Active development with broad industry backing: The repo reached 17,883 stars and 1,820 forks since launching in May 2025. The biweekly AG-UI Working Group is public and framework partners include Anthropic, Google, Microsoft, AWS, and others. Community SDK contributions continue across Kotlin, Dart, Rust, Ruby, and C++.
- Scaffolding tool and interactive demos: `npx create-ag-ui-app` generates a working full-stack AG-UI application, not a blank template. The AG-UI Dojo at dojo.ag-ui.com provides live, interactive demos for each supported framework with 50-200 line source examples, letting teams validate integration patterns before writing production code.
Trade-offs
- 315 open issues on a protocol launched in 2025: AG-UI launched in May 2025 and had 315 open issues as of November 2026. As a protocol still evolving, event type definitions and SDK APIs may change between minor versions. Teams building production systems should pin SDK versions and monitor the CHANGELOG. The spec has not yet reached a stable 1.0 that freezes the event contract.
- Protocol overhead for simple agent integrations: If your agent produces a single text stream with no tool calls, state sharing, or UI control, AG-UI adds complexity. A plain SSE endpoint returning token chunks is enough for that case. The protocol's value scales with how stateful and interactive the agent workflow is: minimal-interaction chatbots get limited benefit from adopting it.
- Non-TypeScript SDKs are community-maintained: The TypeScript SDK is maintained by the core team. Go, Kotlin, Rust, Dart, Java, Ruby, C++, and .NET SDKs are community-contributed and vary in maturity. Flowise and Langflow integrations were still in progress as of November 2026. Teams relying on a non-TypeScript SDK should check the specific SDK's issue tracker before committing to production use.
Tech stack
FAQ
AG-UI is the open protocol layer that CopilotKit (the commercial React framework) is built on top of. CopilotKit is listed as a 1st-party client in the AG-UI ecosystem. AG-UI was born from CopilotKit's initial partnership with LangChain and CrewAI. The two are complementary: AG-UI defines the event contract, CopilotKit provides the React implementation with added managed services. Teams who want to use AG-UI without CopilotKit's React library or its hosted intelligence layer can do so.
MCP and AG-UI operate at different layers of the agentic stack. MCP connects agents to external tools, workflows, and data sources (agent to data). AG-UI connects agents to user-facing frontends (agent to user). They are not alternatives to each other; a backend can use MCP to call tools and AG-UI to send events to the frontend at the same time. The AG-UI protocol page describes all three layers (MCP, A2A, AG-UI) as distinct and complementary.
AG-UI does not prescribe a frontend framework. It defines an event stream, so any frontend that can consume HTTP or WebSocket events works. CopilotKit provides the most complete 1st-party React integration. React Native, terminal clients, and Slack and Teams integrations (via the Channels SDK) are also maintained. The protocol is designed so a team can build a Vue, Angular, or Svelte client against it, though those require building the client integration.
Yes. AG-UI is the protocol specification and SDK set, not a service. You implement the event types in your agent backend and consume them in your frontend, entirely on your own infrastructure. CopilotKit Intelligence (a hosted memory and thread service) is used by some AG-UI-based applications like OpenBot but is not part of the protocol itself. The MIT license places no restrictions on this.
AG-UI launched in May 2025 and has 17,883 GitHub stars and integrations from Google, Microsoft, AWS, and Amazon as first-party adopters. CopilotKit uses it in production. As of November 2026, 315 open issues exist in the repo and some SDK features are still in progress. For production use, pin your SDK version, track the changelog, and test against your specific framework integration. The TypeScript SDK and the core event set are the most mature parts.