Real AI agents rarely just call one prompt — they search documents, query APIs, or ask the user before taking action. In this step, you will make every behind-the-scenes action visible as a clean, collapsible timeline.
What's new in Step 4: @aiui.step, aiui.Step, aiui.prompt(), and aiui.action_buttons() with @aiui.button().
@aiui.step
aiui.Step
aiui.prompt()
aiui.action_buttons()
@aiui.button()
<Steps>
<Step title="Wrap a tool function with @aiui.step">
Decorate any Python function with @aiui.step(type="tool"). PraisonAIUI automatically records its inputs, return value, status, and duration — and shows it as a collapsible card in the chat:
@aiui.step(type="tool")
</Step>
<Step title="Group nested work with aiui.Step and ask a clarifying question">
Inside @aiui.reply, open an async with aiui.Step(...) block for high-level phases, and pause with aiui.prompt() whenever you want human input before finishing:
@aiui.reply
async with aiui.Step(...)
<Step title="Handle button clicks">
Register handlers for the action buttons you displayed:
</Steps>
<Tip>
Steps are saved with the conversation, so reloading the browser keeps the exact collapsible step tree and timings. See Steps for all step types (run, tool, llm, retrieval, sub_agent).
run
tool
llm
retrieval
sub_agent
</Tip>
<CardGroup cols={2}>
<Card title="Step 5: Rich UI, Notifications & Custom Pages" icon="panels-top-left" href="05-rich-ui-and-pages.md">
Add custom dashboard pages, try the side-by-side canvas layout and push live bell notifications.
</Card>
<Card title="Step 3: Welcome, Starters & Profiles" icon="arrow-left" href="03-welcome-and-starters.md">
Review Step 3.
</CardGroup>