a2ui
БесплатноБез исполняемых скриптовНе проверенLets an AI agent describe a user interface as declarative JSON that a client renders with its own trusted components. Use when a user asks to generate forms…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
A2UI — agent-to-user interface protocol
Overview
A2UI is an open protocol (Apache 2.0, early public preview) in which an agent sends a JSON description of a UI instead of code or markdown. The client maps each described component to a widget from its own catalog of approved components (Card, Button, TextField, and so on), so the payload is data: safe to accept from a remote agent, yet interactive. The same payload can render in Lit web components, Angular, React or Flutter.
Per the README, the current production release is v0.9.1 within the v0.9 family, the v1.0 specification is a release candidate and v0.8 is legacy. Expect changes: always read the schema in the repository's specification/ folder for the version in use rather than relying on memory.
The model of operation: the agent streams messages over a transport (A2A, AG-UI or any other); the client builds a surface from them; user actions flow back to the agent as events.
Instructions
Message format (v0.9)
Each message is one JSON object with a version ("v0.9" or "v0.9.1" are both accepted by the schema) and exactly one of four keys. Streams are usually written one message per line (JSONL).
createSurface:surfaceId,catalogId, optionaltheme, optionalsendDataModel(the client then attaches the surface's data model to every action it sends back). Must come first; creating an existing surface is an error.updateComponents:surfaceIdand a flatcomponentslist. One component must haveid: "root".updateDataModel:surfaceId, optional JSON-Pointerpath(default/) andvalue. Omittingvalueremoves the key.deleteSurface:surfaceId.
Components are a flat list linked by ID, not a nested tree. Containers name their children: Card and Button take child, Row, Column and List take children. Order does not matter, and the agent may send parts incrementally.
Values can be literals or bound to the data model: "value": {"path": "/booking/name"} reads and (for inputs) writes /booking/name. Validation lives in checks with functions such as required, regex, length, numeric and email.
The basic catalog (id https://a2ui.org/specification/v0_9/catalogs/basic/catalog.json) has these components: Text, Image, Icon, Video, AudioPlayer, Row, Column, List, Card, Tabs, Modal, Divider, Button, TextField, CheckBox, ChoicePicker, Slider, DateTimeInput. Its functions: required, regex, length, numeric, email, formatString, formatNumber, formatCurrency, formatDate, pluralize, openUrl, and, or, not. Check property names against catalog.json; for example a Button's label is a separate Text component referenced by child.
Actions and the return path
A Button's action is either an event to the server or a local function call:
{"action": {"event": {"name": "reserve_table", "context": {"restaurant": "trattoria-verde"}}}}
{"action": {"functionCall": {"call": "openUrl", "args": {"url": "https://a2ui.org"}}}}
The client replies with an action message: name, surfaceId, sourceComponentId, an ISO timestamp and the context. If the surface was created with sendDataModel: true, the full data model travels in transport metadata (a2uiClientDataModel). Clients also advertise supported catalogs in a2uiClientCapabilities.supportedCatalogIds, and may report an error message when a payload fails validation.
Validate an agent's output
The repository publishes JSON schemas. Clone it, then validate each line against server_to_client.json. The catalog schema is referenced by a relative catalog.json, so register it under that address too:
import json
from jsonschema import Draft202012Validator
from referencing import Registry, Resource
SPEC = "a2ui/specification/v0_9_1"
files = [f"{SPEC}/json/{n}.json" for n in ("server_to_client", "common_types")]
files.append(f"{SPEC}/catalogs/basic/catalog.json")
resources = [(json.load(open(f))["$id"], Resource.from_contents(json.load(open(f)))) for f in files]
catalog = json.load(open(f"{SPEC}/catalogs/basic/catalog.json"))
resources.append(("https://a2ui.org/specification/v0_9/catalog.json", Resource.from_contents(catalog)))
validator = Draft202012Validator(json.load(open(f"{SPEC}/json/server_to_client.json")),
registry=Registry().with_resources(resources))
for line in open("booking.jsonl"):
for error in validator.iter_errors(json.loads(line)):
print(error.message)
Install with pip install jsonschema (it needs a version that ships referencing). The official Python agent SDK also validates against the active catalog when it parses model output.
Official packages
From the project README (some are not published yet and are used from source):
- Python:
a2ui-core(messages, data model, catalog validation) anda2ui-agent-sdk(teaches the LLM a catalog and parses its reply into A2UI messages) on PyPI.a2ui-a2aanda2ui-adk(Google Agent Dev
Установить a2ui в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл a2ui?
Lets an AI agent describe a user interface as declarative JSON that a client renders with its own trusted components. Use when a user asks to generate forms, cards or dashboards from an agent, wants an agent to return UI instead of text, asks about the A2UI protocol, createSurface or updateComponents messages, catalogs, data binding, or the Lit, Angular, React and Flutter renderers. Covers the v0.9 message format, validating payloads and the official packages.
Как установить скилл a2ui?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл a2ui запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic