Show HN:AG-UI 协议——将智能体引入前端应用
Show HN: AG-UI Protocol – Bring Agents into Frontend Applications

原始链接: https://github.com/ag-ui-protocol/ag-ui

AG-UI 是一种开放的、轻量级的协议,它标准化了 AI 智能体与前端应用程序连接的方式,从而促进智能体与人之间无缝的交互。它设计简洁灵活,智能体发出标准的事件类型并接受简单的输入。中间件层确保了在各种环境和事件传输(如 SSE 和 WebSockets)下的兼容性。 AG-UI 源于实际经验以及与 LangGraph 和 CrewAI 等智能体框架的合作,支持诸如实时流式智能体聊天、双向状态同步、生成式 UI、上下文丰富、前端工具使用以及人机协同等功能。 AG-UI 提供了现成的客户端库,包括通过 CopilotKit 提供的 React 客户端,并且正在积极开发消息客户端。它鼓励为改进协议做出贡献,包括修复错误、编写文档和制作演示。

AG-UI(Agent-User Interaction Protocol,代理-用户交互协议)已正式发布,旨在标准化AI代理与前端应用程序的连接方式。AG-UI 是CopilotKit与多个代理框架合作的成果,它是一个开放且轻量级的基于事件的协议,旨在通过双向桥接统一后端代理与前端应用之间的连接。它支持任何事件传输机制(SSE、WebSockets、Webhook),并标准化了16种常见代理-用户交互的事件类型。 AG-UI 填补了代理通信中的特定空白,专注于应用内代理与人的交互,补充了像MCP(代理-工具)和A2A/ACP(代理-代理)这样的协议。此次发布受到了广泛好评,并且正在组建一个工作组来进一步发展该协议。AG-UI协议旨在解决以客户端无关的方式显示代理活动的需求,例如工作、思考、调用工具、遇到错误或需要人工输入/批准。

原文

AG-UI Working Group #1 – May 16 Bring Agents Into Apps with AG-UI – May 16

AG-UI is an open, lightweight, event-based protocol that standardizes how AI agents connect to front-end applications.

➡️ See demos of AG-UI-enabled applications here

ag-ui Logo

AG-UI is an open, lightweight, event-based protocol for agent-human interaction, designed simplicity & flexibility:

  • During agent executions, agent backends emit events compatible with one of AG-UI's 16 standard event types
  • Agent backends can accept one of a few simple AG-UI compatible inputs as arguments

AG-UI includes a flexible middleware layer that ensures compatibility across diverse environments:

  • Works with any event transport (SSE, WebSockets, webhooks, etc.)
  • Allows for loose event format matching, enabling broad agent and app interoperability

It also ships with a reference HTTP implementation and default connector to help teams get started fast.

Learn more at ag-ui.com

AG-UI was developed based on real-world requirements and practical experience building in-app agent interactions.

It was shaped through:

  • Working with users in the CopilotKit community to understand the needs of agent-based interactions in applications
  • Collaborating closely with leading agent frameworks (LangGraph, Mastra, CrewAI, AG2, etc.)
  • Extracting common infrastructure patterns that emerged across varied frameworks into a standardized, open protocol

This practical approach has helped ensure that AG-UI is both flexible and immediately applicable in real-world use cases.

Build AG-UI-Powered Applications

Play with this hello-world app here: https://agui-demo.vercel.app/

Video:

agui-hello-world-2.mp4

AG-UI Compatible Agent Frameworks

AG-UI works with several popular agent frameworks and frontend solutions:

AG-UI-compatible agents securely and efficiently support:

  • 💬 Agentic chat with real-time streaming
  • 🔄 Bi-directional state sync (in and out of chat)
  • 🧩 Generative UI and structured messages (with delta streaming)
  • 🧠 Realtime context enrichment
  • 🛠️ Frontend tool use (tool calls)
  • 🧑‍💻 Human-in-the-loop and human-on-the-loop collaboration

And more. Learn more at ag-ui.com

AG-UI Showcase: The AG-UI Dojo (Building-Blocks Viewer)

The ag-ui dojo showcases many of the building blocks that ag-ui supports.

The building blocks are designed to be simple and focused -- between 50-200 lines of code.

dojo-hello.mp4

AG-UI provides ready-to-use client libraries for building connected experiences:

  • React client via CopilotKit
  • Messaging clients (WhatsApp, WeChat, RCS) — WIP in collaboration with AWS SNS

Build New AG-UI Framework Integrations

Learn how to build AG-UI hooks for a new framework: Framework Integration Guide

We 💜 contributions! Whether you're fixing bugs, improving documentation, or building demos — your contributions make AG-UI better.

联系我们 contact @ memedata.com