// Agent profile
AG-UI (Agent-User Interaction Protocol) is an open protocol from the ag-ui-protocol organization that defines a universal contract for how AI agents communicate with frontend applications. Rather than each agent framework inventing its own streaming format, AG-UI provides a standardized event-driven protocol for text streaming, tool execution, state synchronization, and lifecycle management between any agent backend and any UI frontend. The protocol ships with TypeScript and Python SDKs, React hooks, and adapters for LangGraph, Mastra, AG2, and CrewAI. MIT licensed. The core idea: agents should be interchangeable at the protocol level, the same way databases are interchangeable behind SQL.
AG-UI solves a fragmentation problem in the agent ecosystem: every agent framework streams output to frontends in its own format, and every frontend that wants to support multiple agent backends needs custom integration code for each one. AG-UI defines a shared protocol — a set of typed events that any agent can emit and any UI can consume — so the integration is written once.
The protocol covers the full interaction lifecycle: starting a run, streaming text tokens, executing tools (with the UI optionally rendering tool calls and results), synchronizing shared state between agent and frontend, and handling errors and cancellation. It is event-driven and transport-agnostic — the reference implementation uses HTTP Server-Sent Events, but the protocol works over WebSockets or any ordered message channel.
AG-UI is organized into three layers:
Protocol layer: A typed event schema defining every message an agent can send to a UI and vice versa. Events include TEXT_MESSAGE_START, TOOL_CALL_START, TOOL_CALL_RESULT, STATE_SNAPSHOT, RUN_STARTED, RUN_FINISHED, and others. Each event has a defined shape, making the protocol self-documenting and statically verifiable.
SDK layer: TypeScript and Python packages that handle serialization, event dispatch, and connection management. The TypeScript SDK includes React hooks (useAgent, useAgentStream) that make it straightforward to build reactive UIs that respond to agent events. The Python SDK provides both client and server utilities.
Adapter layer: Pre-built adapters for popular agent frameworks — LangGraph, Mastra, AG2, CrewAI — that translate each framework’s native output into AG-UI events. Adding support for a new framework means writing one adapter, not modifying the protocol.
Framework interoperability: A frontend built on AG-UI can switch between LangGraph, CrewAI, or a custom agent backend without changing the UI code. The adapter layer handles translation.
Streaming-first design: Text arrives token by token, tool calls stream their progress, and state updates are pushed incrementally. The protocol is designed for real-time interfaces, not request-response polling.
State synchronization: Agents and frontends can share structured state — form fields, document content, configuration — through the protocol. Changes propagate bidirectionally, enabling collaborative interfaces where both the human and the agent edit the same artifact.
Tool rendering: When an agent calls a tool, the UI receives structured events describing the call, its arguments, and its result. This enables rich tool-call visualization — showing a code execution tool’s output, a search tool’s results, or a file-edit tool’s diff inline in the conversation.
Teams building agent-powered applications that need to support multiple agent backends. Developers creating reusable UI components for agent interactions. Organizations standardizing how agents communicate with their frontend platform. Framework authors who want their agents to work with any compliant UI without custom integration.
AG-UI is a protocol, not a framework — it defines the contract but does not make architectural decisions about how agents work internally. Teams still choose their agent framework independently. The adapter ecosystem is growing but does not yet cover every framework. The protocol favors streaming interfaces; request-response-only use cases may not benefit as much.
Frontend developers building UIs for AI agents. Backend teams shipping agent services that need a stable frontend contract. Platform teams standardizing agent integration across multiple products. Framework authors who want out-of-the-box UI compatibility.
Rust-based browser automation CLI from Vercel Labs that lets AI agents drive browsers one command at a time via accessibility-tree snapshots.
Rust-based desktop computer-use framework from Vercel Labs — agents control apps via accessibility trees instead of screenshots.
Builder.io's open-source framework for building agent-native applications — shared actions, SQL-backed state, identity, tools, skills, jobs, observability, and UI surfaces that all work together.