In the realm of Agents:
MCP standardized Agent-to-Tool communication.
Agent2Agent protocol standardized Agent-to-Agent communication.
But there’s one piece still missing…
And that’s a protocol for Agent-to-User communication:
Let’s understand why this is important.
The problem
Today, you can build powerful multi-step agentic workflows using a toolkit like LangGraph, CrewAI, Mastra, etc.
But the moment you try to bring that Agent into a real-world app, things fall apart:
You want to stream LLM responses token by token, without building a custom WebSocket server.
You want to display tool execution progress as it happens, pause for human feedback, without blocking or losing context.
You want to sync large, changing objects (like code or tables) without re-sending everything to the UI.
You want to let users interrupt, cancel, or reply mid-agent run, without losing context.
And here’s another issue:
Every Agent backend has its own mechanisms for tool calling, ReAct-style planning, state diffs, and output formats.
So if you use LangGraph, the front-end will implement custom WebSocket logic, messy JSON formats, and UI adapters specific to LangGraph.
But to migrate to CrewAI, everything must be adapted.
This doesn’t scale.
The solution: AG-UI
AG-UI (Agent-User Interaction Protocol) is an open-source protocol by CopilotKit that solves this.
It standardizes the interaction layer between backend agents and frontend UIs (the green layer below).
Think of it this way:
Just like REST is the standard for client-to-server requests…
AG-UI is the standard for streaming real-time agent updates back to the UI.
Technically speaking…
It uses Server-Sent Events (SSE) to stream structured JSON events to the frontend.
Each event has an explicit payload (like keys in a Python dictionary) like:
TEXT_MESSAGE_CONTENT
for token streaming.TOOL_CALL_START
to show tool execution.STATE_DELTA
to update shared state (code, data, etc.)AGENT_HANDOFF
to smoothly pass control between agents
And it comes with SDKs in TypeScript and Python to make this plug-and-play for any stack, like shown below:
In the above image, the response from the Agent is not specific to any toolkit. It is a standardized AG-UI response.
This means you need to write your backend logic once and hook it into AG-UI, and everything just works:
LangGraph, CrewAI, Mastra—all can emit AG-UI events.
UIs can be built using CopilotKit components or your own React stack.
You can swap GPT-4 for Llama-3 locally and not change anything in the frontend.
This is the layer that will make your Agent apps feel like real software, not just glorified chatbots.
Resources to learn more about AG-UI:
Thanks for reading!