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 differential privacy (Layer 2)
privacy_epsilon0.5DP budget (0.01–10.0, lower = stronger privacy)
aggressive_sanitizeFalseStrip 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:

VariableDescription
SYNAPSE_TOKENConnect Token for SDK authentication (sk_connect_*)
SYNAPSE_API_KEYAlias for SYNAPSE_TOKEN (used by TypeScript SDK)
SYNAPSE_AGENT_IDDefault agent identifier (default: "default-agent")
SYNAPSE_FORGE_URLForge API base URL (default: https://forge.synapselayer.org)
LOG_LEVELLogging 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.