Skip to main content
Prevent secrets and personally identifiable information from being stored in agent memory. TealMemory scans all write operations and denies any that contain detected secrets or PII patterns.

Policy JSON

What It Does

  • Scans memory writes for secrets (API keys, tokens, credentials) and PII (emails, SSNs, phone numbers)
  • Denies the write if any secret or PII is detected — the data never reaches the memory store
  • Does not redact — the write is blocked entirely rather than storing a redacted version
  • Works across all memory scopes (request, session, user, shared, global)

Example

Agent attempts to store a conversation containing an API key in session memory: Decision object:

Install

Customize

Setting redact_pii_on_write to true allows PII-containing data to be stored with PII replaced by placeholders. This may break context for the agent. Use DENY_WRITE unless your application can handle redacted memory entries.