---
title: "AG-UI Protocol"
description: "Open, lightweight, event-based standard connecting AI agent runtimes to user-facing frontend applications."
section: "concepts"
type: "concept"
created: "2026-08-30"
updated: "2026-08-30"
confidence: "high"
tags: ["agents", "workflow", "context-engineering", "subagents"]
canonical: "https://pyweb.dev/wiki/ag-ui-protocol"
---
# AG-UI Protocol

**AG-UI (Agent–User Interaction Protocol)** is an open, event-based specification that standardizes communication between backend agent execution loops and user-facing frontend applications. Originated by [copilotkit](/wiki/copilotkit) in partnership with ecosystem frameworks (LangChain, CrewAI, Microsoft Agent Framework, AWS Bedrock AgentCore), AG-UI defines the frontend interaction layer alongside MCP (tools) and A2A (agent coordination). [[source: ag-ui-protocol-specification-2026]](/wiki/raw/articles/ag-ui-protocol-specification-2026)

## The Three Agentic Protocols

```mermaid
graph LR
    User[User / Frontend UI] <-- "AG-UI (Agent-User Interaction)" --> Agent[Agent Runtime / Backend]
    Agent <-- "MCP (Model Context Protocol)" --> Tools[External Tools & Data]
    Agent <-- "A2A (Agent to Agent)" --> Subagents[Distributed Agents]
```

| Layer | Protocol | Primary Origin / Backers | Purpose |
| :--- | :--- | :--- | :--- |
| **Agent ↔ User** | **AG-UI** | [copilotkit](/wiki/copilotkit), LangChain, AWS, Microsoft | Standardizes streaming state, generative UI, client tools, and human-in-the-loop gates. |
| **Agent ↔ Tools & Data** | **MCP** | [anthropic](/wiki/anthropic) | Standardizes tool definitions, context injection, and resource prompts. |
| **Agent ↔ Agent** | **A2A** | Google | Standardizes distributed agent discovery, delegation, and message routing. |

 [[source: ag-ui-protocol-specification-2026]](/wiki/raw/articles/ag-ui-protocol-specification-2026)

## Protocol Primitives & Lifecycle Events

AG-UI models agent execution as a stateful, bi-directional event stream transported over Server-Sent Events (SSE) or WebSockets:

1. **Lifecycle & Text Streaming:** `RUN_STARTED`, `TEXT_MESSAGE_START`, `TEXT_MESSAGE_CONTENT`, `TEXT_MESSAGE_END`, `RUN_FINISHED`.
2. **Tool Execution Tracing:** `TOOL_CALL_START`, `TOOL_CALL_ARGS`, `TOOL_CALL_END`, `TOOL_CALL_RESULT`.
3. **Reasoning & Thinking:** `REASONING_START`, `REASONING_DELTA`, `REASONING_END` to display progress signals without leaking raw chain-of-thought tokens.
4. **Shared State Sync:** Streamed event-sourced snapshots and delta updates (`STATE_SNAPSHOT`, `STATE_DELTA`) between client state and agent memory.
5. **Human-in-the-Loop (HITL) Interrupts:** Protocol-level pause, approve, reject, or edit capabilities enabling gated tool execution.

## Architectural Patterns

### 1. Pure Event-to-Message Fold
Frontends (such as assistant-ui or CopilotKit) maintain a pure reducer that projects the session event log into the client message model. Replaying stored historical events and tailing live SSE streams execute through the exact same fold function, ensuring state consistency across page reloads. [[source: assistant-ui-claude-managed-agents-2026]](/wiki/raw/articles/assistant-ui-claude-managed-agents-2026)

### 2. Generative UI (Static & Declarative)
Rather than raw markdown alone, agent backends emit structured intents that client components mount as typed, interactive widgets (charts, forms, parameter selectors). [[source: ag-ui-protocol-specification-2026]](/wiki/raw/articles/ag-ui-protocol-specification-2026)

### 3. Multi-Surface Transport
Because AG-UI defines an event stream rather than a DOM rendering engine, it operates across React, React Native (native mobile components), Angular, and messaging platforms (Slack, Microsoft Teams) via channel adapters. [[source: copilotkit-cma-agui-2026]](/wiki/raw/articles/copilotkit-cma-agui-2026)

## Cross-links
- [agent native infrastructure](/wiki/agent-native-infrastructure) — underlying platform and runtime tier
- [claude managed agents](/wiki/claude-managed-agents) — cloud-hosted agent loop implementing AG-UI adapters
- [copilotkit](/wiki/copilotkit) — originating organization
- [anthropic](/wiki/anthropic) — MCP and CMA ecosystem partner

---

## Agent Navigation

cluster: agents (3 pages) | betweenness: 1

### References (outbound)
- [CopilotKit](https://pyweb.dev/wiki/copilotkit.md)
- [Anthropic](https://pyweb.dev/wiki/anthropic.md)
- [Agent-Native Infrastructure](https://pyweb.dev/wiki/agent-native-infrastructure.md)
- [Claude Managed Agents](https://pyweb.dev/wiki/claude-managed-agents.md)

### Referenced by (inbound)
- [Agent-Native Infrastructure](https://pyweb.dev/wiki/agent-native-infrastructure.md)
- [Claude Managed Agents](https://pyweb.dev/wiki/claude-managed-agents.md)
- [CopilotKit](https://pyweb.dev/wiki/copilotkit.md)

### Evidence (verified primary sources)
- [ag-ui-protocol-specification-2026](https://pyweb.dev/wiki/raw/articles/ag-ui-protocol-specification-2026.md) | origin: https://docs.ag-ui.com/introduction | ingested: 2026-08-30 | sha256: 8b80410f69645894bc388b55e3c1c9af2aea2308aa8fd3a2764280586ad9b445
- [copilotkit-cma-agui-2026](https://pyweb.dev/wiki/raw/articles/copilotkit-cma-agui-2026.md) | origin: https://www.copilotkit.ai/blog/claude-managed-agents-agui-compatible | ingested: 2026-08-30 | sha256: fd039f20d339482af3c4c6eefce6b6c2d5c621cf76815b45ff2a5cd5074cfeef
- [assistant-ui-claude-managed-agents-2026](https://pyweb.dev/wiki/raw/articles/assistant-ui-claude-managed-agents-2026.md) | origin: https://www.assistant-ui.com/docs/runtimes/claude-managed-agents | ingested: 2026-08-30 | sha256: 4dedb8e6f8c04ea58b2dcd8c7b61b16594bb11c60c8dc1b3f461dcf68c7e67db

### Machine endpoints
- Knowledge graph: https://pyweb.dev/api/graph.json
- Graph analysis: https://pyweb.dev/api/graph-analysis.json
- Context index: https://pyweb.dev/llms.txt
