Skip to content

RFC: Agent-Composed UI via A2UI Protocol#25

Open
joshuajbouw wants to merge 8 commits into
mainfrom
rfc/agent-composed-ui
Open

RFC: Agent-Composed UI via A2UI Protocol#25
joshuajbouw wants to merge 8 commits into
mainfrom
rfc/agent-composed-ui

Conversation

@joshuajbouw

Copy link
Copy Markdown
Contributor

Summary

Proposes adopting Google's A2UI protocol as the rendering contract between capsules, the agent, and frontends. The agent owns the full layout composition — no predefined zones, slots, or hardcoded regions. The TUI is a dumb renderer that draws whatever component tree the agent describes.

Key decisions

  • A2UI adopted as-is — declarative component catalog, surface lifecycle, data binding, no-code security model. No custom extensions.
  • Agent is the UI designer — composes the entire layout using A2UI primitives. The pre-baked default TUI is just the agent's starting opinion.
  • Bus-based component discovery — capsules register UI components via ui.v1.request.describe, same pattern as tool discovery via tool.v1.request.describe. No manifest extensions.
  • Natural language customization — users reshape the UI by talking to the agent.
  • Frontend-agnostic — CLI maps A2UI to ratatui, web to React, Discord to Discord components.

Tracking

Proposes adopting Google's A2UI protocol as the rendering contract between
capsules, the agent, and frontends. The agent owns the full layout composition
with no predefined zones or hardcoded regions. The TUI is a dumb renderer.

Key decisions:
- A2UI adopted as-is, no custom extensions
- Bus-based component discovery (same pattern as tools)
- Agent composes the entire component tree
- Natural language layout customization
- Frontend-agnostic (CLI/web/Discord all render same descriptions)

Tracks astrid#629.
@joshuajbouw joshuajbouw changed the title RFC 0002: Agent-Composed UI via A2UI Protocol RFC: Agent-Composed UI via A2UI Protocol Mar 25, 2026
Topics carry no version — A2UI messages self-describe via the version
field in every payload. Decouples IPC routing from spec evolution.
The LLM calls tools (compose_ui, delete_surface). A UI capsule bridges
tool calls to A2UI IPC messages. IPC topics are internal plumbing between
capsules and frontends, not the LLM's interface.

Adds layers section, tool definitions, and updates composition flow.
Major revision:
- Agent observes existing IPC traffic directly, no ui_describe needed
- Capsules don't change — their existing events ARE the data sources
- Agent publishes to a2ui.* as a bus participant, not through tools
- Default layout on boot without LLM (static, cached on subsequent boots)
- Multi-principal surfaces — each agent gets its own A2UI scope
- Removed tool definitions, component discovery protocol, capsule changes
Components bind to IPC events via {topic, path} references. The runtime
subscribes to referenced topics and routes payload values to bound components
automatically. The agent describes structure + bindings, the runtime handles
plumbing. No agent involvement in routine data updates.
Traced through actual IpcPayload types and wire format:
- Custom payloads: field path is /payload/data/<field>
- Typed payloads (AgentResponse etc): path is /payload/<field>

Added end-to-end flow examples:
- Model name update: registry event → binding extraction → component render
- Layout change: user request → LLM → new structure+bindings → render

Binding syntax: {topic, path} where path is a JSON Pointer into the
full IPC message as it arrives on the wire.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant