chat_panel() embeds a compact, full-streaming Agent Chat panel inside any @aiui.page layout — using the same WebSocket/SSE runtime, tool calls, reasoning traces, inline approvals, and await aiui.send_block(...) renderer as /chat.
chat_panel()
@aiui.page
await aiui.send_block(...)
/chat
Pair it with aiui.columns([...]) to build split-pane agent workspaces (for example, live charts, data tables, spreadsheets, or a doc_viewer on the left and a dedicated assistant on the right).
aiui.columns([...])
doc_viewer
<Tabs>
<Tab title="Python (@aiui.page)">
</Tab>
<Tab title="YAML (app.yaml)">
</Tabs>
?session=
welcome
@aiui.welcome
chat_panel
| Parameter | Type | Default | Description |
|---|---|---|---|
| title | str | "Agent Chat" | Header title displayed at the top of the panel. |
title
str
"Agent Chat"
| agent | str \| None | None | Optional agent name to route panel messages to. |
agent
str \| None
None
| height | int \| str | 520 | Panel height in pixels (>= 200) or a CSS length (e.g. "70vh"). |
height
int \| str
520
>= 200
"70vh"
| session_id | str \| None | None | Optional initial session ID to resume inside the panel. |
session_id
| welcome | str \| None | None | Optional empty-state greeting shown inside the panel. |