Overview
AG-UI (the Agent-User Interaction Protocol) is an open, event-based standard for connecting AI agents to user-facing applications. During a run, agent backends emit events that match one of about 16 standard AG-UI event types, and they accept a small set of standard inputs, so a frontend can render streaming chat, state updates, and generative UI without bespoke glue code for each agent.
It is aimed at developers building in-app agent experiences who want one consistent contract between their agent backend and their UI. A middleware layer keeps it compatible across transports (SSE, WebSockets, webhooks) and allows loose event-format matching, so different agents and apps can interoperate. A reference HTTP implementation and a default connector help teams start quickly.
In the agentic protocol stack, AG-UI is complementary to MCP and A2A: MCP gives agents tools, A2A lets agents talk to other agents, and AG-UI brings agents into user-facing applications. It ships with SDKs and first-party or partner integrations for frameworks including LangGraph, CrewAI, Mastra, Pydantic AI, Agno, LlamaIndex, and the Claude Agent SDK.
What it does
- Real-time agentic chat with token streaming
- Bi-directional state synchronization between agent and UI
- Generative UI and structured messages
- Real-time context enrichment from the running app
- Frontend tool integration and human-in-the-loop collaboration
- Transport-agnostic middleware (SSE, WebSockets, webhooks) with a reference HTTP implementation
Getting started
The fastest way to start is the project scaffolder, which sets up an AG-UI application for you.
Scaffold a new app
Run the create command to generate a new AG-UI application. It prompts you through the setup.
npx create-ag-ui-app my-agent-appExplore integrations and demos
Pick a supported framework (LangGraph, CrewAI, Mastra, Pydantic AI, Agno, LlamaIndex, Claude Agent SDK, and more) and try live feature demos in the AG-UI Dojo at dojo.ag-ui.com before wiring up your own backend.
Read the quickstart docs
Follow the official quickstart at docs.ag-ui.com to connect your agent backend and emit AG-UI events to your frontend.
Commands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Adding a streaming, agentic chat interface to a web app without writing custom event plumbing for each agent framework
- Keeping agent state and frontend state in sync so the UI reflects what the agent is doing in real time
- Rendering generative UI and structured messages emitted by an agent backend
- Standardizing the agent-to-frontend contract across multiple frameworks (e.g. LangGraph, CrewAI, Mastra) in one product
How AG-UI Protocol compares
AG-UI Protocol alongside other open-source generative ui sdks tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| CopilotKit | ★ 35.3k | A frontend framework for adding in-app AI copilots and agent-driven generative UI to React and other apps, and the maker of the AG-UI protocol. |
| Vercel AI SDK | ★ 25k | A TypeScript toolkit for building AI apps and agents that includes streaming helpers and generative-UI features for rendering model output as React components. |
| OpenUI | ★ 22.4k | OpenUI lets you describe a UI in plain language, see it rendered live, ask for changes, and convert the result to React, Svelte, or Web Components. |
| AG-UI Protocol | ★ 14.3k | An open, event-based protocol connecting AI agents to user-facing apps |
| Tambo | ★ 11.2k | A generative UI SDK for React where you register components with Zod schemas and an agent picks the right one and streams its props to the user. |
| assistant-ui | ★ 10.7k | A TypeScript/React library of composable chat primitives for building AI chat apps that can render tool calls and JSON as interactive React components. |
| OpenUI (Thesys) | ★ 7.1k | An open standard and runtime for generative UI that uses a compact streaming language to let models emit interactive charts, forms, tables, and cards. |