Essay · Generative UI · Live Demo

Your Agent Answers in Paragraphs. It Should Answer in Interfaces.

Generative UI is the next output modality: the agent doesn’t describe the tool you need — it renders it. The architecture (specs, not pixels), the design rules, and a fully working playground below: type a request, watch the spec generate, use the interface it builds.

Series: Interfaces: tools, pictures, generated UI (part 3 of 4)
Also in this series: Tool Design · Seeing Agents · The Last Click
The short version

Half the answers agents give shouldn’t be prose. A comparison wants a table, a trend wants a chart, structured input wants a form, a routine wants a tracker — and an agent that can only emit paragraphs forces the user to be the renderer. Generative UI flips that: the agent’s answer is a working interface, generated on demand.

Ask an agent to compare three laptops and it writes you four paragraphs you must mentally rearrange into the table it should have drawn. Ask it to help you track workouts and it describes a tracking regimen instead of handing you the tracker. We spent two years teaching agents to use tools; the frontier flipping into view — Vercel’s AI SDK streaming React components, the AG-UI protocol standardizing agent–frontend events, Google’s A2UI, a DeepLearning.AI course on agents that emit charts and forms on demand — is agents that make tools: single-purpose, just-in-time interfaces, rendered in the conversation, alive to the click.

This is the point my whole series has been circling. Seeing Agents argued pictures beat prose for humans reading agents; generative UI is the same argument for humans reading answers. And the engineering that makes it safe is the same discipline as tool design — because a UI component the agent can emit is exactly a tool the agent can call, with a schema, a contract, and an eval.

01Specs, not pixels: the architecture that makes it safe

The naive version — let the model write raw HTML/JS into the page — is an XSS generator with a design problem. Every serious generative-UI system converges on the same shape instead:

the generative-ui pipeline request  → "track my workouts this week" intent   → component match: tracker · entities: workouts, week spec     → declarative JSON against a component schema — the agent's entire output validate → schema check; unknown components and props are REJECTED, not improvised render   → a deterministic renderer you wrote executes the spec — the model never touches the DOM

Everything good follows from that separation. Safety: the model emits data, not code — the blast radius is a rejected spec. Consistency: every generated UI is built from your design system’s components, so it looks like your product, not like a model’s HTML homework. Editability: a spec is state — the user (or the agent, next turn) can patch it incrementally instead of regenerating a blob. Evaluability: specs diff, validate, and replay — the whole trace-metric framework applies to interfaces the moment interfaces become structured output.

02The playground: the whole pipeline, live

Below is a working generative-UI agent — a compact intent compiler standing in for the LLM, emitting real specs into a real renderer. Type what you need, or tap an example. Watch the pipeline light up, read the spec it generated, then use the interface — the forms validate, the trackers check off, the timers run, the charts have tooltips. Then edit the spec JSON directly and watch the UI rebuild: that’s the editability argument, in your hands.

request intent: spec validate render

The spec — the agent’s entire output (edit me)

The rendered interface — live, use it

Honest architecture, small brain: intent extraction here is the same hashed-feature classifier as Prompt Studio, standing in for an LLM — the spec/validate/render pipeline is exactly what production systems run. Unknown component types are rejected at the validate stage; try breaking the JSON and watch the renderer refuse politely.

Play with the failure modes too — they teach the design rules. Ask for something outside the palette (“build me a 3D game”) and the agent falls back to the closest legal component instead of improvising: the palette is the guardrail. Change "type": "chart" to "type": "widget" in the spec and validation blocks it: unknown components don’t render, ever. That refusal is the entire security model, and it’s also why generated UIs stay on-brand — the model proposes, the design system disposes.

03The design rules

04Where generative UI goes wrong

· Not everything wants a widget. A yes/no question answered with a dashboard is worse than a sentence. The agent’s first decision is modality — text, table, chart, form — and “text” must stay a first-class answer, not a fallback of shame.

· Hallucinated data wearing a real chart. A rendered bar chart looks authoritative even when the numbers came from nowhere. Provenance rules from the domain-agents playbook apply: generated UIs display sourced data or visibly label synthesis — the playground’s charts caption their data source for exactly this reason.

· Accessibility doesn’t generate itself. Deterministic renderers are the fix here too — bake labels, focus order, and contrast into the components once, and every generated instance inherits them. A model free-styling HTML gets this wrong at scale.

Takeaways

  1. Interfaces are the second output modality. Agents that only write prose make the user do the rendering.
  2. Specs, not pixels. The model emits declarative JSON; your renderer owns the DOM. Safety, consistency, editability, and evals all fall out of this one separation.
  3. The palette is the guardrail. Reject unknown components at validation — the refusal is the security model.
  4. UI components are tools. Same schemas, same contracts, same seven sins, same evals.
  5. Patch, don’t regenerate. Specs are state; incremental edits make generation feel like collaboration.
  6. Wire every affordance and caption every dataset — trust in generated UIs is one dead button or one confident fake chart from gone.

The chat box was never the product. It was the bootstrap. The agents worth using next will answer the way good colleagues do — with the thing you actually needed, built while you watched.

Read next: Your Agent Isn't Dumb. Its Tools Are. · The Model Is a Guest. The Harness Is the House.

Cite this post
@misc{murugesan2026generative,
  author = {Murugesan, Sugeerth},
  title  = {Your Agent Answers in Paragraphs. It Should Answer in Interfaces.},
  year   = {2026},
  month  = {aug},
  url    = {https://sugeerth.github.io/blog/generative-ui/},
  note   = {Accessed: [date]}
}
SM
Sugeerth Murugesan Staff ML Engineer / Scientist · PhD in visualization · Intel / Intuit