Principles
Rules every GenUI component follows. Agents should follow them too.
Show UI only when interaction is needed
A question deserves an answer, not a widget. Every component's guidance lists the cases where text is the better response. Generated UI is also the wrong choice for tasks people repeat every day, where they rely on muscle memory.
Data-bound, not guessed
Schema fields marked DATA-BOUND must come from a tool result: current values, IDs, options and prices. The agent never types an identifier the system can provide.
Transparency before action
Anything that writes to an external system goes through a component that shows exactly what will change and lets the user edit it first. Irreversible actions (payments, deletes, anything sent to other people) are marked as such and never auto-confirm.
Closed actions
Components return a typed result with a fixed set of actions, such as confirm or reject. The model chooses an action; it never wires what a button does.
Streamable
Every component renders sensibly from partial props while the tool call is still streaming, and disables actions until the payload is complete.
Shared props
| Prop | Meaning |
|---|---|
status | Lifecycle controlled by the host: streaming, ready, submitting and terminal states |
onResult | Called once with the user's decision, typed per component |
result | A decision from history. Renders the finished state and never calls onResult again |
editable | The user may change generated values before submitting |