A2UI:一种基于代理驱动的界面协议
A2UI: A Protocol for Agent-Driven Interfaces

原始链接: https://a2ui.org/

## A2UI:安全且通用的AI生成用户界面 A2UI(版本0.8,Apache 2.0许可)是谷歌推出的一款新系统,并汇集了社区贡献,它使AI代理能够在Web、移动和桌面端创建丰富的交互式用户界面,*无需*执行代码。它解决了在代理和客户端之间安全共享用户界面的难题。 A2UI不使用文本或有风险的代码,而是使用声明式的JSON格式——一种“通用UI语言”——允许代理描述UI组件,客户端原生渲染。这种“安全设计”方法可以防止UI注入攻击,并且易于由LLM增量生成。 主要特性包括框架无关的渲染(Angular、Flutter、React等)、实时更新的渐进式渲染以及对自定义组件的支持。A2UI目前处于公开预览阶段,并积极寻求在GitHub上的反馈和贡献。演示展示了代理构建完整的应用程序,并动态选择合适的UI元素,例如图表和地图。

## A2UI:代理驱动界面 - Hacker News 摘要 A2UI (a2ui.org) 提出了一种用于构建由代理驱动的用户界面协议,允许动态UI生成。在Hacker News上讨论中,该概念被认为在数据可视化(例如商业智能图表)等用例中具有前景。 然而,评论员们提出了安全方面的担忧。潜在漏洞包括“幻觉”和提示注入,尤其是在自动生成的交互元素(如购买确认)中——这表明谨慎的沙箱机制至关重要。 有趣的是,一位评论员希望A2UI能够*激励*更好的UI/UX可访问性,因为代理兼容性可能会促使开发者实现这些功能。另一位用户表达了希望*知道*何时某个应用使用了这种代理驱动的方法,同时仍然承认底层协议的价值,该协议不需要LLM。
相关文章

原文

A2UI Logo

A2UI Logo

A2UI enables AI agents to generate rich, interactive user interfaces that render natively across web, mobile, and desktop—without executing arbitrary code.

️Status: Early Stage Public Preview

A2UI is currently in v0.8 (Public Preview). The specification and implementations are functional but are still evolving. We are opening the project to foster collaboration, gather feedback, and solicit contributions (e.g., on client renderers). Expect changes.

At a Glance

A2UI is currently v0.8, Apache 2.0 licensed, created by Google with contributions from CopilotKit and the open source community, and is in active development on GitHub.

The problem A2UI solves is: how can AI agents safely send rich UIs across trust boundaries?

Instead of text-only responses or risky code execution, A2UI lets agents send declarative component descriptions that clients render using their own native widgets. It's like having agents speak a universal UI language.

In this repo you will find A2UI specifications and implementations for renderers (eg: Angular, Flutter, etc.) on the client side, and transports (eg: A2A, etc.) which communicate A2UI messages between agents and clients.

  • Secure by Design


    Declarative data format, not executable code. Agents can only use pre-approved components from your catalog—no UI injection attacks.

  • LLM-Friendly


    Flat, streaming JSON structure designed for easy generation. LLMs can build UIs incrementally without perfect JSON in one shot.

  • Framework-Agnostic


    One agent response works everywhere. Render the same UI on Angular, Flutter, React, or native mobile with your own styled components.

  • Progressive Rendering


    Stream UI updates as they're generated. Users see the interface building in real-time instead of waiting for complete responses.

Get Started in 5 Minutes

How It Works

  1. User sends a message to an AI agent
  2. Agent generates A2UI messages describing the UI (structure + data)
  3. Messages stream to the client application
  4. Client renders using native components (Angular, Flutter, React, etc.)
  5. User interacts with the UI, sending actions back to the agent
  6. Agent responds with updated A2UI messages

End-to-End Data Flow

A2UI in Action

Landscape Architect Demo

Watch an agent generate all of the interfaces for a landscape architect application. The user uploads a photo; the agent uses Gemini to understand it and generate a custom form for landscaping needs.

Custom Components: Interactive Charts & Maps

Watch an agent chose to respond with a chart component to answer a numberical summary quesiton. Then the agent chooses a Google Map component to answer a location question. Both are custom components offered by the client.

A2UI Composer

CopilotKit has a public A2UI Widget Builder to try out as well.

A2UI Composer

联系我们 contact @ memedata.com