How configuration works
AgentDbg accepts settings in two forms:- Environment variables — set in your shell or
.envfile, effective for a single process invocation. - YAML config files — written once and applied automatically to every run in that scope.
Precedence order
When the same setting appears in multiple places, AgentDbg uses the value from the highest-priority source and ignores the rest. From highest to lowest:- Function arguments — values passed directly to
@trace(...)ortraced_run(...) - Environment variables — only when the variable is explicitly set
- Project config —
.agentdbg/config.yamlin the current working directory - User config —
~/.agentdbg/config.yaml - Defaults — built-in values listed in the table below
Function arguments always win. If you pass
max_llm_calls=10 to @trace(...), it overrides the same setting in env vars and both YAML files.Complete settings reference
Core settings
Guardrail settings
Guardrails are opt-in. They are all disabled (null) by default and must be set explicitly to take effect.
Full YAML example
The example below shows every available setting. Copy it to.agentdbg/config.yaml in your project root or to ~/.agentdbg/config.yaml as a user-level default, then remove or adjust any line you want to change.
null in YAML means the guardrail is disabled. Remove the key entirely or set it to a number to enable the limit.Safe-by-default behavior
AgentDbg ships with two design choices that protect you without any configuration:- Redaction is on by default. Common secret-bearing keys (
api_key,token,authorization,cookie,secret,password) are scrubbed from trace data before it is written to disk. You never accidentally persist an API key. - Storage is local by default. Traces land in
~/.agentdbg/on your own machine. No data is sent to any external service.