跳转至

A2UI — Agent-to-UI Protocol

Open spec from Google. Agents emit a declarative component tree that the client renders using its own trusted catalog (Card, Button, TextField, …).

Default catalog

Python
from apogee_ai_comunication import DEFAULT_CATALOG
print([t for t in DEFAULT_CATALOG.components])
# Card, Button, TextField, Form, Table, Chart, Text, Image, Container

Render and validate

Python
from apogee_ai_comunication import NativeA2uiRenderer, ReactPayloadEmitter, UiComponent

tree = UiComponent(
    type="Card",
    props={"title": "Profile"},
    children=(UiComponent(type="Text", props={"value": "Hello"}),),
)
renderer = NativeA2uiRenderer()
print(renderer.render(tree))           # validate + serialize
print(ReactPayloadEmitter().emit(tree))  # JSON for React clients

The renderer rejects unknown component types, props the catalog forbids and children on leaf components — surfaces those problems in out["problems"].