AG-UI(Agent-User Interaction 协议)AG-UI (Agent-User Interaction Protocol)
AG-UI (Agent-User Interaction Protocol)
把 agent 的一次运行变成一条结构化事件流,让前端能实时渲染文本、工具调用、共享状态和人工确认,而不是只等一个最终回答。Turn one agent run into a structured event stream so the front end can render text deltas, tool calls, shared state and human approvals in real time instead of waiting for a final answer.
AG-UI 是面向 agent 与前端的开放协议:客户端发起一次 run,agent 按顺序发事件,事件覆盖文本增量、工具调用、状态补丁、推理过程、中断与恢复。
它补的是「agent 到用户界面」这一段;MCP 管 agent 接工具,A2A 管 agent 之间协作,三者可以同时用。
AG-UI is an open protocol between an agent and a user-facing application: the client starts a run and the agent emits ordered events covering text deltas, tool calls, state patches, reasoning, interrupts and resumes.
It fills the agent-to-UI segment. MCP connects agents to tools, A2A connects agents to other agents, and AG-UI brings the agent into the interface; an application can use all three.
聊天框只能显示文本,但真实 agent 会调工具、改状态、停下来等人确认。没有统一事件流,每个框架都要自己写一套前端适配,换框架就重做。A chat box can show text, but a real agent calls tools, changes state and pauses for approval. Without a shared event stream every framework reinvents its own front-end adapter, and switching frameworks means rebuilding it.
AG-UI · Agent-User Interaction · 智能体前端交互协议