最近推送 2026-11-15 00:02(17 天前),属于活跃维护
ag-ui-protocol/ag-ui
GITHUB中文整理主语言 TypeScript · 22,359 星 · MIT · 创建于 2025-05-07
AG-UI 是一个开放、轻量的事件协议,用于统一 AI 智能体与前端应用之间的连接方式,属于协议标准而非具体框架。
仓库健康度
5 个维度开放 Issue 591 个 · Fork 1,582 个
24 小时 +30 · 7 日 +669 · 30 日 积累中
许可证 MIT · 5 个 topics · 开了 Wiki
这一项暂无数据,不代表项目没有发布
「证据不足」表示这项数据暂时没有取到,不能读成「项目有问题」;「部分数据」表示只拿到一部分信号。版本发布要额外调 Releases 接口,下一版补。
Star 趋势
18 天记录横轴 2026-11-15 → 2026-12-02,纵轴按这段时间的最小/最大值拉伸。趋势来自站内每天记录一次的星数,页面打开时不会实时请求 GitHub。
它解决什么问题
据 README 归纳智能体与用户界面之间缺少统一的交互约定,后端事件格式和前端接入方式各不相同,导致集成成本高、互通困难。AG-UI 用标准事件类型和简单输入规范来消除这种割裂。
核心能力
6 条- 1定义约 16 种标准事件类型,规范智能体执行期间后端向界面发送的事件
- 2接受少量简单输入参数,供智能体后端接收前端传来的上下文
- 3兼容任意事件传输方式,如 SSE、WebSockets、webhooks 等
- 4通过中间件层适配不同运行环境
- 5提供参考 HTTP 实现和默认连接器,方便团队快速起步
- 6允许宽松的事件格式匹配,提升智能体与应用的互操作性
项目画像
6 个角度项目定位
AG-UI 是一个开放、轻量的事件协议,用于统一 AI 智能体与前端应用之间的连接方式,属于协议标准而非具体框架。
适合谁
需要把 AI 智能体接入前端应用的开发团队,以及希望让自家框架或平台兼容统一交互协议的建设者。
典型场景
为带智能体的应用实现实时流式对话界面;在智能体执行过程中与前端双向同步状态,让界面随执行进展更新;把前端工具接入智能体流程,并支持人在回路中的协作;基于参考 HTTP 实现和默认连接器搭建可运行的智能体交互应用
部署难度
可通过脚手架命令创建初始应用,项目提供参考 HTTP 实现与默认连接器;具体前置依赖和完整部署步骤未详细说明。
风险限制
采用宽松的事件格式匹配,可能对严格类型校验的场景带来额外处理;具体环境依赖与版本要求未在项目说明中列出。
最近维护
最近一次推送是 2026-11-15 00:02。 实现方式:智能体后端在执行时按标准事件类型发出事件,前端通过任意事件传输通道接收并渲染;后端也可接收约定的简单输入作为参数,中间件层负责在不同环境间做兼容适配。
README 原文细节
4 个板块核心功能README 里列出来的能力清单
Features: what you can build
Each building block maps to events in the spec, and each has a live demo in the AG-UI Dojo.
Tool output streaming, backend tool rendering, activity progress, token usage, and custom events are covered in the docs. Here's a quick tour of the Dojo:
- Streaming chat — Token-by-token messages across multi-turn sessions, with cancel and resume — Demo
- Generative UI — Agents render typed components, or declarative UI with A2UI and MCP Apps — Demo
- Shared state — A typed store the agent and app both read and write, synced with snapshots and JSON Patch deltas — Demo
- Frontend tools — The agent calls tools that run in the app, and gets the result back — Demo
- Human in the loop — Runs end with an interrupt outcome; the user approves, edits, or rejects, and the next run resumes — Demo
- Reasoning — Show the agent's reasoning as it works, including encrypted reasoning round-trips — Demo
- Subagents — Nested delegation, with every event attributed to the subagent run that produced it — Demo
- Multimodal — Images, audio, video, and documents in user input and tool results — Demo
怎么安装从零跑起来的步骤
Quick start
Start a new app. The CLI scaffolds a frontend (CopilotKit on Next.js, or a terminal client) wired to the agent framework you pick:
Then follow the printed next steps. The generated templates call OpenAI, so set your key before npm run dev:
Or speak the protocol directly: a 30-line agent server and client
An AG-UI agent is any HTTP endpoint that accepts a RunAgentInput and streams events back. No API keys needed for this one.
npx create-ag-ui-app@latest
实现原理它内部是怎么做的
How it works
Your app starts a run by sending the agent a single RunAgentInput: the conversation, the tools the frontend offers, shared state, and context. The agent answers with a stream of typed events from eight families: run lifecycle, text messages, tool calls, state, reasoning, activity, subagents, and custom events (full list). Only the run lifecycle is required, so a minimal agent emits a handful of events and grows from there.
AG-UI is transport-agnostic. The spec defines HTTP + SSE and a binary HTTP + Protobuf binding, and middleware can adapt events from any source. Read the architecture overview for the full picture.
其它说明README 里剩下的内容
Full list of integrations
Source for every integration lives in integrations/ and middlewares/, and the demos in apps/dojo.
- Partners: LangChain · CrewAI
- Specs: Oracle Agent Spec
- Deployment: Amazon Bedrock AgentCore
SDKs
- TypeScript — npm install @ag-ui/client — Docs · Source
- Python — pip install ag-ui-protocol — Docs · Source
- .NET — dotnet add package AGUI.Client — Docs · Source
Event reference
AG-UI 1.0 defines 31 event types in eight families. See the spec for every field.
- Runs and steps — RUNSTARTED RUNFINISHED RUNERROR STEPSTARTED STEPFINISHED
- Text messages — TEXTMESSAGESTART TEXTMESSAGECONTENT TEXTMESSAGEEND TEXTMESSAGECHUNK
- Tool calls — TOOLCALLSTART TOOLCALLARGS TOOLCALLEND TOOLCALLRESULT TOOLCALLCHUNK
- State — STATESNAPSHOT STATEDELTA (JSON Patch) MESSAGESSNAPSHOT
- Reasoning — REASONINGSTART REASONINGMESSAGE REASONINGENCRYPTEDVALUE REASONINGEND
- Activity — ACTIVITYSNAPSHOT ACTIVITYDELTA
- Subagents — SUBAGENTSTARTED SUBAGENTFINISHED SUBAGENTERROR
- Passthrough — RAW CUSTOM
关于 ag-ui 的常见问题
7 个问题ag-ui 是做什么的?
AG-UI 是一个开放、轻量的事件协议,用于统一 AI 智能体与前端应用之间的连接方式,属于协议标准而非具体框架。 智能体与用户界面之间缺少统一的交互约定,后端事件格式和前端接入方式各不相同,导致集成成本高、互通困难。AG-UI 用标准事件类型和简单输入规范来消除这种割裂。
ag-ui 有哪些功能?
核心能力:定义约 16 种标准事件类型,规范智能体执行期间后端向界面发送的事件;接受少量简单输入参数,供智能体后端接收前端传来的上下文;兼容任意事件传输方式,如 SSE、WebSockets、webhooks 等;通过中间件层适配不同运行环境;提供参考 HTTP 实现和默认连接器,方便团队快速起步;允许宽松的事件格式匹配,提升智能体与应用的互操作性。
ag-ui 适合谁用?
需要把 AI 智能体接入前端应用的开发团队,以及希望让自家框架或平台兼容统一交互协议的建设者。
ag-ui 是怎么工作的?
智能体后端在执行时按标准事件类型发出事件,前端通过任意事件传输通道接收并渲染;后端也可接收约定的简单输入作为参数,中间件层负责在不同环境间做兼容适配。
怎么安装 ag-ui?
按项目 README 的说明:Start a new app. The CLI scaffolds a frontend (CopilotKit on Next.js, or a terminal client) wired to the agent framework you pick:;Then follow the printed next steps. The generated templates call OpenAI, so set your key before npm run dev:。完整命令见下方「怎么安装」一节或 GitHub 仓库的 README。
用 ag-ui 有什么门槛或限制?
采用宽松的事件格式匹配,可能对严格类型校验的场景带来额外处理;具体环境依赖与版本要求未在项目说明中列出。
ag-ui 现在还在维护吗?数据怎么样?
目前 22,359 星,1,582 个 Fork,主语言 TypeScript,创建于 2025-05-07,最近一次推送 2026-11-15 00:02,许可证 MIT。星数、Fork、推送时间都是 GitHub 返回的实时数据,「最近推送」离现在越近说明越活跃;长期不动要留意是否已停止维护。
这些内容来自哪
读法说明项目数据取自 GitHub 官方接口与项目 README;星数、Fork、语言与时间以 GitHub 页面为准,档案更新于 2026-11-29 11:42。