PraisonAIUI keeps the familiar async decorator lifecycle (@aiui.on_chat_start, @aiui.on_message, @aiui.on_stop, aiui.Message, aiui.Step, aiui.user_session) while adding 81 interactive UI blocks (usable both inline in chat and on custom pages), split-pane workspaces, selectable layouts, zero-code YAML apps, and an opt-in Agent Ops console.
@aiui.on_chat_start
@aiui.on_message
@aiui.on_stop
aiui.Message
aiui.Step
aiui.user_session
| Classic decorator pattern | PraisonAIUI (aiui) |
aiui
|---|---|
| @on_chat_start | @aiui.on_chat_start (or @aiui.welcome) |
@on_chat_start
@aiui.welcome
| @on_message | @aiui.reply (alias: @aiui.on_message) |
@on_message
@aiui.reply
| @on_stop | @aiui.cancel (alias: @aiui.on_stop) |
@on_stop
@aiui.cancel
| Message(content=...).send() | await aiui.say(...) or await aiui.Message(...).send() |
Message(content=...).send()
await aiui.say(...)
await aiui.Message(...).send()
| msg.stream_token(tok) | await aiui.stream_token(tok) |
msg.stream_token(tok)
await aiui.stream_token(tok)
| Step(...) | async with aiui.Step(...) / await aiui.tool(...) |
Step(...)
async with aiui.Step(...)
await aiui.tool(...)
| Dataframe(df) / Plotly(fig) | await aiui.send_block(aiui.table(df)) / await aiui.send_block(aiui.plotly_chart(fig)) (plus aiui.Dataframe / aiui.Plotly also render natively) |
Dataframe(df)
Plotly(fig)
await aiui.send_block(aiui.table(df))
await aiui.send_block(aiui.plotly_chart(fig))
aiui.Dataframe
aiui.Plotly
| Custom React Elements | 81 built-in Python/YAML blocks (aiui.send_block(...)) + @aiui/sdk plugins |
aiui.send_block(...)
@aiui/sdk
| CLI runner | aiui run app.py (or aiui run app.py --preset agent for Sessions, Approvals, Usage, Memory) |
aiui run app.py
aiui run app.py --preset agent