AI Memory Infrastructure
The Memory Layer
for AI Agents.
Zero-knowledge, model-agnostic long-term memory with conflict resolution and memory decay. Open-source.
Read the architecture →import { SynapseLayer } from "synapse-layer"const synapse = new SynapseLayer({ userId, password })// password never leaves the client// Store — auto-encrypted AES-256-GCM before transmissionawait synapse.store("User prefers TypeScript and dark mode", {intent: "preference", importance: 0.9, source: "explicit"})// Recall — semantic search + trust scoringconst results = await synapse.recall("user preferences")// → [{ content: "...", trust_score: 0.94, is_winner: true }]// Neural Handover — HMAC-signed, 24h TTLconst handover = await synapse.createHandover({ targetModel: "gpt-4o" })// → { handover_id: "abc123", hmac: "a3f9...", expires_in: "24h" }
Zero-Knowledge Context
Agents remember users without exposing data to any server.
Encryption happens client-side before any network call.
AES-256-GCM · PBKDF2-SHA256 · 210,000 iterations
Deterministic Recall
Consistent, ranked context on every retrieval.
Semantic search + trust scoring formula.
pgvector HNSW · cosine similarity · importance(35%) + confidence(25%) + stability(20%)
Consensus Engine
Contradictory memories resolve to a deterministic winner.
Truth Quotient (TQ) formula with source weights.
explicit=1.5× · system=1.0× · inference=0.5× · winner promoted, loser deprecated
Neural Handover™
Switch models without losing agent state.
Model-neutral JSON signed with HMAC-SHA256, injected via MCP.
TTL 24h · XML for Claude · Markdown for GPT · minimal for Llama
LLMs are stateless. Every session starts from zero.
Agents repeat context, lose continuity, and hallucinate state.
Synapse Layer is the persistent memory layer that fixes this —
encrypted on the client, retrieved semantically, resolved deterministically.
Architecture
How It Works
Plaintext never leaves the client. The server stores only encrypted blobs and embedding vectors.
Encryption happens before any network call
Server performs vector search on embeddings, not on content
Recall returns encrypted payload — decryption is client-side only
Conflict resolution runs on metadata (TQ scores), never on plaintext
Conflict Resolution
Memory That Resolves Itself
Without Synapse Layer
- ✗Agent receives conflicting user preferences
- ✗No resolution mechanism exists
- ✗Latest write wins — or random
- ✗Agent behavior becomes inconsistent and unpredictable
With Synapse Layer
- ✔Conflict detected automatically on store
- ✔TQ formula elects winner deterministically
- ✔Loser deprecated, winner promoted
- ✔Agent behavior is consistent and auditable
store("User prefers conservative investments", source="explicit", stability=8)
store("User wants to invest in crypto", source="inference", stability=1)resolveConflicts({ userId })Memory A → TQ: 0.94 ✔ WINNER (explicit · stability: 8 · recalled: 12×) Memory B → TQ: 0.34 ✗ DEMOTED (inference · stability: 1 · recalled: 0×) Result: agent uses Memory A. Memory B deprecated.
Security
Trust Boundaries
The server is a blind vault.
It stores encrypted blobs and embedding vectors.
It cannot reconstruct, read, or infer the original content.
All memory content (AES-256-GCM, client-side)
Neural Handover packages (HMAC-SHA256)
Plaintext · passwords · decrypted content
Vector dimensions · timestamps · fact_hash · intent · credit balance
Client device security · embedding vectors stored unencrypted (required for search)
COMPLIANCE NOTE — Synapse Layer may qualify as an encrypted data processor, not a data controller. Consult your legal team for your specific jurisdiction.
Use Cases
Built for Real Infrastructure
SaaS Copilot Personalization
Product teams building AI assistants
User preferences, workflow patterns, tool configs
Personalized responses without re-prompting every session.
Support Agent Continuity
Customer support platforms
Issue history, resolution patterns, user sentiment
Agents that remember past interactions across sessions and models.
Multi-Model Orchestration
Teams running Claude + GPT + Llama in parallel
Shared user context, session state, preferences
Seamless handover between models with zero context loss.
Privacy-First Personal Assistants
Developers building tools for sensitive use cases
Personal preferences, health context, financial behavior
Persistent personalization without server-side plaintext exposure.
CRM Intelligence Layer
Sales and GTM engineering teams
Customer interaction history, deal context, communication style
AI agents that evolve their understanding of each customer over time.
Regulated Environments (LGPD / GDPR)
Teams in healthcare, finance, legal
Encrypted user context with soft-delete compliance
Compliant memory with delete_memory audit trail.
Get Started
First memory in 2 minutes
pip install synapse-layer # or npm install synapse-layer
Your agents are stateless.
They don't have to be.
Open-source. Self-hostable. Apache 2.0.