Get started with the Agent User Interaction Protocol (AG-UI)
AG-UI standardizes how front-end applications connect to AI agents
through an open protocol. Think of it as a universal translator for AI-driven
systems- no matter what language an agent speaks: AG-UI ensures fluent
communication.
AG-UI helps developers build next-generation AI workflows that need real-time
interactivity, live state streaming and human-in-the-loop
collaboration.AG-UI provides:
A straightforward approach to integrating AI agents with the front-end
through frameworks such as
CopilotKit 🪁
Building blocks for an efficient wire protocol for human⚡️agent
communication
Best practices for chat, streaming state updates, human-in-the-loop and
shared state
AG-UI is designed to be lightweight and minimally opinionated, making it easy to
integrate with a wide range of agent implementations. The protocol’s flexibility
comes from its simple requirements:
Event-Driven Communication: Agents need to emit any of the 16
standardized event types during execution, creating a stream of updates that
clients can process.
Bidirectional Interaction: Agents accept input from users, enabling
collaborative workflows where humans and AI work together seamlessly.
The protocol includes a built-in middleware layer that maximizes compatibility
in two key ways:
Flexible Event Structure: Events don’t need to match AG-UI’s format
exactly—they just need to be AG-UI-compatible. This allows existing agent
frameworks to adapt their native event formats with minimal effort.
Transport Agnostic: AG-UI doesn’t mandate how events are delivered,
supporting various transport mechanisms including Server-Sent Events (SSE),
webhooks, WebSockets, and more. This flexibility lets developers choose the
transport that best fits their architecture.
This pragmatic approach makes AG-UI easy to adopt without requiring major
changes to existing agent implementations or frontend applications.
AG-UI focuses explicitly and specifically on the agent-user interactivity layer.
It does not compete with protocols such as A2A (Agent-to-Agent protocol) and MCP
(Model Context Protocol).For example, the same agent may communicate with another agent via A2A while
communicating with the user via AG-UI, and while calling tools provided by an
MCP server.These protocols serve complementary purposes in the agent ecosystem:
AG-UI: Handles human-in-the-loop interaction and streaming UI updates
A2A: Facilitates agent-to-agent communication and collaboration
MCP: Standardizes tool calls and context handling across different models
Explore guides, tools, and integrations to help you build, optimize, and extend
your AG-UI implementation. These resources cover everything from practical
development workflows to debugging techniques.