Loading component…
Loading component…
Inspect a live agent run, its costs, timings, calls and errors.
To reuse this local React demo, copy all files from the Code tab into the same folder, then import RunInspector from ./run-inspector.
import { RunInspector, type RunSpan } from "@/components/ui/run-inspector";
const run: RunSpan = {
id: "main", name: "Orchestrator", kind: "agent", status: "running", start: 0, model: "Opus 5.5",
task: "Launch the new pricing page by Friday",
children: [
{ id: "plan", name: "Plan the launch", kind: "llm", status: "done", start: 200, end: 7100, model: "Opus 5.5", tokensIn: 6200, tokensOut: 900, cost: 0.03 },
{
id: "coder", name: "Coder", kind: "agent", status: "running", start: 7400, model: "GPT-6 Sol", task: "Build the page",
children: [
{ id: "tests", name: "Run checkout tests", kind: "tool", status: "failed", start: 9000, end: 17400, tool: "run_tests", args: { command: "pnpm test checkout" }, error: "2 of 14 checkout tests fail" },
],
},
],
};
export function RunPage() {
return <RunInspector run={run} />;
}| Name | Type | Default | Description |
|---|---|---|---|
| run | RunSpan | The orchestrator with everything under it: sub-agents (kind "agent"), model calls ("llm") and tool calls ("tool") – each { id, name, kind, status, start, end?, model?, icon?, task?, tool?, args?, result?, tokensIn?, tokensOut?, cost?, input?, output?, error?, children? } | |
| supervisor | RunSpan | An agent that watches the run rather than working in it – shown beside the orchestrator, joined by a dashed line | |
| now | number | The run's clock in ms – drives running bars and times; leave it out and it ticks by itself while something runs | |
| startedAt | number | When the run started (epoch ms) – times on the cards count from here | |
| selected | string \| null | Controlled id of the picked agent – the others fade and the numbers sum up its part | |
| onSelectedChange | (id: string \| null) => void | Called when an agent is picked or let go | |
| call | string \| null | Controlled id of the call opened under its row | |
| onCallChange | (id: string \| null) => void | Called when a call is opened or closed | |
| formatCost | (amount: number) => string | $0.00 | How amounts are written |
| className | string | Extra class on the root |
The tree follows its own width: narrow, it stacks the agents as an indented list; the numbers wrap into two rows of three
The title line and the numbers keep one width (--ui-rin-details-w, 680px) – they don't follow the agents as they come and go
Dark mode built in: switches when an ancestor (usually <html>) has the class dark or data-theme="dark"