A declarative UI block protocol for agent responses. Structure survives the last mile: engines produce structured data (tables, timelines, charts), and AgentUI delivers that structure to the user's screen directly — instead of letting the model flatten it into prose and introduce transcription errors along the way.
This repository contains the protocol specification only (wire format, component schemas, security model). Reference implementations are maintained privately by the specification authors; the schemas are the contract.
- Structure survives the last mile. A model narrating a 12-palace chart will occasionally swap adjacent values (measured in production: engine says Shatabhisha, narration says *Dhanishta). Blocks bypass narration.
- Controlled catalog, not arbitrary HTML. Eight whitelisted components. No script injection surface; payloads are untrusted data.
- Forward-compatible via version negotiation. Events carry
uiVersion; a client that supports version N silently drops whole events above N.
| Component | Purpose |
|---|---|
keyvalue |
label/value overview card |
table |
record list |
form |
structured input — multi-step, conditional fields, validated |
timeline |
ordered periods with a "now" marker |
compare |
two-party dimension comparison (score bars) |
download |
client-side file export (Blob, never fetches) |
chart |
line / bar chart (SVG, no chart libraries) |
calendar |
day cards (almanac-style) |
Full contracts: spec/wire-protocol.md and
spec/schemas/*.schema.json.
- Payloads are data, not code. No block field is evaluated or injected
as HTML. The
downloadcomponent materializes files client-side fromfileText; it never fetches URLs found in a block. - Rendering is text-only. Reference implementations insert payload
strings via
textContent, neverinnerHTML. - Fail closed on garbage. Malformed blocks are dropped, not repaired.
- Both sides enforce caps. Producers clip; renderers clip again.
The JSON schemas in spec/schemas/ are the authoritative contract. A
consumer needs to:
- Parse
UIevents from the stream (SSE or any ordered channel) - Check
uiVersion ≤ your supported version; drop the whole event otherwise - Render only catalog-listed components; drop unknown ones
- Insert all payload strings via
textContent(or SVG equivalent) - Enforce the caps in the schemas defensively
Apache-2.0. © 2026 The AgentUI specification authors.