Skip to main content

AG-UI Protocol

What is AG-UI​

AG-UI (Agent User Interaction Protocol) is an open, event-based protocol that standardizes how AI agents communicate with user-facing applications. Created by CopilotKit, it defines the wire format for streaming agent output (text, tool calls, state updates, reasoning) to frontends in real time.

  • Status: Actively maintained, heading toward v1.0
  • License: MIT
  • GitHub stars: 14.4K
  • Contributors: 121+

Why it's interesting​

  • Fills a protocol gap β€” MCP (Anthropic) handles agent↔tools, A2A (Google) handles agent↔agent; AG-UI handles agent↔UI.
  • Event-based streaming β€” ~16 typed event types covering lifecycle, text messages, tool calls, state sync, reasoning, and activities.
  • Transport-agnostic β€” SSE, WebSockets, binary, or webhooks. The events are the contract, not the transport.
  • Human-in-the-loop first-class β€” interrupts, typed approvals, approve-with-edits pattern, full audit trail.
  • Massive framework support β€” Microsoft Agent Framework, Google ADK, AWS Bedrock AgentCore, LangGraph, CrewAI, Mastra, Pydantic AI, LlamaIndex.
  • Language-agnostic β€” SDKs in TypeScript, Python, Go, Kotlin, Rust, Ruby, Java.

When to use​

  • Building custom agent-powered UIs where you need a standardized event format
  • Multi-agent systems that report progress to users in real time
  • Teams that want to swap agent backends (LangGraph β†’ CrewAI) without changing frontend code
  • Applications requiring human-in-the-loop approval flows with audit trails

When NOT to use​

  • Simple chat UIs where a higher-level SDK (TanStack AI, Vercel AI SDK) handles the protocol layer for you
  • If you're already using TanStack AI or CopilotKit β€” you're speaking AG-UI under the hood already
  • Projects that don't need real-time streaming (batch-style AI processing)

Protocol stack positioning​

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ A2A (Google) Agent ↔ Agent coordination β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ MCP (Anthropic) Agent ↔ Tools & Data β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ AG-UI (CopilotKit) Agent ↔ User Interface β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Resources​