So far, everything has lived inside the chat thread. In Step 5, you will turn your chat app into a complete workspace with a custom data page in the sidebar, live header notifications, and a side-by-side canvas layout.
What's new in Step 5: await aiui.send_block(), @aiui.page(), aiui.chat_panel(), aiui.interface(), aiui.push_notification(), aiui.set_layout(), and zero-code YAML pages.
await aiui.send_block()
@aiui.page()
aiui.chat_panel()
aiui.interface()
aiui.push_notification()
aiui.set_layout()
<Steps>
<Step title="Add a custom page with KPI cards, filters and a table">
Add @aiui.page(...) to app.py. Returning aiui.layout([...]) renders responsive cards, forms, charts and tables inside the app shell:
@aiui.page(...)
app.py
aiui.layout([...])
</Step>
<Step title="Push live alerts to the header Notification Center">
Send a persistent alert from a chat handler (persist=True) or from any background job with aiui.push_notification() — users see the unread badge update live on the top bell icon and can click straight to your page:
persist=True
<Step title="Try selectable layouts or zero-code YAML pages">
Run your app in the Chat + Canvas layout (or let users pick their own frame):
Want to build pages purely in YAML without Python? Put pages: in app.yaml and run aiui run app.yaml — see Declarative YAML pages.
pages:
app.yaml
aiui run app.yaml
</Steps>
await aiui.send_block(...)
<CardGroup cols={2}>
<Card title="Step 6: Theme, Secure & Deploy" icon="shield-check" href="06-theme-auth-deploy.md">
Apply your brand colors, save chat history, turn on sign-in and deploy to production.
</Card>
<Card title="Step 4: Steps, Tools & Prompts" icon="arrow-left" href="04-steps-and-tools.md">
Review Step 4.
</CardGroup>