agentskit.js

RedactionMode

Auto-generated API reference for RedactionMode.

Type Alias: RedactionMode

RedactionMode = "redact" | "tokenize"

Defined in: memory/src/redaction.ts:31

Wrap any ChatMemory so PII is redacted (or tokenized) on every save(). Works with the in-memory, file, sqlite, turso, and redis chat memories. load() and clear() are passthrough β€” reveal happens at read time via @agentskit/core/security reveal(), not inside the memory.

mode: 'redact' (default) replaces matches with the rules' bracket markers β€” irreversible. mode: 'tokenize' replaces matches with opaque <&lt;piitoken:…>> markers and stores originals in the vault so role-gated reveal() can recover them.

Closes the memory-write half of issue #791.

✎ Edit this page on GitHubΒ·Found a problem? Open an issue β†’Β·How to contribute β†’

On this page