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:

ParameterDefaultDescription
agent_idrequiredUnique namespace for this agent's memories
sanitize_enabledTrueEnable PII sanitization (Layer 1)
privacy_enabledTrueEnable experimental embedding noise (Layer 2; no DP guarantee)
privacy_epsilon0.5Experimental noise parameter (0.01–10.0; not a formal ε guarantee)
aggressive_sanitizeFalseStrip 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:

VariableDescription
SYNAPSE_TOKENConnect Token for SDK authentication (sk_connect_*)
SYNAPSE_FORGE_URLOverrides 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.