Back to Copilotkit

AG-UI Overview

showcase/shell-docs/src/content/ag-ui/introduction.mdx

1.57.030.2 KB
Original Source

The Agent–User Interaction (AG-UI) Protocol

AG-UI is an <u><strong>open</strong></u>, <u><strong>lightweight</strong></u>, <u><strong>event-based</strong></u> protocol that standardizes how AI agents connect to user-facing applications.

AG-UI is designed to be the general-purpose, bi-directional connection between a user-facing application and any agentic backend.

Built for simplicity and flexibility, it standardizes how agent state, UI intents, and user interactions flow between your model/agent runtime and user-facing frontend applications—to allow application developers to ship reliable, debuggable, user‑friendly agentic features fast while focusing on application needs and avoiding complex ad-hoc wiring.

<div style={{ textAlign: "center", margin: "2rem 0" }}> </div>

Agentic Protocols

<Note> <strong>Confused about "A2UI" and "AG-UI"?</strong> That's understandable! Despite the naming similarities, they are quite different and work well together. A2UI is a [generative UI specification](./concepts/generative-ui-specs) - allowing agents to deliver UI widgets, where AG-UI is the Agent↔User Interaction protocol - which connects an agentic frontend to any agentic backend. [Learn more](https://copilotkit.ai/ag-ui-and-a2ui) </Note>

AG-UI is one of three prominent open agentic protocols.

LayerProtocol / ExamplePurpose
Agent ↔ User Interaction**AG-UI
(Agent–User Interaction Protocol)**The open, event-based standard that connects agents to user-facing applications — enabling real-time, multimodal, interactive experiences.
Agent ↔ Tools & Data**MCP
(Model Context Protocol)**Open standard (originated by Anthropic) that lets agents securely connect to external systems — tools, workflows, and data sources.
Agent ↔ Agent**A2A
(Agent to Agent)**Open standard (originated by Google) which defines how agents coordinate and share work across distributed agentic systems.

Building blocks (today & upcoming)

<div style={{display: 'grid', gridTemplateColumns: 'repeat(2, 1fr)', gap: '1rem', margin: '1.5rem 0'}}> <div className="border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden transition-all duration-300 cursor-pointer hover:border-blue-500 hover:shadow-lg" onMouseEnter={(e) => { e.currentTarget.querySelector('.content').style.maxHeight = '200px'; e.currentTarget.querySelector('.content').style.opacity = '1'; }} onMouseLeave={(e) => { e.currentTarget.querySelector('.content').style.maxHeight = '0px'; e.currentTarget.querySelector('.content').style.opacity = '0'; }}> <div className="px-6 py-4 bg-gray-50 dark:bg-gray-800 font-semibold text-gray-700 dark:text-gray-200"> Streaming chat </div> <div className="content bg-white dark:bg-gray-900 px-6" style={{maxHeight: '0px', opacity: '0', overflow: 'hidden', transition: 'all 0.3s ease'}}> <div className="py-4 text-gray-600 dark:text-gray-400" style={{lineHeight: '1.6'}}> Live token and event streaming for responsive multi turn sessions, with cancel and resume. </div> </div> </div> <div className="border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden transition-all duration-300 cursor-pointer hover:border-blue-500 hover:shadow-lg" onMouseEnter={(e) => { e.currentTarget.querySelector(".content").style.maxHeight = "200px"; e.currentTarget.querySelector(".content").style.opacity = "1"; }} onMouseLeave={(e) => { e.currentTarget.querySelector(".content").style.maxHeight = "0px"; e.currentTarget.querySelector(".content").style.opacity = "0"; }} > <div className="px-6 py-4 bg-gray-50 dark:bg-gray-800 font-semibold text-gray-700 dark:text-gray-200"> Multimodality </div> <div className="content bg-white dark:bg-gray-900 px-6" style={{ maxHeight: "0px", opacity: "0", overflow: "hidden", transition: "all 0.3s ease", }} > <div className="py-4 text-gray-600 dark:text-gray-400" style={{ lineHeight: "1.6" }} > Typed attachments and real time media (files, images, audio, transcripts); supports voice, previews, annotations, provenance. </div> </div> </div> <div className="border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden transition-all duration-300 cursor-pointer hover:border-blue-500 hover:shadow-lg" onMouseEnter={(e) => { e.currentTarget.querySelector(".content").style.maxHeight = "200px"; e.currentTarget.querySelector(".content").style.opacity = "1"; }} onMouseLeave={(e) => { e.currentTarget.querySelector(".content").style.maxHeight = "0px"; e.currentTarget.querySelector(".content").style.opacity = "0"; }} > <div className="px-6 py-4 bg-gray-50 dark:bg-gray-800 font-semibold text-gray-700 dark:text-gray-200"> Generative UI, static </div> <div className="content bg-white dark:bg-gray-900 px-6" style={{ maxHeight: "0px", opacity: "0", overflow: "hidden", transition: "all 0.3s ease", }} > <div className="py-4 text-gray-600 dark:text-gray-400" style={{ lineHeight: "1.6" }} > Render model output as stable, typed components under app control. </div> </div> </div> <div className="border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden transition-all duration-300 cursor-pointer hover:border-blue-500 hover:shadow-lg" onMouseEnter={(e) => { e.currentTarget.querySelector(".content").style.maxHeight = "200px"; e.currentTarget.querySelector(".content").style.opacity = "1"; }} onMouseLeave={(e) => { e.currentTarget.querySelector(".content").style.maxHeight = "0px"; e.currentTarget.querySelector(".content").style.opacity = "0"; }} > <div className="px-6 py-4 bg-gray-50 dark:bg-gray-800 font-semibold text-gray-700 dark:text-gray-200"> Generative UI, declarative </div> <div className="content bg-white dark:bg-gray-900 px-6" style={{ maxHeight: "0px", opacity: "0", overflow: "hidden", transition: "all 0.3s ease", }} > <div className="py-4 text-gray-600 dark:text-gray-400" style={{ lineHeight: "1.6" }} > Small declarative language for constrained yet open-ended agent UIs; agents propose trees and constraints, the app validates and mounts. </div> </div> </div> <div className="border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden transition-all duration-300 cursor-pointer hover:border-blue-500 hover:shadow-lg" onMouseEnter={(e) => { e.currentTarget.querySelector(".content").style.maxHeight = "200px"; e.currentTarget.querySelector(".content").style.opacity = "1"; }} onMouseLeave={(e) => { e.currentTarget.querySelector(".content").style.maxHeight = "0px"; e.currentTarget.querySelector(".content").style.opacity = "0"; }} > <div className="px-6 py-4 bg-gray-50 dark:bg-gray-800 font-semibold text-gray-700 dark:text-gray-200"> Shared state </div> <div className="content bg-white dark:bg-gray-900 px-6" style={{ maxHeight: "0px", opacity: "0", overflow: "hidden", transition: "all 0.3s ease", }} > <div className="py-4 text-gray-600 dark:text-gray-400" style={{ lineHeight: "1.6" }} > (Read-only & read-write). Typed store shared between agent and app, with streamed event-sourced diffs and conflict resolution for snappy collaboration. </div> </div> </div> <div className="border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden transition-all duration-300 cursor-pointer hover:border-blue-500 hover:shadow-lg" onMouseEnter={(e) => { e.currentTarget.querySelector(".content").style.maxHeight = "200px"; e.currentTarget.querySelector(".content").style.opacity = "1"; }} onMouseLeave={(e) => { e.currentTarget.querySelector(".content").style.maxHeight = "0px"; e.currentTarget.querySelector(".content").style.opacity = "0"; }} > <div className="px-6 py-4 bg-gray-50 dark:bg-gray-800 font-semibold text-gray-700 dark:text-gray-200"> Thinking steps </div> <div className="content bg-white dark:bg-gray-900 px-6" style={{ maxHeight: "0px", opacity: "0", overflow: "hidden", transition: "all 0.3s ease", }} > <div className="py-4 text-gray-600 dark:text-gray-400" style={{ lineHeight: "1.6" }} > Visualize intermediate reasoning from traces and tool events; no raw chain of thought. </div> </div> </div> <div className="border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden transition-all duration-300 cursor-pointer hover:border-blue-500 hover:shadow-lg" onMouseEnter={(e) => { e.currentTarget.querySelector(".content").style.maxHeight = "200px"; e.currentTarget.querySelector(".content").style.opacity = "1"; }} onMouseLeave={(e) => { e.currentTarget.querySelector(".content").style.maxHeight = "0px"; e.currentTarget.querySelector(".content").style.opacity = "0"; }} > <div className="px-6 py-4 bg-gray-50 dark:bg-gray-800 font-semibold text-gray-700 dark:text-gray-200"> Frontend tool calls </div> <div className="content bg-white dark:bg-gray-900 px-6" style={{ maxHeight: "0px", opacity: "0", overflow: "hidden", transition: "all 0.3s ease", }} > <div className="py-4 text-gray-600 dark:text-gray-400" style={{ lineHeight: "1.6" }} > Typed handoffs from agent to frontend-executed actions, and back. </div> </div> </div> <div className="border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden transition-all duration-300 cursor-pointer hover:border-blue-500 hover:shadow-lg" onMouseEnter={(e) => { e.currentTarget.querySelector(".content").style.maxHeight = "200px"; e.currentTarget.querySelector(".content").style.opacity = "1"; }} onMouseLeave={(e) => { e.currentTarget.querySelector(".content").style.maxHeight = "0px"; e.currentTarget.querySelector(".content").style.opacity = "0"; }} > <div className="px-6 py-4 bg-gray-50 dark:bg-gray-800 font-semibold text-gray-700 dark:text-gray-200"> Backend tool rendering </div> <div className="content bg-white dark:bg-gray-900 px-6" style={{ maxHeight: "0px", opacity: "0", overflow: "hidden", transition: "all 0.3s ease", }} > <div className="py-4 text-gray-600 dark:text-gray-400" style={{ lineHeight: "1.6" }} > Visualize backend tool outputs in app and chat, emit side effects as first-class events. </div> </div> </div> <div className="border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden transition-all duration-300 cursor-pointer hover:border-blue-500 hover:shadow-lg" onMouseEnter={(e) => { e.currentTarget.querySelector(".content").style.maxHeight = "200px"; e.currentTarget.querySelector(".content").style.opacity = "1"; }} onMouseLeave={(e) => { e.currentTarget.querySelector(".content").style.maxHeight = "0px"; e.currentTarget.querySelector(".content").style.opacity = "0"; }} > <div className="px-6 py-4 bg-gray-50 dark:bg-gray-800 font-semibold text-gray-700 dark:text-gray-200"> Interrupts (human in the loop) </div> <div className="content bg-white dark:bg-gray-900 px-6" style={{ maxHeight: "0px", opacity: "0", overflow: "hidden", transition: "all 0.3s ease", }} > <div className="py-4 text-gray-600 dark:text-gray-400" style={{ lineHeight: "1.6" }} > Pause, approve, edit, retry, or escalate mid flow without losing state. </div> </div> </div> <div className="border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden transition-all duration-300 cursor-pointer hover:border-blue-500 hover:shadow-lg" onMouseEnter={(e) => { e.currentTarget.querySelector(".content").style.maxHeight = "200px"; e.currentTarget.querySelector(".content").style.opacity = "1"; }} onMouseLeave={(e) => { e.currentTarget.querySelector(".content").style.maxHeight = "0px"; e.currentTarget.querySelector(".content").style.opacity = "0"; }} > <div className="px-6 py-4 bg-gray-50 dark:bg-gray-800 font-semibold text-gray-700 dark:text-gray-200"> Sub-agents and composition </div> <div className="content bg-white dark:bg-gray-900 px-6" style={{ maxHeight: "0px", opacity: "0", overflow: "hidden", transition: "all 0.3s ease", }} > <div className="py-4 text-gray-600 dark:text-gray-400" style={{ lineHeight: "1.6" }} > Nested delegation with scoped state, tracing, and cancellation. </div> </div> </div> <div className="border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden transition-all duration-300 cursor-pointer hover:border-blue-500 hover:shadow-lg" onMouseEnter={(e) => { e.currentTarget.querySelector(".content").style.maxHeight = "200px"; e.currentTarget.querySelector(".content").style.opacity = "1"; }} onMouseLeave={(e) => { e.currentTarget.querySelector(".content").style.maxHeight = "0px"; e.currentTarget.querySelector(".content").style.opacity = "0"; }} > <div className="px-6 py-4 bg-gray-50 dark:bg-gray-800 font-semibold text-gray-700 dark:text-gray-200"> Agent steering </div> <div className="content bg-white dark:bg-gray-900 px-6" style={{ maxHeight: "0px", opacity: "0", overflow: "hidden", transition: "all 0.3s ease", }} > <div className="py-4 text-gray-600 dark:text-gray-400" style={{ lineHeight: "1.6" }} > Dynamically redirect agent execution with real-time user input to guide behavior and outcomes. </div> </div> </div> <div className="border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden transition-all duration-300 cursor-pointer hover:border-blue-500 hover:shadow-lg" onMouseEnter={(e) => { e.currentTarget.querySelector(".content").style.maxHeight = "200px"; e.currentTarget.querySelector(".content").style.opacity = "1"; }} onMouseLeave={(e) => { e.currentTarget.querySelector(".content").style.maxHeight = "0px"; e.currentTarget.querySelector(".content").style.opacity = "0"; }} > <div className="px-6 py-4 bg-gray-50 dark:bg-gray-800 font-semibold text-gray-700 dark:text-gray-200"> Tool output streaming </div> <div className="content bg-white dark:bg-gray-900 px-6" style={{ maxHeight: "0px", opacity: "0", overflow: "hidden", transition: "all 0.3s ease", }} > <div className="py-4 text-gray-600 dark:text-gray-400" style={{ lineHeight: "1.6" }} > Stream tool results and logs so UIs can render long-running effects in real time. </div> </div> </div> <div className="border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden transition-all duration-300 cursor-pointer hover:border-blue-500 hover:shadow-lg" onMouseEnter={(e) => { e.currentTarget.querySelector('.content').style.maxHeight = '200px'; e.currentTarget.querySelector('.content').style.opacity = '1'; }} onMouseLeave={(e) => { e.currentTarget.querySelector('.content').style.maxHeight = '0px'; e.currentTarget.querySelector('.content').style.opacity = '0'; }}> <div className="px-6 py-4 bg-gray-50 dark:bg-gray-800 font-semibold text-gray-700 dark:text-gray-200"> Custom events </div> <div className="content bg-white dark:bg-gray-900 px-6" style={{maxHeight: '0px', opacity: '0', overflow: 'hidden', transition: 'all 0.3s ease'}}> <div className="py-4 text-gray-600 dark:text-gray-400" style={{lineHeight: '1.6'}}> Open-ended data exchange for needs not covered by the protocol. </div> </div> </div> </div>

