UI as rendering engine
The assistant has no screens of its own. The app publishes what it has, and the agent decides what to do with it.
The problem
Most AI features end up as a second app inside the chat panel. A mini table shows results, a preview card shows a dashboard, and a “create alert” flow half-matches the real one. Every product change has to ship twice, and the chat copy is always a release behind.
It’s also a trust problem. If the assistant shows you things through its own widgets, you’re learning two products, and you can never be sure the chat version behaves like the real one.
What I concluded
Flip it. The app is the assistant’s eyes, hands and renderer. The server never names a UI type. On every request, the app says what exists right now, and the agent works through that.
┌────────── the app publishes, per request ──────────┐
where to go │ site map: every page and what it's for │
on screen │ the page, its filters, what its data is │
can do │ actions every mounted page registered │
can make │ payload kinds, each a name and a schema │
└──────────────────────────┬──────────────────────────┘
▼
agent: navigate · filter · run an action · make
│
┌────────────────────────┴───────────────────────┐
▼ ▼
the real control runs a card → the real page or form,
(Back undoes it) filled in, unsaved
Each of those lists has exactly one owner, and none of them is the assistant team.
One list of actions
The clearest example is actions. The command palette, the agent’s tools and the page’s own buttons usually become three lists of the same things, kept in sync by hand. They drift: the agent offers an action the page dropped, or the palette misses one the agent can do.
So pages register their actions in one store, and only while they’re mounted:
useRegisterAction({
name: "export-csv",
title: "Export to CSV", // what the palette row says
description: "Download the visible orders.", // what the model reads
input: z.object({}),
run: (_, app) => app.download(currentRows()),
});
The palette reads that store, and so does the agent. A page that adds an action gets it in both places at once. The person and the AI always have the same buttons, because there’s only one list.
Rules
- The assistant gets no UI of its own. If it needs to show something, a real page or form shows it.
- Publishing is a side effect of building the feature. A page that registers an action, or a form that declares a schema, gets assistant support without anyone touching the server.
- Only what’s mounted counts. When the page unmounts, its actions leave the list, so the agent can’t use a control that isn’t on screen.
- Anything that changes the screen goes through the router, so Back undoes it whether a person or the agent did it.
What you get
One product, not two. Whatever people can see, click or create, the assistant can see, click or draft, through the same components, permissions and save paths. The AI work moves to where it actually pays: understanding the request and filling in the shape well.
The other two pieces of this idea are Payload renderers and Navigation. The trust side is Agent as broker.