Generative UI
The question: What should an agent emit when it needs to show someone a dashboard?
How our agents show results as dashboards and reports instead of walls of text, and what we learned moving that from generated images to a small UI language.
What we think now
Revision 1, 2026-04-06.
- The agent describes what to show, it does not draw it. It picks from a closed set of 22 components and never emits a script.
- The output format decides whether a dashboard can stream. JSON cannot be rendered until it is complete; a line-based language (OpenUI Lang) can be rendered line by line.
- Moving from a Pydantic JSON schema to that language took a report from 30 to 40 seconds and about $0.50 to under 10 seconds and about $0.08, with 60 to 67% fewer tokens.
- Store the language as plain text in Postgres. That gives diffs, replay and audit, and the same text renders to the web (React) and to PDF (HTML with WeasyPrint).
Open questions
- Can a dashboard be a shared, stateful artifact where a click works as a prompt?
- Can the agent send a diff of the text instead of regenerating the whole dashboard?
- How should interactive controls behave in a PDF or a chat message?
Entries
- Generative UI in Production: Lessons from a Pydantic-to-DSL Migration 2026-04-06, start, 28 min, 9.2k tokens
Follow this journey: RSS. Plain text version: /journeys/generative-ui.md