Skip to main content
The Agent Sentinel SDK writes append-only JSON Lines to a local ledger by default.

Location

Default path (relative to your current working directory):
Override the base directory with:

Format (JSONL)

Each line is a complete JSON object representing one action:

Fail-open behavior

Ledger writes are fail-open: if the SDK cannot write (permissions, disk full, etc.), it logs an internal error and your agent continues.

PII / secrets

Since SDK 0.4.0, tool inputs are redacted before they are written or uploaded: sensitive keys (api_key, token, password, …) and secret-shaped strings (provider API keys, private-key headers, JWTs) become [redacted:<kind>], and the entry is marked inputs_redacted: true. Set AGENT_SENTINEL_LEDGER_INPUTS=none to skip input capture entirely. See Secret redaction. Outputs are not redacted, and redaction is pattern-based, so treat the ledger like application logs:
  • Store it securely
  • Rotate it
  • Avoid returning raw secrets from tool functions

Rotation

Ledger files grow over time. A simple rotation pattern: