Loading component…
Loading component…
One agent run, step by step – thinking, tool calls, sub-agents and failures as bars on one time axis, with time, cost and tokens on top and what went in and out of each step
To reuse this local React demo, copy all files from the Code tab into the same folder, then import Agent/RunDetail from ./agent-run-detail.
import { AgentRunDetailScreen } from "@/components/ui/agent-run-detail";
export default function Page({ run, elapsed }) {
return (
<AgentRunDetailScreen
run={run} // the steps with start and duration in seconds
elapsed={elapsed} // while it runs: seconds since it started – bars grow, numbers count
onStop={() => api.stop(run.id)}
onRerun={() => api.rerun(run.id)}
onNavigate={(label) => router.push(routes[label])}
/>
);
}| Name | Type | Default | Description |
|---|---|---|---|
| run | { id; title; agent: { id; name; color }; model; startedAt; total?; steps: { id; label; kind: "llm" \| "tool" \| "agent"; start; duration?; depth?; app?; agent?; failed?; error?; tokens?: { in; out }; cost?; input?; output? }[] } | The run. start and duration are seconds from the start; a step without a duration is still running. app shows its logo before a tool call, agent the sub-agent's pixel mark; depth 1 puts a step under the sub-agent that took it. total is how long the whole run took – leave it out while it runs | |
| elapsed | number | Seconds since the run started – pass it while the run is live: steps appear as they begin, running bars grow with a sheen, a blue line marks now and the numbers count. Without it the run is shown as finished | |
| defaultOpen | string \| null | "write" | The step open on the right when the screen starts |
| onStop | () => void | Called with Stop while the run is live | |
| onRerun | () => void | Called with Rerun once it is done | |
| loading | boolean | Gray rows and bars under the real axis, and the panel as gray lines in its own layout | |
| empty | boolean | A run without any steps yet | |
| onNavigate | (label: string) => void | Called with the label of a sidebar item | |
| className | string | Extra class on the root |
The trace uses the full width; the axis picks a round step for runs of any length, and a time near the right edge moves before its bar
Below 640px the label column narrows and the four numbers sit two by two; below 480px each step's name sits over its bar
Dark mode built in: switches when an ancestor (usually <html>) has the class dark or data-theme="dark"