Agent Steps
An agent's run laid out step by step: a row that reads Working while it runs and Worked for 12s after, folding open to each step's status, a line of detail and the results it found.
- Searched for container query support, In progress
- Read app/components/chart.tsx, Not started
- Sized the chart from its container, Not started
Installation
npx shadcn@latest add "@aiellie/agent-steps"shadcn needs the @aiellie registry in components.json first. npx aiellie add agent-steps adds it on its first run, then installs the same way.
Agent Steps lays out what an agent did as a list of steps under one row. While it runs, the row reads Working with a live count and the steps fill in below it. Once it's done, the row folds shut and reads "Worked for 12s", and opens again on a click.
Each step has a status. A finished step shows its own icon or a tick, the step in progress shows a live dot with a shimmer, and a failed one turns destructive. Under its label a step can carry a line of detail, the results it found, or anything else.
Getting started
List the steps
streamingopens it and shows the indicator.durationis how many seconds the run took, which the row shows once it's done.components/run.tsximport { Globe02Icon } from "@hugeicons/core-free-icons" import { AgentStep, AgentStepResult, AgentStepResults, AgentSteps, AgentStepsContent, AgentStepsTrigger, } from "@/components/aiellie/agent-steps" export function Run({ streaming }: { streaming: boolean }) { return ( <AgentSteps streaming={streaming} duration={18}> <AgentStepsTrigger /> <AgentStepsContent> <AgentStep icon={Globe02Icon} label="Searched for container queries"> <AgentStepResults> <AgentStepResult href="https://developer.mozilla.org"> MDN </AgentStepResult> </AgentStepResults> </AgentStep> <AgentStep status="active" label="Reading chart.tsx" /> </AgentStepsContent> </AgentSteps> ) }
Anatomy
<div data-slot="agent-steps" data-streaming> {/* Base UI Collapsible */}
<button data-slot="agent-steps-trigger" />
<div data-slot="agent-steps-content">
<ol>
<li data-slot="agent-step" data-status="done">
<p data-slot="agent-step-detail" />
<ul data-slot="agent-step-results">
<li data-slot="agent-step-result" />
</ul>
</li>
</ol>
</div>
</div>A rail joins each step's mark to the next one's. Each step's status is read out after its label, so the list makes sense without the icons.
It opens while streaming is on and folds when it turns off, unless someone opened or shut it themselves, which it then leaves alone. That's the same as Reasoning, so the two read alike side by side.
Examples
A step that failed
A failed step turns its mark destructive. Steps after it can stay pending, in muted ink.
- Installed dependencies, Done
- Ran the test suite, Failed
2 of 48 tests failed in auth.test.ts.
- Open a pull request, Not started
API reference
AgentSteps
| Prop | Type | Default | Description |
|---|---|---|---|
streaming | boolean | false | Whether the agent is still working. |
duration | number | Seconds the run took, once it's done. | |
startedAt | Date | number | when streaming turned on | When it started, so the count survives a remount. |
open, defaultOpen | boolean | streaming | Holds it, or starts it, open. |
onOpenChange | (open: boolean) => void |
All other Collapsible.Root props are forwarded.
AgentStepsTrigger
| Prop | Type | Default | Description |
|---|---|---|---|
label | ReactNode | "Working" | What it says while the agent works. |
children | ReactNode | Replaces the label in every state. |
AgentStep
| Prop | Type | Default | Description |
|---|---|---|---|
label | ReactNode | required | What the step does. |
status | "pending" | "active" | "done" | "error" | "done" | |
icon | IconSvgElement | a tick | Shown once the step is done, like a globe for a search. |
children | ReactNode | Detail, results, or anything else under the label. |
AgentStepResult
| Prop | Type | Default | Description |
|---|---|---|---|
href | string | Makes the chip a link that opens in a new tab. |
AgentStepsContent, AgentStepDetail and AgentStepResults forward their element's props.