explaingit

ag-ui-protocol/ag-ui

13,529PythonAudience · developerComplexity · 3/5Setup · moderate

TLDR

An open protocol that standardizes how AI agents connect to user-facing apps, defining around 16 event types so agent backends can stream real-time updates to chat UIs without each team inventing their own integration.

Mindmap

mindmap
  root((AG-UI))
    What It Does
      Agent to UI protocol
      Event streaming
      State sync
    Event Types
      Chat messages
      Tool calls
      State updates
      Human-in-loop steps
    Transport Options
      Server-Sent Events
      WebSockets
      Webhooks
    Integrations
      LangGraph
      CrewAI
      Custom agent backends
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Connect a LangGraph or CrewAI agent to a chat front-end using the AG-UI standard so users see streaming updates in real time as the agent works.

USE CASE 2

Build a human-in-the-loop workflow where the agent pauses at a UI step for a person to review or approve an action before continuing.

USE CASE 3

Generate interface elements dynamically from your agent's output so the chat UI updates live during agent execution.

USE CASE 4

Let your front-end offer tools to the agent, such as reading the current page or capturing user input, during a run.

Tech stack

PythonTypeScriptWebSocketsServer-Sent Events

Getting it running

Difficulty · moderate Time to first run · 30min

Requires an existing AI agent framework such as LangGraph or CrewAI and a web front-end to connect via the AG-UI protocol.

In plain English

AG-UI is an open protocol that standardizes how AI agents connect to the apps that real people use. An AI agent here means a program that runs tasks on its own using a language model. The problem AG-UI addresses is the gap between that agent running on a backend server and the screen a user is looking at. Without a shared standard, every team has to invent its own way of streaming the agent's progress, updates, and requests into a chat window or other interface. AG-UI defines a common, event-based language so that work does not have to be redone for each project. The way it works is described in plain terms. While an agent runs, its backend sends out a series of events, and AG-UI defines around sixteen standard event types that those events can match. The agent can also accept a small set of simple inputs. Between the agent and the app sits a middleware layer that smooths over differences, so the same protocol works whether the events travel over Server-Sent Events, WebSockets, webhooks, or other transport methods. The project ships a reference HTTP implementation and a default connector so teams can start quickly. The README places AG-UI alongside two other agent protocols to show where it fits. One, called MCP, gives agents access to tools. Another, called A2A, lets agents talk to other agents. AG-UI's distinct role is bringing agents into user-facing applications. You can create a starter project with a single command shown in the README. The listed features include real-time chat with streaming replies, keeping state in sync in both directions between agent and interface, generating interface elements from the agent, adding live context, letting the frontend offer tools to the agent, and supporting human-in-the-loop steps where a person reviews or guides the agent. A large table lists the many agent frameworks and platforms that already work with AG-UI, including LangGraph, CrewAI, and several first-party and community integrations.

Copy-paste prompts

Prompt 1
Create a starter AG-UI project that connects a LangGraph agent to a simple chat interface using Server-Sent Events so users see streaming progress updates.
Prompt 2
Show me how to implement a human-in-the-loop pause in AG-UI where the agent sends a UI event, waits for the user to click Approve, and then continues.
Prompt 3
How do I register a frontend tool in AG-UI so my agent can request data from the browser, like the current URL or a form value, during its run?
Prompt 4
Help me integrate AG-UI with a CrewAI multi-agent crew so each agent's progress messages stream in real time to a web chat interface.
Open on GitHub → Explain another repo

← ag-ui-protocol on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.