know.2nth.ai›Lab›The agent draws a screen
lab · A2UI v1.0

The agent answers with a screen.

Pick a request. A model replies in A2UI, Google's protocol for agent-driven interfaces: JSON that names components from a catalog this page allows. The middle pane shows exactly what came over the wire. The right pane is this page drawing it. Press a button on the rendered screen and the action goes back to the agent.

Live model repliesValidated against the catalogNo code on the wireTeaching renderer, not Google's SDK
1 · The request
2 · On the wire
Nothing sent yet.
3 · What this page draws
Pick a request to start.

Three things the demo is showing.

Data, not code

The reply is a description

Nothing in the middle pane is HTML or JavaScript. It is a flat list of components with IDs, plus a data model. This page builds every element itself and writes model text as plain text.

The app owns the look

Switch the design system

Use the toggle above the rendered screen. The messages do not change. The same reply is drawn by a different stylesheet, which is how one agent serves several apps.

The loop

Bad replies get sent back

Every reply is checked against the catalog. If it fails, the errors go back to the model once. The badge says whether you are looking at a first reply, a corrected one, or a stored fallback.

Read it honestly

This is a teaching renderer written for this page: ten components from the A2UI basic catalog, data bindings by path, no catalog functions, and nothing is streamed. Production apps use the official renderers for React, Angular, Lit, Flutter and SwiftUI. The message shapes follow the published v1.0 schemas.

The model is a general open-weights model on Workers AI with the catalog described in its prompt, not Google's agent SDK and not A2UI Express. It sometimes gets the format wrong, which is the reason the validation loop exists. The four presets carry a stored reply so the page always has something to draw; your own prompts do not, and may fail.

The facts in each preset are fictional and are given to the model in its prompt. Pressing a button changes nothing anywhere: the agent is told the action succeeded.

After three tests the page offers a "stay in touch" form once. That form is a stored A2UI screen, and it is the one place a button does something real: this page, not the model, sends your name and email to the 2nth CRM. You can dismiss it and carry on.