AgentTrail
A vertical step list for a running agent task: done steps with durations, the current step with a live timer, then pending steps.
What an agent intends to do, before or during a run. People edit, accept, run, skip, stop, or retry steps.
What the agent intends to do. Not AgentTrail. Not ProgressSteps.
A draft you can edit, accept and run. Variants shows each status and its footer.
5 steps · 0 done · 1 running
read_filesrc/billing/invoice.ts
search_files"Math.round" in src/billing
edit_fileinvoice.ts, tax.ts
run_testsinvoice.test.ts
gh pr createto main, draft
Step 1 of 5 running: Read invoice module
AgentPlan is the agent's intent: people edit and accept it before it runs. Accept plan is the one solid primary; Run is outline. AgentTrail logs what already happened.
import { AgentPlan } from "agentic-ds-kit";From contracts/agentplan.json: must is the a11y requirements, defaults the prop defaults, stops if the doNot rules where the agent asks instead of inventing a cousin.
| Name | Type | Required | Default | Notes |
|---|---|---|---|---|
| title | string | Yes | — | — |
| steps | array | Yes | — | { id, label, tool?, target?, note?, needsApproval?, risk?, why?, error?, calls?: ToolCall[] }[]. calls render under the step as one ToolCallCard group row, open on the current or failed step. risk ("low" | "medium" | "high") adds a Badge that names it in words: Low risk (neutral), Medium risk (warning), High risk (danger); nothing when unset. why is one short muted line under the tool line saying why the agent takes the step; nothing when unset. |
| status | enum | No | draft | drafting shows skeleton rows; draft with no steps shows Empty. drafting | draft | accepted | running | complete | failed |
| currentStepId | string | No | — | running: the step that runs now. failed: the step that stopped. |
| summary | string | No | — | Default derived: "5 steps · 2 need approval", "5 steps · 2 done · 1 waiting". |
| footerNote | string | No | — | Mono note in the footer, e.g. "accepted 14:02" or "3 of 5 · 1m 48s". |
| trace | ReactNode | No | — | Header slot under the summary for a compact TraceWaterfall: time and cost so far. |
| waitingLabel | string | No | Waiting for your OK | — |
| editable | boolean | No | true | Draft only, and only with onChange: per-step Edit / Remove and Add step. |
| reorderable | boolean | No | false | Draft only, with editable and onChange, and two or more steps: Move up / Move down icon Buttons on each row (first row's up and last row's down are disabled). A move calls onChange with the new order, keeps focus on the arrow and announces the new position in the live region. |
| onChange | function | No | — | (steps) => void. Called after Save step, Remove, and Add step. |
| onAccept | function | No | — | Draft footer: Accept plan, the view's one solid primary. ⌘/Ctrl+Enter inside the card. |
| acceptLabel | string | No | Accept plan | Draft: the solid primary's label, like Approve plan. |
| onDeny | function | No | — | Draft: an outline neutral Button before the primary (denyLabel). Shown only when set. |
| denyLabel | string | No | Deny | — |
| maxVisibleSteps | number | No | — | Fold a long plan: the first maxVisibleSteps steps, then a ghost "Show all N steps" row that shows the rest and focuses the first of them. Folds only when two or more steps would hide; the current or failed step always shows; off while a step form is open. Default every step. |
| stickyFooter | boolean | No | false | The footer sticks to the bottom of the nearest scroll area while the card is in view, on the card surface, so Accept plan stays reachable on a tall plan. A host whose scroll area has bottom padding sets --plan-sticky-offset to minus that padding. |
| approvalLinks | boolean | No | false | Draft, with steps that need approval and no summary prop: the count in the summary ("1 need approval") is a link to the first such step; it opens the fold if needed, scrolls the step into view and focuses it. With no footerNote and not editable, the footer says "1 step needs your approval". |
| onRun | function | No | — | Accepted footer: Run (outline). ⌘/Ctrl+Enter inside the card. |
| onEdit | function | No | — | Accepted footer: back to draft. |
| onSkipStep | function | No | — | (stepId) => void. Running and failed. |
| onStop | function | No | — | Running footer: outline danger sm Button. |
| onRetryStep | function | No | — | (stepId) => void. Failed footer. |
| onViewTrail | function | No | — | Complete footer: open the run's AgentTrail. |
| onDraft | function | No | — | Empty state: Draft a plan. |
| collapsed | boolean | No | false | The header alone: title, status and the summary line, at the open width. |
| onCollapsedChange | function | No | — | (collapsed) => void. Adds the show / hide chevron. |
A vertical step list for a running agent task: done steps with durations, the current step with a live timer, then pending steps.
The agent asks before it acts: risk, what will happen in words, an exact preview of the command or diff, and Approve (⌘/Ctrl+Enter) / Deny (Escape) with an optional auto-deny countdown.
Ordered wizard steps as numbered circles with a connecting line and a status word under each label: Done, Current, Upcoming, Error, or Optional.
A list of records, one row each: primary and optional secondary line, leading avatar or icon, trailing value, badge, actions, or chevron.