AgentDbg stores all trace data as plain files on your local machine — nothing is sent to any external service. Every run produces two files in a dedicated directory you can inspect, move, or delete with any standard tool. This page explains where those files live, what they contain, and how to customize the storage location and run naming.Documentation Index
Fetch the complete documentation index at: https://refinehq.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
Default storage location
By default, AgentDbg writes trace data to~/.agentdbg/runs/. Each run gets its own subdirectory named after its run ID:
File layout
run.json
run.json holds high-level metadata about the run. It is updated at run end and contains:
run_id— unique UUID for the runrun_name— display name shown inagentdbg viewandagentdbg liststarted_at/ended_at— ISO 8601 timestampsduration_ms— total run duration in millisecondsstatus— one ofrunning,ok, orerrorcounts— aggregate counts ofllm_calls,tool_calls,errors, andloop_warningslast_event_ts— timestamp of the most recent event
run.json:
events.jsonl
events.jsonl is an append-only log. Each line is a complete JSON object representing one event. Events are written in chronological order as they occur, so you can stream or tail the file while the agent is running.
Each event includes:
event_type— one ofRUN_START,RUN_END,LLM_CALL,TOOL_CALL,STATE_UPDATE,ERROR,LOOP_WARNINGts— ISO 8601 timestamppayload— event-type-specific data (model, prompt, response, tool args, etc.)meta— freeform metadata
All string values in both files are subject to redaction and truncation before being written. See Redact Secrets from Agent Traces for details.
Change the data directory
To store traces somewhere other than~/.agentdbg, set AGENTDBG_DATA_DIR. This is useful for keeping traces alongside your project, pointing to a larger disk, or separating traces from different projects.
- Env var
- YAML
/path/to/my/agentdbg/data/runs/<run_id>/. The directory is created automatically on the first run.
Name your runs
By default, AgentDbg derives a run name from the script path and timestamp (for example,path/to/script.py:main - 2026-02-18 14:12). You can override this in two ways:
Environment variable — applies to the current process:
name parameter to @trace or traced_run — applies to that specific run and overrides everything else:
AGENTDBG_RUN_NAME is an environment-only setting. It cannot be set in YAML config files.Delete a run
Because runs are plain directories, you can delete one by removing its directory:agentdbg view UI using the delete button in the run sidebar.
Loop detection settings
AgentDbg continuously scans recent events for repeated patterns. Two settings control sensitivity:| Env var | YAML key | Default | Description |
|---|---|---|---|
AGENTDBG_LOOP_WINDOW | loop_window | 12 | Number of recent events to scan for patterns. Minimum: 4. |
AGENTDBG_LOOP_REPETITIONS | loop_repetitions | 3 | Consecutive repetitions needed to emit a LOOP_WARNING. Minimum: 2. |
loop_window if your agent has long natural cycles that are triggering false warnings. Increase loop_repetitions to require more evidence before a warning fires.
- Env vars
- YAML
Storage settings reference
| Env var | YAML key | Default | Description |
|---|---|---|---|
AGENTDBG_DATA_DIR | data_dir | ~/.agentdbg | Base directory for run storage. |
AGENTDBG_RUN_NAME | (env only) | (derived) | Display name for the current run. |
AGENTDBG_LOOP_WINDOW | loop_window | 12 | Event window for loop pattern detection. |
AGENTDBG_LOOP_REPETITIONS | loop_repetitions | 3 | Repetitions required to trigger a loop warning. |