AgentDbg applies redaction to every trace it writes. Before any event data touches disk, AgentDbg walks the payload and replaces values whose keys match known sensitive patterns with the placeholderDocumentation Index
Fetch the complete documentation index at: https://refinehq.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
__REDACTED__. This means that even if your agent passes API keys, authorization headers, or passwords through its tool calls or LLM inputs, those values do not end up in your local trace files.
What redaction does
When AgentDbg records an event, it serializes the payload — which may include nested dicts and lists from LLM inputs, tool arguments, and state snapshots. Before writing, it walks the structure and applies two protections:- Key-based redaction: if a dict key contains any of the configured patterns as a case-insensitive substring, the value is replaced with
__REDACTED__. The key itself is kept so you can still see which field was sensitive. - Size-based truncation: strings longer than
AGENTDBG_MAX_FIELD_BYTESbytes (UTF-8) are cut at the limit and suffixed with__TRUNCATED__.
__TRUNCATED__ regardless of size.
Default behavior
Redaction is on by default. You do not need to configure anything to get it. The default set of redacted key patterns is:auth_token matches token; API_KEY matches api_key; X-Authorization matches authorization.
The default truncation limit is 20,000 bytes. Strings longer than that are cut and marked __TRUNCATED__.
Configure redaction
- Env vars
- YAML
AGENTDBG_REDACT accepts 1, true, or yes to enable redaction. Any other value disables it.Add custom redaction keys
To redact additional fields, replace theAGENTDBG_REDACT_KEYS list with your full desired set. The list is not additive — if you set it, it replaces the defaults. Include the default patterns you still want to keep.
- Env vars
- YAML
Disable redaction for local debugging
If you need to inspect raw payloads during a debugging session, you can turn redaction off entirely.- Env vars
- YAML
Redaction reference
| Env var | YAML key | Default | Description |
|---|---|---|---|
AGENTDBG_REDACT | redact | 1 (on) | Enable or disable redaction globally. |
AGENTDBG_REDACT_KEYS | redact_keys | api_key,token,authorization,cookie,secret,password | Comma-separated list of key patterns. Replaces defaults when set. |
AGENTDBG_MAX_FIELD_BYTES | max_field_bytes | 20000 | Truncation limit in bytes. Minimum enforced value: 100. |