Docs

Apps & Interfaces · 07.09

Surfaces Are Typed, Not HTML

A surface is a typed ViewNode tree — layout, data-bound views, interactions, and agent-native widgets an agent can render, patch, and lint safely.

AG-UIViewNode

Generated from a prompt, validated before it ever renders

An App surface is authored from a natural-language prompt plus the App's own collection schemas: a structured-completion model is asked to produce a typed ViewNode tree — the exact same grammar the renderer and the agentis.ui.render chat tool both speak — which is then validated against the view schema. The generator is model-agnostic by construction, speaking only a plain structured-completion contract with no per-model temperature or response-format negotiation, so any configured model works identically.

Never left empty, never left broken

If the model's output fails to parse, generation falls back to a deterministic starter scaffold built directly from the collection shapes — an agent-authored surface is never just blank. And regardless of whether a surface came from the model or the fallback, every result passes through a separate deterministic repair pass before it's ever returned, which is where a surface actually gets made safe to render (see Bounded Styling & Operability).

Continue