Plan
ui.Plan is a component that shows an AI agent’s plan as a checklist: each step is pending (an empty circle), in progress (a dot, or a spinner with running=True) or done (a green check, with its text dimmed), and the header counts done/total. Clicking the header folds and unfolds the steps. steps are dicts with step (the text) and status: "pending", "in_progress" or "done".
ui.Plan · Category: AI agents · Full reference →


pz.container(ui.Plan(steps=[ {"step": "Read the form and its handlers", "status": "done"}, {"step": "Add the email field", "status": "done"}, {"step": "Validate the email as you type", "status": "in_progress"}, {"step": "Run the tests", "status": "pending"},], running=True), width=420)When to use
Section titled “When to use”- Above an agent’s chat, while it works through a task of several steps.
- For any list of steps that updates as the work goes on, such as an install or a migration.
import pyzed as pzfrom pyzed import ui
class Agent(pz.App): def __init__(self): self.steps = [{"step": "Add the form", "status": "done"}, {"step": "Wire the events", "status": "in_progress"}] self.working = True
def view(self): return ui.Plan(steps=self.steps, running=self.working)Variants
Section titled “Variants”Without running the step in progress shows a dot; folded is drawn as after a click on the header.


running=TrueCode
pz.container(ui.Plan(steps=[{"step": "Add the form", "status": "done"}, {"step": "Wire the events", "status": "in_progress"}, {"step": "Run the tests", "status": "pending"}], running=True), width=300)

running=FalseCode
pz.container(ui.Plan(steps=[{"step": "Add the form", "status": "done"}, {"step": "Wire the events", "status": "in_progress"}, {"step": "Run the tests", "status": "pending"}]), width=300)

Code
pz.container(ui.Plan(steps=[{"step": "Add the form", "status": "pending"}, {"step": "Run the tests", "status": "pending"}]), width=300)

Code
pz.container(ui.Plan(steps=[{"step": "Add the form", "status": "done"}, {"step": "Run the tests", "status": "done"}]), width=300)

Code
pz.container(ui.Plan(steps=[{"step": "Add the form", "status": "done"}, {"step": "Run the tests", "status": "pending"}]), width=300)Events
Section titled “Events”Plan has no events of its own: it shows what you give it. Like every widget it also has the 18 common events (click, double_click, right_click, mouse_enter, drag, key_down, resize…), attached with .on(...): see Events and Events of every component.
It is a pz.Component, so it also raises on_mount and on_unmount, and its handlers get a pz.Event whose value holds the data.
Properties and API
Section titled “Properties and API”ui.Plan
Section titled “ui.Plan”class PlanA component for an agent’s plan: a checklist with done/total in its header, which folds it.
| Property | Default | Description |
|---|---|---|
steps |
None |
{"step": text, "status": "pending" | "in_progress" | "done"} dicts. |
running |
False |
Spins the step in progress. |
theme |
None |
Theme. |