Agent Steps

An agent's plan with each step's state. The whole plan is shown from the start, including steps not yet reached — revealing them one at a time hides how much is left, which is what someone watching most wants to know.

src/components/ui/agent-steps.tsx

About

From the component's own source, where it was written.

An agent's plan, with each step's state as it runs.

The plan is shown whole from the start, including steps not yet reached. Revealing them one at a time hides how much is left, which is the single thing someone watching an agent most wants to know.

Related to ToolCall, which shows one invocation with its arguments and result. This is the level above: the sequence those calls belong to.

Install

npx astralyx-ui add agent-steps

Usage

import { AgentSteps } from '@/components/ui/agent-steps'

<AgentSteps steps={steps} title="Fixing the failing test" />

Composer

Change the props and the source below follows.

Fixing the failing test2 / 5 · running
  1. Read the failing test2s
  2. Locate controlSize in styles.ts4s
  3. RunningApply the radius fix
  4. Re-run the suite
  5. Update the changelog
Props
tsx
<AgentSteps steps={steps} title="Fixing the failing test" />

Examples

Plan

API

Generated from the source, so it cannot fall behind the code. One table per exported component, then hooks, functions and types.

AgentSteps

Extends ComponentProps<'div'>.

PropTypeDefaultDescription
titlestring——
stepsAgentStep[]required{ id, label, status, duration?, detail? }.
defaultExpandedstring[][]—
toone level up—ToolCall shows a single invocation with its arguments and result; this shows the sequence those calls belong to.

Types

AgentStep

FieldTypeDescription
idstring—
labelReactNode—
statusAgentStepStatusRunning shows a spinner; skipped strikes the label through.
duration?numberSeconds.
detail?ReactNodeExpandable body — tool calls, output, an error.
TypeDefinitionDescription
AgentStepStatus
'pending' | 'running' | 'done' | 'failed' | 'skipped'
An agent's plan, with each step's state as it runs.

Behaviour

TopicDetailDescription
progressaria-liveThe done-of-total counter is a polite live region, so completion is announced without stealing focus.