Use aiui.create_shell_app() when your product wants PraisonAIUI's React app shell, selected pages, plugin assets/routes, and custom endpoints without mounting the general agent server surface (/sessions, /run, /agents, /teams, /api/chat/*, or the 48 backend agent features).
aiui.create_shell_app()
/sessions
/run
/agents
/teams
/api/chat/*
What create_shell_app() mounts:
create_shell_app()
routes
/health
/api/health
/health/live
/health/ready
/me
POST /api/auth/ws-ticket
/login
/register
/logout
/api/shell/manifest
/api/pages
/_aiui/externals/*
/assets/*
/plugins/*
/icon.svg
/api/plugins/<name>/*
/_plugins/<name>/*
404
Passing csp="strict" computes the exact 'sha256-…' hashes of the shell's executable inline bootstrap scripts (never 'unsafe-inline' in script-src) and attaches the Content-Security-Policy header automatically.
csp="strict"
'sha256-…'
'unsafe-inline'
script-src
Content-Security-Policy
You can also merge extra directives or supply a custom builder using the exported helpers:
Plugins that manage background workers, subprocesses, database pools, or PTY/WebSocket registries can define an async (or sync) lifespan(app) context manager. Both create_app() and create_shell_app() compose every active plugin's lifespan via AsyncExitStack (startup in registration order, shutdown in LIFO order, with per-plugin error isolation):
lifespan(app)
create_app()
lifespan
AsyncExitStack
In a shell-only host (or when built-ins are disabled via extensions.disabled), the manifest includes an additive builtins summary:
extensions.disabled
builtins
builtins.disabled
always: true
builtins.unmounted
/api/approvals/stream
/api/notifications/stream
sdk.notifications.push(...)
/api/notifications
create_shell_app(routes=[...])
builtin.notifications
unmounted