Agent Plan
A vertical checklist of what an agent plans to do and how far it has got — with substeps, re-planning and a progress rail that fills as steps complete.
Preview
Building your landing page
0 of 6
- Research competitors, not started
Scan five landing pages in the same category for structure and messaging.
- Collect URLs, not started
- Extract section layout, not started
- Summarise positioning, not started
- Draft hero copy, not started
Three headline options with supporting subtext.
- Generate layout, not started
Hero, feature grid, social proof and pricing sections.
- Hero section, not started
- Feature grid, not started
- Pricing table, not started
- Create illustrations, not started
- Build components, not started
React + Tailwind, responsive down to 375px.
- Deploy preview, not started
Installation
- 1
Run the following command
npx shadcn@latest add https://localhostui.com/r/agent-plan.json
The finished-plan badge uses a success color token. The CLI adds it for you; for a manual install add --success to your theme (see app/globals.css) and --color-success: var(--success); to @theme inline.
Examples
Re-planning
Agents change their mind. Insert a step with a new id and it slides in while the rail extends:
setSteps((steps) => {
const i = steps.findIndex((s) => s.id === "deploy");
return [...steps.slice(0, i), { id: "a11y", title: "Accessibility pass", status: "todo" }, ...steps.slice(i)];
});Compact variant
<AgentPlan title="Exporting" steps={steps} variant="compact" collapsible={false} />Pairing with ToolCall
{
id: "search",
title: "Research competitors",
status: "active",
meta: <ToolCall name="search_web" title="Searching the web" status="running" startedAt={t0} />,
}Failed step with retry
{
id: "images",
title: "Create illustrations",
status: "failed",
meta: <button onClick={retryFromImages}>Retry from here</button>,
}Props
AgentPlan
| Prop | Type | Default | Description |
|---|---|---|---|
title | ReactNode | "Plan" | Plan title. |
steps* | PlanStep[] | — | The plan. Keep ids stable across re-plans. |
onStepClick | (step: PlanStep) => void | — | Makes rows clickable (Enter / Space too). |
collapsible | boolean | true | Show the collapse button. |
defaultCollapsed | boolean | — | Start collapsed. |
variant | "vertical""compact" | "vertical" | Timeline, or a dot row with the active label for small spaces. |
PlanStep
| Prop | Type | Default | Description |
|---|---|---|---|
id* | string | — | Stable id. |
title* | string | — | Step label. |
status* | "todo""active""done""failed""skipped" | — | active shimmers and ripples, done draws a check, failed shakes, skipped is struck through. |
description | string | — | Muted helper text, clamped to two lines. |
substeps | PlanStep[] | — | Auto-expanded while the step is active, collapsed when done (the user can reopen). |
startedAt / endedAt | number | Date | — | Per-step duration on the right; also drives the header's elapsed time. |
meta | ReactNode | — | Extra UI under the step — an error with “Retry from here”, or a ToolCall. |
Accessibility
- The plan is a list; the active step has
aria-current="step"and every step has a visually hidden status (“completed”, “in progress”). - The header bar is a
role="progressbar"witharia-valuenow. - With reduced motion: no ripple, no rail fill animation, no shake.