Loading component…
Loading component…
Every LLM and tool call of an agent run as rows, like the Network tab of DevTools – a waterfall per call, filters, sorting, and each call's request, response and retries as JSON
To reuse this local React demo, copy all files from the Code tab into the same folder, then import ToolCallsNetwork from ./tool-calls-network.
import { ToolCallsNetwork, type NetworkCall, type NetworkAgent } from "@/components/ui/tool-calls-network";
const agents: NetworkAgent[] = [
{ id: "planner", name: "Planner" },
{ id: "researcher", name: "Researcher" },
];
const calls: NetworkCall[] = [
{
id: "c1", agent: "planner", kind: "llm", name: "claude-opus-5.5", detail: "plan the release", icon: <ClaudeLogo />,
status: "done", start: 0, end: 7400, phases: { queued: 120, waiting: 1400 }, tokensIn: 4210, tokensOut: 1850, code: 200,
request: { model: "claude-opus-5.5", messages: [/* … */] }, response: { stop_reason: "end_turn" },
},
{
id: "c2", agent: "researcher", kind: "tool", name: "github.search_code", detail: "round( in billing/", icon: <GitHubLogo />,
status: "running", start: 19100, phases: { queued: 50 }, request: { q: "round( path:billing/" },
},
];
export function Run({ now }: { now: number }) {
return <ToolCallsNetwork title="Ship v2.4 – tool calls" calls={calls} agents={agents} now={now} />;
}| Name | Type | Default | Description |
|---|---|---|---|
| calls | NetworkCall[] | Every call – { id, name, detail?, kind, status, agent, start, end?, phases?, tokensIn?, tokensOut?, bytes?, code?, icon?, request?, response?, error?, retries? } | |
| kind / status | "llm" \| "tool" / "queued" \| "running" \| "done" \| "failed" | LLM calls are tinted indigo, tool calls teal, failures red; a running call grows at the live edge | |
| start / end | number | ms from the start of the run – leave end out while the call runs | |
| phases | { queued?: number; waiting?: number } | Queued ms and the wait for the first token (LLM) – the rest is streaming or tool exec | |
| request / response | unknown | An object or a string – JSON strings are pretty-printed, big bodies show their start with a Show all button | |
| retries | NetworkAttempt[] | Earlier attempts, oldest first – { start, duration, code?, error? } | |
| agents | NetworkAgent[] | { id, name, color? } – the pixel mark's color defaults to blue for the first agent, then a palette | |
| now | number | The clock in ms from the start of the run – e.g. a faster one for a demo | |
| startedAt | number | Epoch ms – without now the component keeps its own clock while anything runs | |
| live | boolean | Whether the run still goes – defaults to true while a call is queued or running | |
| openId / defaultOpenId / onOpenChange | string \| null / (id, call?) => void | The call whose details are open – controlled or not | |
| rows | number | How many rows show before the list scrolls – 12 by default; the height stays fixed | |
| title | string | Names the list for screen readers | |
| className | string | An extra class on the root |
Fills its container's width and never scrolls sideways; the list's height is fixed, so nothing jumps while calls stream in
Narrower than 700px the agent column goes; narrower than 520px the size column too, the search gets its own row and the details take the whole width
On a phone the footer keeps its marks and numbers on one line and "Live" becomes its dot
Only the rows in view are drawn – 500 calls scroll as smoothly as 20
Long names end in … with the full name on hover; big numbers shorten to 182.4K, 2.4B, 990 TB and are never cut
Dark mode built in: switches when an ancestor (usually <html>) has the class dark or data-theme="dark"