StealThis .dev

Agent Trace Viewer

A collapsible execution timeline for LLM agents that streams in each reasoning step, tool call, observation and final answer with status icons, wall-clock durations and token counts, expandable JSON payloads, nested sub-steps, and an all/tools/errors filter, so you can inspect exactly what an agent did and where it spent time or failed.

Open in Lab
vanilla-js css
Targets: JS HTML

Code

The Agent Trace Viewer renders a full agent run as a vertical timeline: each row is a step typed as a thought, tool call, observation, or answer, complete with a status icon, a wall-clock duration, and a token count. Rows expand to reveal a syntax-highlighted JSON payload — the raw arguments a tool was called with or the data it returned — and tool calls can nest their own sub-steps beneath them, mirroring how a real agent decomposes work.

Press Run to watch the trace stream in step by step, the way it would arrive from a live agent over a stream. A segmented filter narrows the view to all steps, only tool calls, or only errors, and a summary bar keeps a running tally of total duration, tokens, and error count. Every row is keyboard-operable with visible focus, and payloads copy to the clipboard in one click.

The demo showcases the browser Clipboard API (navigator.clipboard.writeText) for copying payloads, with a graceful execCommand fallback, alongside requestAnimationFrame-driven streaming and the <details>-style disclosure pattern rebuilt with ARIA for full control over animation and nesting.