Why Agentic Apps need AG-UI

Agentic applications break the simple request/response model that dominated frontend-backend development in the pre-agentic era: a client makes a request, the server returns data, the client renders it, and the interaction ends.

The requirements of user‑facing agents

While agents are just software, they exhibit characteristics that make them challenging to serve behind traditional REST/GraphQL APIs:

  • Agents are long‑running and stream intermediate work—often across multi‑turn sessions.
  • Agents are nondeterministic and can control application UI nondeterministically.
  • Agents simultanously mix structured + unstructured IO (e.g. text & voice, alongside tool calls and state updates).
  • Agents need user-interactive composition: e.g. they may call sub‑agents, often recursively.
  • And more...

AG-UI is an event-based protocol that enables dynamic communication between agentic frontends and backends. It builds on top of the foundational protocols of the web (HTTP, WebSockets) as an abstraction layer designed for the agentic age—bridging the gap between traditional client-server architectures and the dynamic, stateful nature of AI agents.


AG-UI in Action

<div style={{ textAlign: "center", margin: "3rem 0 1rem 0" }}> <video width="100%" height="auto" autoPlay muted loop controls style={{ maxWidth: "800px", borderRadius: "12px", boxShadow: "0 8px 32px rgba(0, 0, 0, 0.12)", }} > <source src="/videos/Dojo-overview.mp4" type="video/mp4" /> Your browser does not support the video tag. </video> </div> <Callout type="info" icon="lightbulb"> You can see demo apps of the AG-UI features with the framework of your choice, with preview, code, and walkthrough docs in the [AG-UI Dojo](https://dojo.ag-ui.com/) </Callout>

Supported Integrations

AG-UI was born from CopilotKit's initial partnership with LangGraph and CrewAI - and brings the incredibly popular agent-user-interactivity infrastructure to the wider agentic ecosystem.

1st party = the platforms that have AG‑UI built in and provide documentation for guidance.

Direct to LLM

FrameworkStatusAG-UI Resources
Direct to LLMSupportedDocs

Agent Framework - Partnerships

FrameworkStatusAG-UI Resources
LangGraphSupportedDocs, Demos
CrewAISupportedDocs, Demos

Agent Framework - 1st Party

FrameworkStatusAG-UI Resources
Microsoft Agent FrameworkSupportedDocs, Demos
Google ADKSupportedDocs, Demos
AWS Strands AgentsSupportedDocs, Demos
AWS Bedrock AgentCoreSupportedDocs
MastraSupportedDocs, Demos
Pydantic AISupportedDocs, Demos
AgnoSupportedDocs, Demos
LlamaIndexSupportedDocs, Demos
AG2SupportedDocs Demos
AWS Bedrock AgentsIn Progress

Agent Framework - Community

FrameworkStatusAG-UI Resources
OpenAI Agent SDKIn Progress
Cloudflare AgentsIn Progress

Agent Interaction Protocols

ProtocolStatusAG-UI ResourcesIntegrations
A2A MiddlewareSupportedDocsPartnership

Infrastructure / Deployment

PlatformStatusAG-UI ResourcesIntegrations
Amazon Bedrock AgentCoreSupportedDocs1st Party

Specification (standard)

FrameworkStatusAG-UI Resources
Oracle Agent SpecSupportedDocs, Demos

SDKs

SDKStatusAG-UI ResourcesIntegrations
KotlinSupportedGetting StartedCommunity
GolangSupportedGetting StartedCommunity
DartSupportedGetting StartedCommunity
JavaSupportedGetting StartedCommunity
RustSupportedGetting StartedCommunity
.NETIn ProgressPRCommunity
NimIn ProgressPRCommunity
FlowiseIn ProgressGitHub SourceCommunity
LangflowIn ProgressGitHub SourceCommunity

Clients

ClientStatusAG-UI ResourcesIntegrations
CopilotKitSupportedGetting Started1st Party
Terminal + AgentSupportedGetting StartedCommunity
React NativeHelp WantedGitHub SourceCommunity

Quick Start

Choose the path that fits your needs:

<CardGroup cols={3}> <Card title="Build agentic applications" icon="rocket" href="/quickstart/applications" color="#3B82F6" iconType="solid" > Build agentic applications powered by AG-UI compatible agents. </Card>

<Card title="Build new AG-UI integrations" icon="plug" href="/quickstart/introduction" color="#3B82F6" iconType="solid"

Build integrations for new agent frameworks, custom in-house solutions, or use AG-UI without any agent framework. </Card>

<Card title="Build AG-UI compatible clients" icon="desktop" href="/quickstart/clients" color="#3B82F6" iconType="solid"

Build new clients for AG-UI-compatible agents (web, mobile, slack, messaging, etc.) </Card>

</CardGroup>

Explore AG-UI

Dive deeper into AG-UI's core concepts and capabilities:

<CardGroup cols={2}> <Card title="Core architecture" icon="sitemap" iconType="light" color="#3B82F6" href="/concepts/architecture" > Understand how AG-UI connects agents, protocols, and front-ends </Card>

<Card title="Events" icon="bolt" iconType="light" color="#3B82F6" href="/concepts/events"

Learn about AG-UI's event-driven protocol
</Card> </CardGroup>

Resources

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.

<CardGroup cols={2}> <Card title="Developing with Cursor" icon="rocket" iconType="light" color="#3B82F6" href="/tutorials/cursor" > Use Cursor to build AG-UI implementations faster </Card> <Card title="Troubleshooting AG-UI" icon="bug" iconType="light" color="#3B82F6" href="/tutorials/debugging" > Fix common issues when working with AG-UI servers and clients </Card> </CardGroup>

Contributing

Want to contribute? Check out our Contributing Guide to learn how you can help improve AG-UI.

Support and Feedback

Here's how to get help or provide feedback:

  • For bug reports and feature requests related to the AG-UI specification, SDKs, or documentation (open source), please create a GitHub issue
  • For discussions or Q&A about AG-UI, please join the Discord community