# AgentSteps

The steps of a run in order, with where each one stands, its details and anything it depends on.

- **Use it for**: The ordered steps of a run or workflow with their states, and prerequisites with dependencies.
- **Not for**: Timestamps and durations. Try [ExecutionTimeline](https://unseenui.com/components/execution-timeline/), [Plan](https://unseenui.com/components/plan/).

## Good to know

- A finished step shows only its check; running, failed and blocked steps add a badge. The words stay available to screen readers.

## Installation

```bash
npm install @stackunseen/ui
```

## Usage

```tsx
import { AgentSteps } from '@stackunseen/ui';
import '@stackunseen/ui/styles.css';

<AgentSteps variant="timeline" steps={run.steps} />
```

## All props

| Prop | Type | Description |
| --- | --- | --- |
| `className` | `string` |  |
| `dependencies` | `boolean` | Print each step's prerequisites ("After: …", or "Starting step"). |
| `label` | `string` |  |
| `onSelect` | `((id: string) => void)` |  |
| `selectedId` | `string` | With onSelect, step names become buttons that report the chosen step. |
| `steps` (required) | `Step[]` |  |
| `variant` | `"cards" \| "compact" \| "timeline"` |  |

## Keyboard

Tab reaches controls; Enter or Space activates buttons. Accordions use arrow keys, Home and End. Select menus support arrows and typeahead; Escape closes menus and dialogs and restores focus.

## Works with

[ToolCall](https://unseenui.com/components/tool-call/), [ToolResult](https://unseenui.com/components/tool-result/), [ToolGroup](https://unseenui.com/components/tool-group/), [ExecutionTimeline](https://unseenui.com/components/execution-timeline/), [RunInspector](https://unseenui.com/components/run-inspector/), [Plan](https://unseenui.com/components/plan/), [UsageMeter](https://unseenui.com/components/usage-meter/), [WorkSummary](https://unseenui.com/components/work-summary/), [ChainOfThought](https://unseenui.com/components/chain-of-thought/), [WorkflowGraph](https://unseenui.com/components/workflow-graph/), [ConnectionStatus](https://unseenui.com/components/connection-status/), [RunBoard](https://unseenui.com/components/run-board/)

Page: https://unseenui.com/components/agent-steps/
