Your own pages, Chat when you have a @reply, and nothing else: no built-in
@reply
tabs, no pages from other apps on the machine, no other apps' chats.
The sidebar shows Chat and a My posts group with your two pages. Every
layout of the app shell lists your pages in their group, and the layout
picker still works.
| You want | Use |
|---|---|
| The new app shell | Nothing: style: app is the default. aiui.set_style("app") makes it explicit |
style: app
aiui.set_style("app")
| Only your pages | aiui.only_my_pages() or aiui.set_pages([]) |
aiui.only_my_pages()
aiui.set_pages([])
| Your pages and Chat (minimal preset) | aiui.set_pages("minimal") or aiui.only_my_pages("chat") (automatic default when running aiui run app.py with @aiui.page/@aiui.reply) |
aiui.set_pages("minimal")
aiui.only_my_pages("chat")
aiui run app.py
@aiui.page
@aiui.reply
| Core Agent preset (Chat, Sessions, Approvals, Usage, Memory) | aiui.set_pages("agent") or aiui run app.py --preset agent |
aiui.set_pages("agent")
aiui run app.py --preset agent
| A few specific built-in pages | aiui.set_pages(["chat", "sessions", "usage"]) (ids: aiui pages ids) |
aiui.set_pages(["chat", "sessions", "usage"])
aiui pages ids
| Every page (full Ops console) | aiui.set_pages("ops") / aiui.set_pages("all") or aiui run app.py --preset ops |
aiui.set_pages("ops")
aiui.set_pages("all")
aiui run app.py --preset ops
Wrap any Python function (sync, async def, or streaming yield generator) into an interactive page without writing separate @aiui.page and @aiui.register_page_action handlers:
async def
yield
@aiui.register_page_action
set_pages is the one switch for what shows. It covers built-in pages, the
set_pages
app shell's layout pages (start, artifacts, templates, connect,
start
artifacts
templates
connect
api-reference) and dashboard-plugin folders, including the ones in
api-reference
~/.praisonai/dashboard-plugins that every app on the machine would
~/.praisonai/dashboard-plugins
otherwise share. Pages you register yourself (@aiui.page,
aiui.register_page, aiui.register_plugin) always show. A wrong id is
aiui.register_page
aiui.register_plugin
reported at startup: set_pages() names 'chta', but no page has that id.
set_pages() names 'chta', but no page has that id
@aiui.page(id, title=..., icon=..., group=..., order=...)
returning aiui.layout([...]) of blocks (aiui.metric, aiui.table,
aiui.layout([...])
aiui.metric
aiui.table
aiui.columns, aiui.markdown_text, aiui.card, ...). Pages with the same
aiui.columns
aiui.markdown_text
aiui.card
group sit together in the sidebar; order sorts them.
group
order
links
aiui run app.py keeps the app's chats in its own folder,
~/.praisonaiui/apps/<file name>-<hash>/sessions/, so the sidebar never
~/.praisonaiui/apps/<file name>-<hash>/sessions/
lists the chats of other apps or agents. Point it elsewhere with
--datastore sdk:/path (or json:/path), or share the old machine-wide
--datastore sdk:/path
json:/path
history with --datastore sdk. Set AIUI_DATA_DIR to move everything aiui
--datastore sdk
AIUI_DATA_DIR
keeps (config, sessions) for one app. See Sessions.
aiui.set_pages("all") (or aiui run app.py --pages all) is the opposite
aiui run app.py --pages all
of a focused app: every page of the product, each in its React version where
there is one and otherwise the legacy view inside the new shell, with every
group (Agent, Work, Control, ...) listed in the sidebar of whatever layout is
on. Your own pages still show in their group.
When you embed PraisonAIUI as a dedicated dashboard host and do not want
agent/chat endpoints (/sessions, /run, /agents, /teams, /api/chat/*)
/sessions
/run
/agents
/teams
/api/chat/*
mounted on the port, use aiui.create_shell_app() instead of create_app().
aiui.create_shell_app()
create_app()
Pass csp="strict" (or a directive mapping / callable) to attach a strict
csp="strict"
Content-Security-Policy with the exact 'sha256-…' hashes of the shell's
Content-Security-Policy
'sha256-…'
inline scripts — no HTML buffering middleware or manual route allowlists needed:
GET /focus serves the plugin page under a strict script-src 'self' 'sha256-…'
GET /focus
script-src 'self' 'sha256-…'
header; GET /sessions and other unmounted routes return 404. For custom
GET /sessions
404
hosts that render the HTML themselves, aiui.render_shell_html(request)
aiui.render_shell_html(request)
returns (html, script_hashes) and aiui.shell_csp_header(html) formats the
(html, script_hashes)
aiui.shell_csp_header(html)
full header (connect-src 'self' covers same-origin WebSockets; pass extra=
connect-src 'self'
extra=
for any external host).
The list must hold only your page ids (and chat). Then open the page in a
chat
headless browser and look at the sidebar.
style: dashboard is the old vanilla UI. It still works
style: dashboard
(aiui run app.py --style dashboard, aiui.set_style("dashboard"), YAML
aiui run app.py --style dashboard
aiui.set_style("dashboard")
style: dashboard or AIUI_SHELL=legacy, which prints a one-line notice),
AIUI_SHELL=legacy
and set_pages applies there too, but new apps should not use it. Docs and
examples that pass --style dashboard describe the legacy UI.
--style dashboard