Run trace
A React component in Beamline's AI & agents category, in the free sample.
One agent run as a waterfall: every step (model calls, tools, retrieval, checks, sub-agents) nested under the step that started it, each a bar on a shared time axis, with retries as separate attempts on the same bar, tokens and cost per step and for the run; while it runs the bars grow live, and choosing a step shows its timing, attempts, input and output beside the trace.
Use it for
- Debugging or reviewing an agent run: what ran, in what order, what waited on what, what failed and was retried, and what it cost.
- An observability page for model and tool calls (spans from your tracing).
Not for
- A single tool call in a conversation (tool-call).
- The agent's thinking in words (reasoning).
- Background jobs a person follows (task-rows).
- The designed workflow before it runs (flowchart).
Anatomy
- header: the run's status (a glyph and a word), total time, how many steps and how many failed, tokens in and out, cost
- axis: time marks across the lane (0, 2 s, 4 s…), a line at now while running
- row: indent and a chevron for steps with children, the kind's glyph (model, tool, retrieval, check, agent, wait), the name and the model; the bar on the lane from start to end in the kind's colour; failed attempts before it as hatched segments with a gap; the duration at the end
- selected step: the row ringed and a detail panel (beside the trace when wide, under it when narrow): name, kind, start and duration, attempts with their errors, tokens and cost, input and output
- running step: the bar's open end grows with time and carries a soft edge; the duration counts
Variants
- density: compact, default
States
- running (live)
- succeeded
- failed (the failing step and its parents are marked)
- retried
- cancelled
- collapsed
- selected
- empty (no steps yet)
Keyboard
- The trace is a tree grid with one tab stop: ↑/↓ move between visible steps, → opens a step or goes to its first child, ← closes it or goes to its parent
- Home/End go to the first and last step; Enter or Space shows the step's detail
- Escape clears the selection
Motion
New steps grow into the list and the rows below slide down (useFlip). While the run is live the open bars grow on a clock that runs only while something is running and the trace is on screen, then stops. Opening and closing a step folds its children. The detail cross-fades to the chosen step. Reduced motion: bars jump to their length each tick of the clock; nothing slides.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
spans (required) | TraceSpan[] | — | |
now | number | — | ms since the run started; omit to let the trace keep its own clock while something runs. |
title | ReactNode | — | The run's name (the request it answered). |
selected / defaultSelected / onSelectedChange | string | null | — | |
expanded / defaultExpanded / onExpandedChange | string[] | — | Open steps. Default: every step. |
density | "compact" | "default" | — | |
currency | string | — | Cost symbol. Default "$". |
className / classNames / style / ref | root | — | className: Classes on the documented visual root; no override by default. classNames: Classes for the named visual parts; no overrides by default. style: Inline styles on the documented visual root; no overrides by default. ref: Receives the documented native target or imperative handle; omitted by default. |
selected | string | null | — | |
defaultSelected | string | null | — | |
onSelectedChange | ((id: string | null) => void) | — | |
expanded | string[] | — | |
defaultExpanded | string[] | — | |
onExpandedChange | ((ids: string[]) => void) | — | |
className | string | — | Classes on the documented visual root; no override by default. |
classNames | Partial<Record<"root" | "summary" | "row" | "name" | "detail" | "bar" | "duration" | "a… | — | Classes for the named visual parts; no overrides by default. |
style | CSSProperties | — | Inline styles on the documented visual root; no overrides by default. |
ref | Ref<HTMLDivElement> | — | Receives the documented native target or imperative handle; omitted by default. |
extent | number | — | The time axis's length in ms; omit to fit the run so far. Give the whole run's length while a replay rewinds it (the Replay bar's `frozen`), so the bars stay in place and only the line at now moves. |
ghost | TraceGhost | — | A ghost re-run to draw under the real run: dashed bars on the same axis, each step's time and cost difference. |
criticalPath | boolean | — | Mark the critical path (the chain of steps that set the run's length), and the ghost's. |
detailExtra | ((span: TraceSpan) => ReactNode) | — | More in the chosen step's detail, after its output: a re-run picker, links. |
Built from
- spinner
Dependencies
lucide-react
Import
import { RunTrace } from "@beamline/run-trace";
Get it
Run trace is part of Beamline UI. Install the parts you need in your React app as compiled packages or editable source. Run trace is included in the free MIT sample. Get Beamline · Connect your agent
More in AI & agents
- Image generation: The frame an AI image is generated into: a field of brand-hued pixels breathes with the progress while the model works, then the image arrives —…
- Flowchart: A workflow as steps on a dotted canvas: a trigger, conditions that branch into paths side by side, actions and waits, read top to bottom; during a run…
- Run theatre: One agent run as a theatre: the Run trace's waterfall under a transport (play, scrub, speed) that replays the run as it happened. Pick a step and re-run…
- Answer compare: Two answers to the same prompt side by side, and a person's verdict: A is better, a tie, B is better, or both are bad, with the reasons that decided it…
- Branch navigator: The versions of an assistant conversation that forked when a message was edited or an answer regenerated: a “‹ 2 / 3 ›” switch on each message that has…
- Response: An assistant's answer as streamed markdown in the system's reading type: bursty tokens flow in at an even pace, each new word fades in through a short…
- Chat thread: People talking to people: messages grouped by person and day, reactions, delivery and read receipts that glide to the newest message read, who is typing…
- Model picker: Choose the AI model for a request by what it can do and what it costs: a trigger with the model's name opens a searchable list grouped by provider, with…
- Task rows: Background work an agent is doing, one row per task: status as a glyph and a word, what it produced, how long it has run or took, a progress bar while…
- Conversation: The scrolling column of a conversation: follows new content while you are at the bottom, stops when you scroll up to read, and offers a way back; shared…
- Context cards: The knowledge an agent retrieved before it answered: one card per chunk with what it is about, the text it read with the search words marked, how…
- Prompt suggestions: Ready-made prompts a person can start from or follow up with: chips, cards or a list; a picked one lifts off and flies into the composer as its text…
- Plan: An agent's plan: numbered steps with live status, progress, and Approve / Edit / Reject when it needs sign-off; approving shows progress, and a refusal…
- Approval card: The agent stops and asks before it acts: what it wants to do, exactly what that changes, any choices it needs, and Approve or Reject; both run your…
- Tool call: One tool call in an agent's run: status, what it did and a short result on one quiet row that opens to the exact input and output; stops for permission…
- Recommendation card: One suggestion from the agent that the person may take or leave: what it suggests, why, the expected effect and how sure it is (a meter and a word…
- Citations: Inline numbered citations that preview their source on hover or focus, plus a numbered source list; streamed answers flow in at an even pace with the…
- Reasoning: The agent's trace, fed by your stream: a shimmering label and the seconds so far while it works, then "Thought for N seconds"; steps that check off…
- Attachment: A file tile: preview or typed glyph with the type named, name, size, upload progress, error with retry, and a keyboard-reachable remove.
- Prompt bar: The agent composer: a field that grows, @ to add a source, / for a command, a model picker, files and dictation, and one button that sends with progress…
- Selection actions: Select a passage and hand it to the agent: a bar over the selection with quick actions, your own instruction and More; while the agent works it says so…
- Message: One turn in a conversation with an agent: the person's words in a quiet bubble, the agent's answer on the page with its orb mark, trace, tool calls and…