# RunInspector

Look inside a run: each model, tool and agent step, with measured usage.

- **Use it for**: Inspecting the model, tool and agent spans of a run.
- **Not for**: A summary for non-technical readers. Try [RunSummaryCard](https://unseenui.com/components/run-summary-card/).

## Installation

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

## Usage

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

<RunInspector variant="accordion" runId="run-42" spans={spans} usage={usage} onSelect={inspectSpan} />
```

## All props

| Prop | Type | Description |
| --- | --- | --- |
| `className` | `string` | Added to the root element, after the component's own classes. |
| `detail` | `DetailLevel` |  |
| `onSelect` | `((span: RunSpan) => void)` |  |
| `runId` (required) | `string` |  |
| `spans` (required) | `readonly RunSpan[]` | A host-owned window of up to 200 spans. |
| `usage` | `{ tokens: number; source: string; }` |  |
| `variant` | `"cards" \| "compact" \| "accordion"` |  |

## 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

[AgentSteps](https://unseenui.com/components/agent-steps/), [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/), [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/run-inspector/
