Skip to content

Trace Waterfall

Every call of a run on one time axis: nested by who called whom, live bars, the input, output or error inline, filters and search, brush to zoom, and the critical path that set the total time.

On this page
Used for
  • Find the slow call
  • Read a run's timeline
  • Debug a failed span
  • Compare agent calls
  • Audit tool latency

Examples

Installation

npx knowns-ui@latest add trace-waterfall
For Claude Code, Cursor or Codex: installs it and wires the props to your own data.

Props

run
AgentRun
Read spans and actors live (useAgentSnapshot). Takes precedence over spans / actors.
spans / actors
Span[] / Actor[]
Default[]
Plain data. Rows nest by caller: a call made by X sits under the call into X that was open when it started (lead → subagent → its tools).
title
ReactNode
Default"Trace"
Heading; names the region. Calls, failures and total time sit next to it.
defaultFilter
"all" | "errors" | "slow"
Default"all"
Errors and Slow (> p90 of finished calls) keep each match's ancestors, dimmed, so the tree still reads. Search matches summary, tool, caller and error.
defaultCriticalPath
boolean
Defaultfalse
Ring the chain that set the total time (the top call that ended last, then its child that ended last…); the rest dims.
maxHeight
number
Default460
Body height before it scrolls.
virtualizeAbove
number
Default200
Past this many visible rows only the rows in view are mounted; open rows are measured.
now
number
Clock override for tests and stills. Running bars otherwise grow on a 500ms tick with a linear transition.
toolbar
boolean
Defaulttrue
The filter, search and critical-path controls. Set false for a small read-only view, such as a dashboard tile: the title and the count stay.
axisHint
boolean
Defaulttrue
The "Drag the axis to zoom" hint over the labels. Set false for a still or a video, where it reads as chrome; brushing still zooms.
Mouse
-
Click a row: input / output / error inline. Chevron: collapse a subtree. Drag across the axis to zoom; double-click (or Reset zoom) to go back. A time cursor follows the pointer; bars show a tooltip.
Keyboard
role=tree
↑ ↓ Home End PageUp PageDown move, ← collapses (or goes to the parent), → expands (or goes to the first child), Enter / Space opens details. The axis takes Esc or 0 to reset zoom.

What it handles

  1. 01Nests rows by caller, lead agent then subagent then its tools, and colours each bar by agent with failures in red.
  2. 02Grows running bars live from one clock, writing the view and now into CSS variables so React renders only when the data changes.
  3. 03Opens a row inline into its input, output or error as highlighted JSON.
  4. 04Filters to All, Errors or Slow, where slow means above the p90 duration, and searches calls by text.
  5. 05Zooms by brushing the axis, and Escape or 0 resets it, and without a brush it shows the full run.
  6. 06Moves by keyboard: Up and Down between rows, Enter or Space to open, Left and Right to collapse or expand a subtree, and it virtualises past virtualizeAbove rows.

States

First render
Nothing. Rows and bars paint as they are
none
Rows reorder or collapse
Rows glide to their new place
280ms, ease in-out
A new row arrives
It settles in from slightly above
280ms, ease out
Row opens
The chevron turns and the detail shows
180ms, ease out
Call finishes
Its duration label fades in
180ms, ease out
Running bar
It grows with the clock on every frame
none
Reduced motion
Rows jump and labels appear at once
0ms

Works with

When to use

When to use

  • Debugging a run: every tool call on one time axis with its timing, nested by caller, with input, output and errors inline.
  • Finding the critical path or the slow step in a long run, with filters, search and brush zoom.
  • Large traces: rows are virtualised, so thousands of spans stay smooth.

When not to use

  • End users who only need to know what the agent is doing right now: use Agent Monitor.
  • Showing one call in detail on its own: use Tool Call Card.
  • A high-level picture of who talks to whom: use Agent Graph.

Using with AI

Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:

  • Add the Knowns UI Trace Waterfall to my app and wire it to my own data.
  • I need debugging a run: every tool call on one time axis with its timing, nested by caller, with input, output and errors inline. Set that up with the Knowns UI Trace Waterfall.
  • Which Trace Waterfall props do I need for a minimal setup? Show me a short example.

With the server connected, your assistant calls get_component({ name: "trace-waterfall" }) and search_docs({ query: "trace waterfall" }).

Need help?

Stuck on Trace Waterfall, or found something off? We read every message.