Presentation
OpenUI layouts, charts, tables, and interactive forms inside Agent replies
Presentation lets Agents use charts, comparison cards, tables, and parameter controls in Desktop replies. Ask for a compound-interest chart with an adjustable rate, or a visual comparison of your options.
Text and modules follow their creation order. A successful module replaces its redundant successful tool activity; running, failed, and waiting-for-response states remain visible.
Modules follow Desktop typography, theme, and control radii, with a single thin border, prominent key metrics, slim sliders, and compact controls. Standard cards stay transparent, tables use compact spacing, and charts soften supporting grids while retaining series colors. Newly generated modules favor a title, metrics, chart, controls, and actions, avoiding repeated headings and nested decorative cards.
Text inside modules uses the same Markdown dialect as reply prose: tables render as real tables, mermaid fences render as zoomable, fullscreen-capable diagrams, math goes through KaTeX, and local images reuse the controlled file protocol.
Generation and interaction
Local parameters, filtering, reset, and submitting the current parameters to the Agent are supported. Changing a control does not call the model. An explicit submit action continues the conversation. Recent view state is stored locally in Desktop and does not sync across devices.
A module at the message tail can appear progressively as complete statements arrive. Controls stay disabled until final validation. This requires tool-argument deltas from the model provider. Unsupported or ordering-sensitive paths display the completed module instead.
After publication, the reply can finish and the interface remains interactive; the Agent does not need to wait for a click. Distinct requested modules can be published in sequence. Successful content does not need to be generated again for confirmation.
Action
presentation.show accepts content and fallback_text. Content is OpenUI Lang with positional arguments. Declare root first, then define referenced components and data.
{
"content": "root = Stack([header, chart, buttons])\nheader = CardHeader(\"Growth comparison\")\nchart = LineChart([\"2024\", \"2025\"], [Series(\"Revenue\", [10, 20])])\nbuttons = Buttons([Button(\"Explain\", @ToAssistant(\"Explain these results\"))])\n",
"fallback_text": "Revenue increased from 10 in 2024 to 20 in 2025."
}The catalog exposes 74 components including companion items: product/concept/overview cards, key/value and content lists, steps, carousel, icons and icon buttons, Markdown, code, images and galleries, plus the existing layouts, tables, charts, and metrics. Inputs include dates, radio/checkbox groups, switches, chips, and option cards. Form submission includes current field values. $variables hold local state; @Set updates it, @Reset restores defaults, and @ToAssistant submits a question.
@CompoundValues and @YearLabels support compound interest: principal 0–10¹², decimal annual rate -1–1, and integer years 1–100.
Limits and fallback
Images accept genuine http(s) URLs, inline raster data, or authorized absolute local paths through Desktop's controlled file protocol. Relative paths must first be resolved to absolute paths. Loading failures preserve text; use text-only cards when no real image exists. Code is displayed, never executed.
Remote Query / Mutation, arbitrary business execution, and navigation are not exposed. EditableTable, Modal, and additional chart types remain unavailable. Content is limited to 240 KiB, 200 statements, and 32 nesting levels. Submitted parameters are limited to 16 KiB.
Missing renderers, unsupported versions, or component failures show the summary. Historical JSON Spec modules use text fallback too. This release uses MIT-licensed OpenUI without requiring its hosted model services.