Complete reference for the agentdbg command-line tool. Covers list, view, and export commands with all flags: —limit, —json, —no-browser, and —port.
The agentdbg CLI is your primary interface for managing runs from the terminal. It reads traces written to ~/.agentdbg/runs/ by default (override with AGENTDBG_DATA_DIR) and lets you list recent runs, open the timeline viewer in your browser, or export a full run to a single JSON file. All commands are available immediately after pip install agentdbg.
Lists your most recent runs, sorted by start time (newest first). By default it shows the last 20 runs as a formatted table. Use --json when you need to pipe the output to another tool or script.
agentdbg list [--limit N] [--json]
Options
Option
Short
Default
Description
--limit
-n
20
Maximum number of runs to return
--json
—
off
Print machine-readable JSON instead of a table
Exit codes:0 success · 10 internal error
agentdbg list
The plain-text table contains these columns: run_id (first 8 characters), run_name, started_at, duration_ms, llm_calls, tool_calls, and status.When you pass --json, the output is a JSON object with spec_version and a runs array containing the same fields as the table, plus the full run_id UUID.
Starts the local timeline viewer server and, by default, opens your browser. The server keeps running until you press Ctrl+C, so you can leave it open while running more agents — new runs appear in the sidebar automatically.
Exports a single run to a self-contained JSON file. The output contains the run metadata and a complete events array — everything you need to replay or analyze the run offline or share it with a teammate.
agentdbg export RUN_ID --out FILE
Arguments and options
Argument / Option
Short
Required
Description
RUN_ID
—
Yes
Run to export. Accepts a full UUID or a short prefix.
--out
-o
Yes
Output file path (JSON)
Exit codes:0 success · 2 run not found · 10 internal error