Developer desk with a laptop showing an AI assistant chat panel beside a web app

AG-UI Explained: The Agent-User Interaction Protocol for Frontend Apps

AG-UI is an open, lightweight, event-based protocol that standardises how AI agents connect to user-facing applications. Instead of hiding an agent behind an API, it lets the agent stream text, update shared state, render interface components, and ask the user for input while the work is still happening.

Developer desk with a laptop showing an AI assistant chat panel beside a web app
AG-UI brings AI agents into the frontend, where users can see, guide, and work with them in real time.

Key facts

  • Project: AG-UI (Agent-User Interaction Protocol), from the AG-UI GitHub repository
  • GitHub stars: 17,716, with 1,805 forks
  • Licence: MIT
  • Created: 7 May 2025
  • Commits: 5,467, across 78 releases
  • Event types: about 16 standard event types
  • GitHub Trending: #2 on 15 November 2026

What Is AG-UI and Why Does It Matter?

AG-UI matters because most AI agents today are powerful but invisible. A user sends a request, waits, and eventually receives an answer, with little sense of what the agent is doing in between. That works for a simple question, but it breaks down when an agent runs for minutes, uses tools, changes data, or needs a decision from a person. The AG-UI agent-user interaction protocol was built for exactly that gap: it is the open standard for the connection between an agent and the person using it.

The idea comes from CopilotKit, which built the agent-user interactivity behind its product and then opened it up with partners including LangChain and CrewAI. Teams were building the same wiring again and again: streaming tokens to a chat window, keeping the screen in sync with the agent, letting the agent render a chart or a form, and pausing for a human to approve a step. AG-UI turns that repeated work into a shared standard, so a frontend built once can talk to many different agent backends, and an agent backend can serve many different frontends.

That matters for users too. When an agent shows its progress, a person can spot a mistake early, correct a misunderstanding, or approve a risky action before it happens. For developers, the payoff is speed: instead of designing a custom protocol for every project, they adopt one that already handles streaming, state, tools, and human approval.

How Does AG-UI Work?

AG-UI works as a stream of events between an agent backend and a frontend application. During an agent run, the backend emits events that match one of about 16 standard event types. Those events can carry a piece of streamed text, a tool call, a state update, a request for user input, or an instruction to render a user interface component.

The protocol is deliberately transport-agnostic. It works with any event transport, including server-sent events (SSE), WebSockets, and webhooks, and it ships with a reference HTTP implementation and a default connector to help teams get started quickly.

The flow is also two-way. The frontend does not only receive events; it can send input back to the agent — a message, a piece of context from the current screen, or an answer to a question the agent asked. This bi-directional exchange keeps both sides in sync through a shared state that updates in real time. The official AG-UI documentation describes this as a general-purpose, bi-directional connection between a user-facing application and any agentic backend.

Close-up of a laptop screen with a streaming AI chat and UI components rendering
With AG-UI, an agent streams text, tool calls, and interface updates to the frontend as events.

How Is AG-UI Different From MCP and A2A?

AG-UI is different from MCP and A2A because it solves a different part of the agent puzzle, and the three protocols are designed to work together rather than compete. Think of them as three layers of the same agentic stack, each answering a different question: how does an agent reach its tools, how do agents reach each other, and how does an agent reach the user?

MCP, the Model Context Protocol, gives agents tools. Developed by Anthropic, it standardises how an agent connects to external systems, data sources, and tools, so a model can read a file, query a database, or call a function through one shared interface instead of a custom connector for every source. A2A, the Agent2Agent protocol from Google, lets agents talk to other agents, so they can coordinate, delegate work, and share results across distributed systems.

AG-UI completes the picture by bringing agents into user-facing applications. An agent might use MCP to fetch data and A2A to ask another agent for help, but without AG-UI there is still no standard way for it to show that work to a person, stream its reasoning, or ask for approval inside an app.

What Can You Build With AG-UI?

You can build almost any frontend experience where an agent works alongside a person, because AG-UI covers the six capabilities that such experiences keep needing. The first is real-time agentic chat with streaming, so users see an agent’s response appear word by word instead of waiting for a finished answer. The second is bi-directional state synchronisation, which keeps the application and the agent looking at the same data, so the agent can react to what is on screen and the screen can react to what the agent does.

The third is generative UI and structured messages. Instead of answering only in text, an agent can render a component: a chart, a table, a form, a card, or a custom widget that the user can interact with directly. That turns a chat window into a working surface. The fourth is real-time context enrichment, where the frontend continuously shares relevant context — what the user is viewing, what they have selected, or what has just changed — so the agent’s answers stay grounded in the current task.

