Skip to main content

Tracing

BAP automatically records NDJSON traces for every session to ~/.bap/traces/. The bap trace command lets you view, filter, replay, and export these traces.

View Recent Traces

List Sessions

Shows all recorded trace sessions with timestamps and step counts.

Filter by Session

string
Show traces for a specific session ID.
number
default:"10"
Number of trace entries to show.
flag
Show all trace entries instead of the default last 10.
flag
List all recorded trace sessions.

Replay as HTML Timeline

Generate a self-contained HTML timeline viewer:
Opens an interactive timeline showing every request with timing, status, and result summary. The HTML file is self-contained — no external dependencies.
flag
Generate a self-contained HTML timeline viewer and save it to the current directory.

Export as JSON

string
Export traces as JSON. Optionally provide a filename.

Trace Data

Each trace entry includes:
  • Method — The BAP protocol method called (e.g., page/navigate, agent/act)
  • Timing — Request start time and duration in milliseconds
  • Status — Success or error
  • Result summary — Condensed result data
Use bap trace to debug failures. Every BAP command is recorded with timing and result data, making it easy to identify what went wrong and when.