.memoryignore file lets you define custom regex patterns for Layer 3 — project-specific sensitive data.
Redaction Layers
EchoVault redacts secrets in three layers:Layer 1: Explicit Tags
User-marked sensitive content using Anything inside
<redacted> tags:<redacted> tags is replaced with [REDACTED].Layer 2: Automatic Patterns
Built-in detection for common secret formats:
- Stripe keys:
sk_live_*,sk_test_* - GitHub tokens:
ghp_* - AWS keys:
AKIA* - Slack tokens:
xoxb-* - Private keys:
-----BEGIN PRIVATE KEY----- - JWT tokens:
eyJ* - Password fields:
password: value - Secret fields:
secret: value - API key fields:
api_key: value
what, why, impact, details) before writing to disk.
Creating .memoryignore
Create a.memoryignore file in your memory home directory:
~/.memory/.memoryignore
File Format
The.memoryignore file contains regex patterns, one per line:
Patterns are interpreted as Python regex. Escape special characters with
\\.Example Patterns
Social Security Numbers
Credit Card Numbers
Email Addresses
Internal Tokens
Database URLs
IP Addresses
Hostnames
Phone Numbers
Testing Patterns
Test your.memoryignore patterns by saving a test memory:
[REDACTED] in search results.
Common Use Cases
Consultant Working with Multiple Clients
Open Source Project
Financial Services
Built-in Patterns
You don’t need to add these — they’re already included in Layer 2:| Pattern | Example |
|---|---|
| Stripe live keys | sk_live_abc123 |
| Stripe test keys | sk_test_xyz789 |
| GitHub tokens | ghp_abc123xyz |
| AWS access keys | AKIAIOSFODNN7EXAMPLE |
| Slack bot tokens | xoxb-123-456-789 |
| Private keys | -----BEGIN RSA PRIVATE KEY----- |
| JWT tokens | eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... |
| Password fields | password: secret123 |
| Secret fields | secret: abc123 |
| API key fields | api_key: xyz789 |
Redaction Behavior
All matching patterns are replaced with[REDACTED]:
Before redaction:
Implementation Details
Redaction happens insrc/memory/redaction.py:
.memoryignore are loaded lazily and cached per session.
Performance
.memoryignore patterns are compiled once per session. Adding many patterns has minimal performance impact.
Troubleshooting
Pattern Not Working
Problem: Data still appears unredacted Solution:-
Verify
.memoryignoreis in the correct location: -
Test regex pattern independently:
-
Check for syntax errors in
.memoryignore
Too Much Redacted
Problem: Legitimate content is being redacted Solution:-
Make patterns more specific:
-
Remove overly broad patterns from
.memoryignore
Pattern Syntax Errors
Problem: Invalid regex crashes memory save Solution:-
Validate regex patterns:
-
Escape special characters:
\\ . * + ? ^ $ { } [ ] ( ) |
Security Best Practices
- Use explicit tags for highly sensitive data:
<redacted>secret</redacted> - Test patterns before committing to shared
.memoryignore - Review memories periodically:
memory search "*" | less - Avoid saving secrets entirely when possible
Next Steps
Save Memories
Learn how to save memories with redaction
Configuration Overview
Review other configuration options