The fifth is frontend tool integration, which lets an agent trigger actions inside the application itself, such as opening a panel, filling in a field, or navigating to a view. The sixth is human-in-the-loop collaboration, where the agent pauses and asks a person to review, edit, or approve before it continues. The same pattern is appearing across AI tooling: Univer, the AI-native office SDK, is moving agents inside office apps, and Stitch Skills for Google Stitch are becoming reusable agent building blocks.

Software developer at a desk with two monitors showing frontend code and a live app preview
Developers connect an existing agent backend to a frontend app without rebuilding either side.

Which Frameworks Support AG-UI?

A wide range of frameworks supports AG-UI, and the list is one of the reasons the protocol reached GitHub Trending #2 on 15 November 2026. It began with a partnership between CopilotKit, LangChain, and CrewAI, and it has since grown into first-party support from many of the best-known names in the agent ecosystem. Microsoft Agent Framework, Google ADK, and Google Antigravity are all supported, alongside AWS Strands Agents, Mastra, Pydantic AI, LlamaIndex, and AG2. The Claude Agent SDK and Cloudflare Agents are supported too, through community integrations.

That breadth matters because it removes the most common objection to adopting a new protocol: being locked into one vendor’s stack. A team using LangChain can expose its agent through AG-UI, a team using Google ADK can do the same, and both can connect to similar frontends. If a team later switches frameworks, the frontend does not need to be rewritten, because the event stream it listens to stays the same. The protocol also works with A2A through middleware, so agent-to-agent communication and agent-to-user interaction can run side by side.

Developers are not limited to Python and JavaScript either. AG-UI has community SDKs in Kotlin, Go, Dart, Java, Rust, Ruby, C++, and .NET, and clients exist for the web, React Native, terminals, and chat platforms such as Slack and Microsoft Teams.

How Do You Start With AG-UI?

You start with AG-UI in seconds, using a single command that scaffolds a working application for you:

npx create-ag-ui-app my-agent-app

That command creates a new project with an agent backend and a frontend already wired together through the protocol, so you can see streaming chat, state updates, and generative UI working before you write any of your own code. From there, the fastest way to learn is to explore the interactive examples at the AG-UI Dojo, where each building block is demonstrated in a small, focused example of just 50 to 200 lines of code. You can watch a feature work, read its source, and adapt it to your own project.

If you already have an agent, the next step is to add an AG-UI endpoint to it using the integration for your framework, then connect a frontend client to that endpoint. For a deeper look at the concepts behind the protocol, the guides on KongoTech cover the trending AI tools and protocols shaping this space.

Team sketching a diagram of an AI agent connected to a web application on a whiteboard
AG-UI standardises the connection between an agent and the people who use it.

Frequently Asked Questions

What is AG-UI?

AG-UI is an open, lightweight, event-based protocol that standardises how AI agents connect to user-facing applications. Agent backends emit events in about 16 standard types, and frontends render streaming text, state updates, and interface components from that event stream.

Is AG-UI a replacement for MCP?

No, AG-UI is not a replacement for MCP. MCP gives agents tools and data, while AG-UI brings agents into user-facing applications. The two protocols complement each other, and a single application can use both at the same time.

Is AG-UI free and open source?

Yes, AG-UI is free and open source under the MIT licence. Its source code, specification, and documentation are public on GitHub, and anyone can use, study, or contribute to the project.

Which agent frameworks work with AG-UI?

LangChain, CrewAI, Microsoft Agent Framework, Google ADK, Google Antigravity, AWS Strands Agents, Mastra, Pydantic AI, LlamaIndex, AG2, the Claude Agent SDK, and Cloudflare Agents all support AG-UI. Community SDKs also exist for Kotlin, Go, Dart, Java, Rust, Ruby, C++, and .NET.

How do I try AG-UI quickly?

Run npx create-ag-ui-app my-agent-app to scaffold a working app, then explore the interactive examples at the AG-UI Dojo. The Dojo’s examples are each only 50 to 200 lines of code, so you can see every building block working before you build your own.

Conclusion

AG-UI fills the last missing gap in the agentic protocol stack. MCP connects agents to tools, A2A connects agents to each other, and the AG-UI agent-user interaction protocol connects agents to people, inside the applications they already use. With 17,716 stars, an MIT licence, support from the major agent frameworks, and a quick start that takes seconds, it is a practical standard rather than a promise. If you are building frontend AI agents, generative UI, or any copilot that needs to work with a user in real time, AG-UI is the protocol to learn first — and the Dojo is the best place to see it in action.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *