Surfaces
The UI a Request carries: components, a data model, and the actions that send values back.
A notification has room for a title, a line and a few buttons. When your agent needs more, a form to check or a choice to make, it sends a Surface: a small UI that the Nibify app draws on the phone, in its own style.
This is the Surface of the invoice. invoice-flow has read the PDF, and before filing it asks the person to check the amount, the due date and the category:
The shape
A Surface is A2UI, the open protocol for agents that send UI, at version 0.9. It has three parts:
components, a flat list. Each one has anid, acomponenttype and its properties. A container names its children by id:childfor one,childrenfor several.root, which is always"root": the id of the component drawn first.dataModel, the values the Surface starts with.
The list is flat and the tree is in the ids. In the invoice, root is a Card whose child is the Column called body, and the children of body are the title, the four fields and the button.
The SDK has a constructor for every component, such as Text('title', { … }). It builds the same JSON, with the properties of each component typed.
The components
What each component is, and which properties it takes, is in the catalog: every component drawn as the phone draws it, with its JSON and what it sends back. It is the reference for them, and this page does not repeat it.
A Surface may use only the components of the catalog. Nibify checks every Surface when you send it, and refuses one the app could not draw with 422 surface_invalid, naming the component and the property at fault.
The data model
A field is bound to the dataModel by a JSON Pointer: "value": { "path": "/amount" } shows dataModel.amount, and writes back to it as the person types. The invoice starts from what the agent read in the PDF, 1240, 2026-10-30 and consulting. The person sees those values, corrects what is wrong, and the dataModel follows.
Nothing leaves the phone while they do. Values typed and not sent stay on that phone as a Draft, and the Request stays pending.
Actions and context
A Button carries an action: a name, and a context that says what to send with it. When the button is pressed, the app sends the name, and the context with every { "path": … } replaced by what the dataModel holds at that moment. In the invoice, File it sends the action file, and its context asks for all four fields.
The person changes the amount to 1420 and presses File it. The Request is answered, and this is what your agent reads:
context holds what the action asked for, exactly as it was on the screen: the amount is the string the person typed, and a choice is always a list. The dataModel itself never comes back, so if your agent needs a value, the action's context must name it. sourceComponentId is the id of the button that was pressed.
A Surface with quickActions
A Request can have both: buttons on the notification and a Surface in the app. The name of each quickAction must be an action the Surface sends, or the Request is refused: tapping it on the lock screen answers the same question without opening it.
An answer from the lock screen arrives with "sourceComponentId": "notification" and an empty context, because nothing was filled in. That is how your agent tells a tap on the notification from a button pressed in the app.
Older apps
Every component records the catalog version it arrived in. From the components a Surface uses, Nibify works out the oldest app that can draw it, and returns it as minCatalogVersion in the 201. If none of the person's phones is that recent, the Request is still created, with a catalog_version_too_low entry in warnings. The notification and its quickActions work on any version: only the Surface asks for an update.
On a Notification
A Notification can carry a Surface too, to show more than a line, as long as it only shows things. A button with an action is a question, and a question belongs to a Request.