Security

AgentRecall implements multiple layers of security to protect sensitive data.

Overview

Security is a core design principle of AgentRecall. We implement:

Three-Layer Sanitization

All data submitted to AgentRecall goes through three layers of sanitization:

Layer 1: Regex Sanitization

Pattern-based detection and replacement of sensitive data:

Pattern TypeExampleReplaced With
API Keyssk-abc123...{API_KEY}
Emailuser@example.com{EMAIL}
IP Address192.168.1.1{IP_ADDRESS}
JWT TokeneyJhbG...{JWT_TOKEN}
Passwordspassword=secret{REDACTED}

Layer 2: Structure Sanitization

JSON-aware sanitization that preserves structure while replacing sensitive values:

  • Detects sensitive field names (password, secret, token, key)
  • Replaces values with type indicators
  • Preserves JSON structure for readability

Layer 3: Entropy Detection

Shannon entropy analysis to detect high-entropy strings (likely secrets):

  • Calculates entropy for strings 32+ characters
  • Entropy threshold: 4.5
  • Replaces high-entropy strings with {HIGH_ENTROPY_LEN_N}

Client + Server Protection

Double sanitization ensures maximum protection:

  1. Client-side: Sanitize before sending (sensitive data never leaves local)
  2. Server-side: Sanitize again as fallback protection

This "defense in depth" approach ensures that even if client-side sanitization is skipped, server-side sanitization will catch sensitive data.

Authentication

MCP Interface

Uses x-api-key header for authentication:

x-api-key: ak_YOUR_API_KEY

Admin Panel

Uses JWT tokens obtained through email/password login.

Best Practices