A layout is the frame of the React app shell (style: app): the navigation,
style: app
the session list, the top bar, side panels and the phone chrome. The page
stays the page. Every page (chat, logs, config, a plugin page, a blocks page)
renders inside every layout, in the outlet the shell hands the frame. The
design is ADR 0003.
Layouts exist only in the app shell. The legacy dashboard style is not
dashboard
affected and renders exactly as before.
| Id | Title | What it is for | Opens on | Primary nav |
|---|---|---|---|---|
| chat-canvas (default) | Chat and Canvas | Chat beside a canvas of the artifacts the agent makes | chat | chat, artifacts, agents, cron, knowledge, sessions, config |
chat-canvas
chat
| chat | Chat | The Chat and Canvas frame without the canvas or artifact cards (same Paper look); what aiui run opens | chat | chat, agents, cron, knowledge, sessions, config |
aiui run
| workbench | Quiet Workbench | A quiet sidebar with your chats, and the page beside it | chat | chat, agents, knowledge, runs, config |
workbench
| command | Command Deck | Keyboard first: a command bar, session tabs and a run inspector | chat | chat, runs, agents, jobs, config |
command
| guided | Guided Studio | Plain language and large buttons; every step explained | start | start, chat, agents, templates |
guided
start
| mission | Mission Control | Agents, runs and approvals at a glance | overview | overview, agents, approvals, chat, runs, sessions |
mission
overview
classic is not a layout. It is the core's own frame (the sidebar and header
classic
the app shell had before layouts): always available, and the fallback.
A primary nav may name a page that is not there (a disabled record's page,
for example); the shell keeps only the ids the manifest carries.
Each built-in frame is its own design, built on the shared layout kit
(src/frontend/src/app-layouts/kit/: nav and session lists, page icons,
src/frontend/src/app-layouts/kit/
the connection line, phone sheet and tabs). Its page above has the regions,
keys, phone frame and the data it reads. The features only one layout uses
are lazy chunks of their own: the run inspector and command bar (Command
Deck), the step tracker (Guided Studio) and the mission board (Mission
Control). The Chat and Canvas frame shows the canvas of artifacts once the
artifacts feature (layout-features/artifacts, ADR track A) is in the
layout-features/artifacts
build; without it the canvas stays empty.
Each built-in layout is its own lazy chunk (layout-<id>), with the kit in
layout-<id>
layout-kit. The browser downloads only the chunks of the layout on screen;
layout-kit
an inactive layout costs nothing.
Layouts apply to style: app only. A layout chosen under another style is
ignored, and the server logs one warning:
layout ignored: style is 'dashboard'; use style: app. Choosing a layout
layout ignored: style is 'dashboard'; use style: app
never changes the style.
layout: is the existing LayoutConfig. Its chat position keys (mode,
layout:
LayoutConfig
mode
width, height) keep working. The layout keys are added next to them:
width
height
-
has at most 40 characters. classic is reserved: it is a valid default,
default
never an available entry.
available
layout: classic
it had before.
warning, and aiui validate reports it as 5103 (for example
aiui validate
layout: Bad_Id, or available: command where a list goes). The rest of
layout: Bad_Id
available: command
the section still applies.
set_layout(default=None, *, available=None, user_choice=None, primary=None, options=None)
raises ValueError for a malformed id. Call it before the server starts.
ValueError
AIUI_LAYOUT=<id> or AIUI_LAYOUT=classic sets the default for one run. A
AIUI_LAYOUT=<id>
AIUI_LAYOUT=classic
malformed value is ignored with a warning.
On the server, the default is the first of these that is set:
1. AIUI_LAYOUT
AIUI_LAYOUT
2. aiui.set_layout()
aiui.set_layout()
3. YAML layout:
4. the aiui run default: chat (only under aiui run; create_app() and PraisonAI keep the style default)
create_app()
5. the style default: chat-canvas for style: app
The shell manifest's layouts key carries the layouts the server offers
layouts
(available), its default and whether the viewer may choose
(userChoice). A shell that receives no layouts key (an older server)
userChoice
renders the classic frame.
In the browser, the shell renders the first of these that the server
offers:
1. A ?layout=<id> preview. It is kept for the tab (sessionStorage
?layout=<id>
aiui-layout-preview), so it survives navigation and reload, and it is
aiui-layout-preview
never saved as the viewer's choice. ?layout=classic previews the classic
?layout=classic
frame. Use it for screenshots and support links.
2. The viewer's own choice (localStorage aiui-layout), only when the server
aiui-layout
allows a user choice.
3. The server's default.
4. The classic frame.
A layout the server does not offer is never chosen, whatever is stored.
The viewer switches with the command palette ("Switch layout: …", group
"Layout"; one command per offered layout, named after its manifest title, and
Classic; the group is listed after the pages, with Preferences and Theme,
until a query ranks it higher) or with Settings → Appearance (a select of the same list, shown
only when the server allows a user choice). The choice is saved in this
browser and applies at once, without a reload: the frame and the page
remount, and chat state is kept. When the server does not allow a choice,
the palette commands still switch, for this tab only. Saving the choice per
user across devices is (planned) (no server-side preference store yet).
warning.
offered, otherwise to the first available layout, with one warning. With
nothing available, the shell uses classic.
layout (a plugin may still provide it; plugin layouts are only known once
the server runs), 5102 for a layout chosen while the style is not
app, and 5103 for a malformed entry.
app
Each built-in layout is a first-party record, builtin.layout-<id>:
builtin.layout-<id>
A disabled layout leaves the picker and takes its own pages with it.
A page can belong to a layout. Such a page is shell_only, so it is never in
shell_only
the page table, GET /api/pages or the dashboard. It is in the app shell
GET /api/pages
manifest only while a layout it names is offered. Its manifest row carries
layouts (and replaces, the page it stands in for while that layout is
replaces
active), and its source is the owning record, for example
source
builtin.layout-guided. The shell's nav shows such a page only while one of
builtin.layout-guided
its layouts is on screen; its URL renders under any layout.
Guided owns start (its Home, where / opens while Guided is the layout)
/
and templates. Mission's ops-overview, which replaces overview, arrives
templates
ops-overview
with the Mission frame (planned). A layout record adds a page only with
the frame that renders it.
Six built-in pages have a React page in the Pro design that renders inside
any layout frame (src/frontend/src/app-pages/, one lazy chunk each,
src/frontend/src/app-pages/
registered by builtin.overview, builtin.sessions, builtin.agents,
builtin.overview
builtin.sessions
builtin.agents
builtin.knowledge, builtin.logs, builtin.config and builtin.cron with the usual registerPage):
builtin.knowledge
builtin.logs
builtin.config
builtin.cron
registerPage
| Page | Design | What it shows |
|---|---|---|
| overview | ProOverview | A greeting and one sentence, "Today at a glance" tiles with sparklines, what needs your approval (the approvals feed plus the open chat's gates), agents, recent runs or chats, the model provider, a collapsible feature health list |
| sessions | ProList | Search (/), status chips, an agent filter, a sortable table (title, agent, messages, tokens, relative time, status), a detail panel, a labelled row menu, Delete with a confirmation |
sessions
| agents | ProList | Search (/), a model filter, one New agent button, a sortable table (monogram, name, description, model, tools, updated, status), a detail panel (temperature, tools, instructions, system prompt, Training history), Edit and New agent in that panel (name, description, model from /api/agents/models, temperature, instructions, system prompt), Duplicate, Delete with a confirmation, a skeleton while loading and Try again on an error; agents the app registers in code are read-only; on a phone the panel replaces the list |
agents
/api/agents/models
| knowledge | ProList | A joined stat strip (entries, files, semantic or keyword search, the store with a status chip in plain words), search (/) with marked snippets and the relevance the store reports, "Add knowledge" for text or files (drop zone, drag and drop onto the page, per-file progress and errors), a table (name, type, size, added), a detail panel (facts, content, Copy, Delete with a confirmation), Clear all; on a phone the detail replaces the list |
knowledge
| logs | ProLogs | Level toggles with counts, search with match navigation, Pause, Download, Clear with a confirmation |
logs
| cron | ProList | Search, status chips, New schedule, a table (schedule in words and as cron, in UTC; next and last run; an enabled switch), a detail panel with recent runs, Run now, Edit and Delete, a builder (every N minutes or hours, daily, weekly, custom cron with the next runs) |
cron
| config | ProSettings | A section list, a breadcrumb, shadcn Select / Switch / Input with help for each field, a masked API key with a show toggle, Test connection, a sticky "Unsaved changes" bar |
config
In the classic frame (layout: classic) these pages render their legacy
view exactly as before, and the default dashboard style never loads them.
The one layout page shipped today is artifacts (layouts: [chat-canvas]),
artifacts
layouts: [chat-canvas]
owned by the data record builtin.artifacts rather than a layout record: the
builtin.artifacts
index of every chat's artifacts, where the canvas's Share links land. See
Layout data.
A first-party record can declare for_layouts=("command", "mission"). It is
for_layouts=("command", "mission")
mounted only while one of those layouts is offered, or while
extensions.enabled names it. Otherwise GET /api/plugins?origin=builtin
extensions.enabled
GET /api/plugins?origin=builtin
lists it as disabled with the reason no layout needs it, its routes answer
disabled
no layout needs it
404 and its feature module is never imported.
A reply handler can offer follow-up prompts for the answer it is writing.
They go out on the run's run_completed frame as suggestions (an optional
run_completed
suggestions
field; clients that do not know it ignore it), and a layout that shows
follow-up chips (Guided) renders them:
A later call replaces the list and aiui.suggest([]) clears it. Blank
aiui.suggest([])
entries are dropped, each prompt is cut to 200 characters and at most 8 are
kept. Outside a chat run the call does nothing.
A plugin adds a layout with the same SDK call the built-ins use,
registerLayout(id, meta, Frame | loader). Its Python side declares it with a
registerLayout(id, meta, Frame | loader)
layouts() hook, the same way first-party records do:
layouts()
module
(/_plugins/deck/deck.js, with an SRI hash). That module calls
/_plugins/deck/deck.js
registerLayout("deck", …), and the shell imports it only while the layout
registerLayout("deck", …)
is active.
a warning, and so is a classic or malformed id.
the same default-deny rule as its pages: list the plugin in
extensions.enabled.
shell_only=True
keeps a blocks page out of GET /api/pages.
blocks
The browser module, the props a frame receives (LayoutProps: Outlet,
LayoutProps
Outlet
nav, chrome, viewport, layout) and a complete example are in
nav
chrome
viewport
layout
UI Plugins → Layouts. The fixture
src/frontend/e2e/fixtures/layout-plugin/ is a working third-party layout
src/frontend/e2e/fixtures/layout-plugin/
plugin.
In short, a frame:
<Outlet />
main
id={chrome.mainId}
primary
groups
rest, footer) and navigates with nav.go(pageId);
footer
nav.go(pageId)
chrome.openPalette()
nav.groups
declared: true
kept in order and folded as given; the groups of the app's own pages and,
folded
under set_pages("all"), every group are marked the same way from the
set_pages("all")
manifest's layout.groups.shown) even when it keeps other groups in
layout.groups.shown
More, and shows a settings entry calling chrome.openSettings() when it is
chrome.openSettings()
set (only while some plugin contributes a settings section); the kit's
DeclaredNavGroups and PluginSettingsRow draw both,
DeclaredNavGroups
PluginSettingsRow
and chrome.Slot for the shell's slots (header:actions, …);
chrome.Slot
header:actions
viewport === 'phone'
targets of at least 44 px;
useLayoutData('sessions')
renders without it when that returns null.
A layout whose module fails to import, or whose frame throws while
rendering, is replaced by the classic frame. The viewer sees one toast ("The
"…" layout failed to load"), and the shell fires one aiui:plugin-error
aiui:plugin-error
window event whose detail.layout is the layout id. Other layouts and the
detail.layout
pages are not affected. While a plugin layout is still loading, the shell
shows a frame skeleton; a selected layout that no plugin ever registers falls
back to the classic frame with a console warning.
These rules keep layouts independent (ARCHITECTURE.md R17):
src/frontend/src/app-layouts/<id>/
the chunk layout-<id>; shared pieces live in app-layouts/kit/
app-layouts/kit/
(layout-kit), never copied; layout-specific features live in
src/frontend/src/layout-features/<name>/ (lf-<name>) **(planned: none
src/frontend/src/layout-features/<name>/
lf-<name>
exist yet)**;
with import();
import()
shell/
sdk/
legacy/
blocks/
imports neither folder (shell/core-purity.test.ts);
shell/core-purity.test.ts
layout, no feature, and no Streamdown, Shiki, Mermaid, KaTeX or
@assistant-ui (scripts/check-layout-isolation.mjs, part of
@assistant-ui
scripts/check-layout-isolation.mjs
npm run check:closure); in the browser,
npm run check:closure
e2e/specs/layouts-host.spec.ts checks that each layout downloads only its
e2e/specs/layouts-host.spec.ts
own chunks and the kit.
Looks on first paint. The server writes data-aiui-tokens="pro" on
data-aiui-tokens="pro"
the app shell's <html> when there is a default layout, and also the layout's
<html>
look (data-aiui-look="paper" for Chat and Canvas and Chat, from the
data-aiui-look="paper"
catalog record's look). The page then paints Paper and fetches only the
look
Paper fonts, never Geist first. An inline script drops the look before first
paint for a viewer who will not see it: one who chose plain Pro
("Switch look: Pro"), or one whose ?layout=, tab preview or stored pick
?layout=
(with user_choice) is another layout. The layout host clears it for a frame
user_choice
without a look (the classic frame drops the Pro tokens, and the look's CSS
applies only with them).
Each layout, the kit and the /chat first screen with the default layout
/chat
have gzip budgets in src/frontend/.size-limit.mjs (listed in
src/frontend/.size-limit.mjs
ARCHITECTURE.md R10). npm run size fails when a budgeted layout or the kit
npm run size
is missing from the build.
GET /api/shell/manifest has a top-level layouts key (ShellLayouts in
GET /api/shell/manifest
ShellLayouts
src/frontend/src/sdk/manifest.ts):
src/frontend/src/sdk/manifest.ts
Outside style: app it is {"default": "", "userChoice": true, "available": []}, which the
{"default": "", "userChoice": true, "available": []}
shell reads as classic.