Documentation

Synapse Layer Docs

Complete reference for Synapse Layer — persistent, encrypted memory infrastructure for AI agents. Privacy-first, MCP-native, secure-by-design.

First Memory in 3 Minutes

~3 min

3 curls · zero deps · no SDK required

The fastest path to your first AI memory. Export your token, grant consent, store and recall — all via curl.

$ curl -X POST forge.synapselayer.org/api/v1/memory/commit \
  -H "x-connect-token: $TOKEN" -d '{"content": "..."}'
1

Get your Key

Export your Connect Token as an environment variable.

2

Consent + Store

Grant consent and commit your first memory — two curls.

3

Recall

Semantic search across your memories — one curl.

First Memory in 3 Minutes

Install

pip install synapse-layer

Store a Memory (Python)

from synapse_layer import SynapseClient

client = SynapseClient(api_key="sk_connect_...")
client.store(content="User prefers dark mode", agent_id="onboarding-v2", type="MANUAL")
memories = client.recall(query="user preferences", reason="Loading user context for session.")

Store a Memory (cURL)

curl -X POST https://forge.synapselayer.org/api/v1/memory/commit \
  -H "x-connect-token: $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"content": "User prefers dark mode", "agent_id": "my-agent"}'

How It Works

Synapse Layer provides an AES-256-GCM encrypted memory layer accessible via MCP protocol and REST API. Memories are encrypted server-side before storage in PostgreSQL.

Search and recall operate over indexed metadata and derived fields. Memory content remains encrypted at rest (AES-256-GCM) and is decrypted only for authorized responses. Conflict resolution runs via Trust Quotient™ scoring on metadata.

Note: Trust Quotient™ is a per-memory confidence signal (0.0–1.0) combining recency, consistency, confidence, source, and integrity. It is not a security certification or external trust score.

Agent Boundary
plaintext input
POST /api/v1/memory/commit
x-connect-token auth
recall via MCP or REST
Server Boundary
AES-256-GCM encrypt
stores: [encrypted blob]
SHA-256 content dedup
PII detection + differential privacy
search on indexed metadata
returns: decrypted content
✘ zero plaintext tokens in DB

Security — Tested Controls

Every security control below is implemented and production-tested. Implemented controls are validated through internal evidence-based engineering. External audit is not claimed unless explicitly stated. Public components are available on GitHub. Features marked 🔜 are planned.

01

AES-256-GCM Encryption

All memory content encrypted at rest with unique 96-bit IV per operation. Authentication tag verifies integrity.

02

OAuth 2.0 + PKCE S256

Synapse Connect™ uses PKCE S256 mandatory flow. Auth codes are SHA-256 hashed, single-use, 10min TTL.

03

SQL Injection Protection

All queries use Prisma parameterized queries. Zero raw SQL interpolation.

04

HMAC-SHA256 Handover Signatures

Handover packages are HMAC-SHA256 signed for integrity. AES key derivation via PBKDF2-SHA256 (210K iterations).

Core API

Authentication

REST API (Forge): x-connect-token: $TOKEN — REST API uses Connect Tokens via x-connect-token header. Tokens are generated through Synapse Connect™ (OAuth 2.0 + PKCE S256).

MCP Server (/api/mcp): Authorization: Bearer sk_connect_... — MCP Server uses API keys (sk_connect_*) via Authorization Bearer header. Keys are generated from the Forge Dashboard.

Site Capture Gateway (/api/v1/capture): Authorization: Bearer sk_connect_... — Site capture gateway uses Connect Tokens (sk_connect_*) via Authorization Bearer header.

POST /api/v1/memory/commit

Store a memory. Auth: x-connect-token header. Content is AES-256-GCM encrypted server-side and stored with SHA-256 deduplication. Params: content (required), intent, importance, agent_id, metadata.

MCP recall tool

Semantically recall memories by natural language query. Auth: Authorization: Bearer sk_connect_....

MCP save_to_synapse tool

Encrypt and persist a memory with AES-256-GCM. Auth: Authorization: Bearer sk_connect_....

MCP process_text tool

Process and extract structured data from text input. Auth: Authorization: Bearer sk_connect_....

MCP search tool

Full-text and vector search on indexed metadata. Auth: Authorization: Bearer sk_connect_....

MCP health_check tool

Check server status, plan, and rate limits. Auth: Authorization: Bearer sk_connect_....

MCP initialize_context tool

Initialize agent context for a new session. Auth: Authorization: Bearer sk_connect_....

MCP save_memory tool

Save a memory entry to the agent context. Auth: Authorization: Bearer sk_connect_....

MCP store_memory tool

Store a persistent memory with encryption at rest. Auth: Authorization: Bearer sk_connect_....

MCP recall_memory tool

Recall a specific memory by ID or semantic query. Auth: Authorization: Bearer sk_connect_....

MCP list_memories tool

List all memories for the current agent context. Auth: Authorization: Bearer sk_connect_....

MCP memory_feedback tool

Provide feedback on a recalled memory for ranking. Auth: Authorization: Bearer sk_connect_....

MCP neural_handover tool

Secure cross-agent memory handover with audit trail. Auth: Authorization: Bearer sk_connect_....

MCP slo_report tool

Generate SLO compliance report for memory operations. Auth: Authorization: Bearer sk_connect_....

MCP Server Configuration

Synapse Layer is MCP-native. Connect any MCP-compatible client (Claude Desktop, Cursor, custom agents) to the memory server. Tools exposed: recall, save_to_synapse, process_text, search, health_check, initialize_context, save_memory, store_memory, recall_memory, list_memories, memory_feedback, neural_handover, slo_report (13 tools via tools/list).

Framework agnostic — memories stored via one MCP-compatible client can be recalled from any other using the same API key.

Claude Desktop / Cursor Config

{
  "mcpServers": {
    "synapse-layer": {
      "url": "https://forge.synapselayer.org/api/mcp",
      "headers": {
        "Authorization": "Bearer sk_connect_..."
      }
    }
  }
}

🚀 Roadmap Synapse Layer

Synapse Layer builds the infrastructure for persistent memory in AI.

While traditional systems merely retrieve data (RAG), Synapse Layer lets agents genuinely remember, evolve, and maintain context over time.

RAG retrieves. Synapse remembers.

✅ Delivered

• AES-256-GCM encryption at rest (per-operation random IV)
• MCP JSON-RPC native protocol
• REST API + official Python SDK + TypeScript SDK
• Framework agnostic (Claude, Cursor, LangChain via MCP)
• OAuth 2.0 + PKCE S256 (Synapse Connect™)
• SHA-256 content deduplication
• Cross-agent memory tagging via agent_id
• PII detection (11 regex patterns, auto-redaction)
• Differential privacy noise injection

🔄 In Progress

• Secure Agent Handover (V2) — SDK-local JWT packaging works; server-side persistence in progress
• Consent screen UI (Synapse Connect™ UX refinement)
• Semantic recall via pgvector HNSW indexing
• Memory ranking optimization (semantic + recency + scope)
• Multi-agent memory orchestration
• Observability layer (latency, recall precision, traceability)
• Automated security testing pipeline
• Audit logs and traceable memory access
• Token lifecycle hardening

🔜 Planned

• Multi-tenant memory isolation
• Advanced PII redaction layer
• Regional data residency
• Enterprise SLAs and dedicated monitoring
• Long-term context compression
• Autonomous memory prioritization
• SOC 2 Type I