Agent plan
The plan an AI agent is working through, as a live task list: each step's status, the one it is on, substeps, and "2 of 5 done". As a card, folded away behind its title, or compact: one line with the current step.

No script: re-render it as the steps change.
Use it
<x-ds::agent-plan title="Answer the refund question">
<x-ds::agent-plan-step label="Read the refund policy" status="done" />
<x-ds::agent-plan-step label="Check the delivery date" status="running" detail="Asking the carrier">
<x-ds::agent-plan-step label="Look up the tracking number" status="done" />
<x-ds::agent-plan-step label="Fetch the delivery event" status="running" />
</x-ds::agent-plan-step>
<x-ds::agent-plan-step label="Draft the reply" />
</x-ds::agent-plan>
Or from rows, as an agent framework hands them over:
<x-ds::agent-plan title="Tidy the inbox" :steps="$run->plan" />
{{-- [['label' => 'Archive newsletters', 'status' => 'done', 'detail' => null, 'substeps' => []], …] --}}
Folded behind its title, or one line:
<x-ds::agent-plan title="Tidy the inbox" :steps="$run->plan" :collapsible="true" :open="false" />
<x-ds::agent-plan title="Tidy the inbox" :steps="$run->plan" variant="compact" />
Props
agent-plan
| Prop | Type | Default | What it does |
|---|---|---|---|
title | string | required | What the plan is for. Names the list. |
steps | array | — | Rows of label, status, detail, substeps, in place of children. |
variant | default compact | default | Compact: one line, the current step and the count. |
collapsible | bool | false | The title, count and bar fold the list away. |
open | bool | true | With collapsible: open on first paint. |
progressText | string | :done of :total done | The count beside the title. |
statusText | array | — | [status => words]. |
agent-plan-step
| Prop | Type | Default | What it does |
|---|---|---|---|
label | string | required | The step, in words. |
status | string | pending | From the status set. |
detail | string | — | A quieter line under it. A failed step's is red: say why. |
current | bool | false | The step the reader is on. The plan finds it on its own; you rarely need this. |
statusText | array | — | [status => words]. |
| Slot | What it does |
|---|---|
| default | Substeps: more agent-plan-steps, one level. |
The current step is the running one, else the one waiting for the reader, else the first failure, else the first not started. A done or cancelled step is struck through.
Accessibility
- An ordered list named by the title, with each step's status written before its label for screen readers.
- The running step is
aria-current="step". - The bar is a named progressbar; inside a collapsible summary it is hidden, as the count beside it says the same.
Don't
- Don't use it for onboarding. That is the checklist: work the reader does. This is work the agent does.
- Don't nest substeps inside substeps. One level is read.
From the package repo: edit this page on GitHub.