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 differential privacy (Layer 2) |
| privacy_epsilon | 0.5 | DP budget (0.01–10.0, lower = stronger privacy) |
| aggressive_sanitize | False | Strip proper nouns (anti-inference mode) |
python
from synapse_layer import Synapse
# Simple client (recommended for most use cases)
client = Synapse(api_key="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_API_KEY | Alias for SYNAPSE_TOKEN (used by TypeScript SDK) |
| SYNAPSE_AGENT_ID | Default agent identifier (default: "default-agent") |
| SYNAPSE_FORGE_URL | Forge API base URL (default: https://forge.synapselayer.org) |
| LOG_LEVEL | Logging verbosity: DEBUG, INFO, WARNING, ERROR (default: INFO) |
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: Differential Privacy
Calibrated Gaussian noise on embeddings. Controlled by privacy_enabled and privacy_epsilon.
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.