Configuration
All configuration is done through constructor parameters and environment variables. Every security layer can be individually controlled.
Constructor Parameters
The Synapse client and the SynapseMemory core class accepts the following parameters:
| Parameter | Default | Description |
|---|---|---|
| agent_id | required | Unique namespace for this agent's memories |
| sanitize_enabled | True | Enable PII sanitization (Layer 1) |
| privacy_enabled | True | Enable experimental embedding noise (Layer 2; no DP guarantee) |
| privacy_epsilon | 0.5 | Experimental noise parameter (0.01–10.0; not a formal ε guarantee) |
| aggressive_sanitize | False | Strip proper nouns (anti-inference mode) |
python
from synapse_layer import Synapse
# Simple client (recommended for most use cases)
client = Synapse(token="sk_connect_YOUR_KEY")
# Advanced: core engine with fine-grained pipeline control
from synapse_memory.core import SynapseMemory
memory = SynapseMemory(
agent_id="my-agent",
sanitize_enabled=True,
privacy_enabled=True,
privacy_epsilon=0.5,
aggressive_sanitize=False,
)Environment Variables
The following environment variables are recognized by the SDK and MCP server:
| Variable | Description |
|---|---|
| SYNAPSE_TOKEN | Connect Token for SDK authentication (sk_connect_*) |
| SYNAPSE_FORGE_URL | Overrides the Forge base URL (default: https://forge.synapselayer.org) |
Security Layer Control
Every memory operation passes through a 3-layer security pipeline. Each layer can be individually enabled or disabled:
Layer 1: Semantic Privacy Guard
PII/secret detection and redaction (15+ patterns). Controlled by sanitize_enabled.
Layer 2: Embedding Noise (Experimental)
Experimental Gaussian noise on a derived embedding. Controlled by privacy_enabled and privacy_epsilon; not a formal DP guarantee.
Layer 3: Intelligent Intent Validation v2.1
Auto-categorization with critical keyword promotion. Always active — cannot be disabled.
Warning
Disabling security layers is not recommended for production use. The default configuration (all layers active) provides the strongest protection.