Clarify Complexity. More than just AI.
Neuroscience memory
for AI agents.
The cognitive core of our applications — open source, tested, extracted from our production system. 9 foundational algorithms that teach your AI to remember, forget, and sleep.
First memory in 30 seconds.
No account, no cloud, no config file — Node 22+ and two packages.
npm install @zensation/core @zensation/adapter-sqliteimport { MemoryCoordinator } from '@zensation/core';
import { createMemoryAdapter } from '@zensation/adapter-sqlite';
const memory = new MemoryCoordinator({
storage: await createMemoryAdapter()
});
await memory.store('Project deadline is Friday');
const recall = await memory.recall(
'When is the deadline?'
);
console.log(recall);[
{
"id": "4fe78358-ca39-4f21-952a-840eb8463652",
"content": "Project deadline is Friday",
"layer": "semantic",
"score": 0.29525619714283413,
"confidence": 0.7,
"metadata": { "source": "user", "accessCount": 0 }
}
]In Claude Code it takes no code of your own: the plugin brings five memory tools and one local file, no account. Memory for Claude Code in one line →
Extracted from over 440,000 lines of production code.
ZenBrain comes out of a production system: we extracted its memory core from ZenAI, our first product with over 12,000 tests (as of August 2026), so you can use the algorithms.
15 mechanisms. 9 foundational + 6 PMA components.
ZenBrain comprises 15 neuroscience-grounded mechanisms: 9 foundational algorithms, among them FSRS-style scheduling, Hebbian, Sleep Consolidation and Bayesian Confidence; the package @zensation/algorithms ships them as 20 modules, open source (zero dependencies); plus 6 Predictive Memory Architecture (PMA) components that govern memory dynamics; they are described in the paper and are not part of the open-source packages: NeuromodulatorEngine, ReconsolidationEngine, TripleCopyMemory, PriorityMap, StabilityProtector, MetacognitiveMonitor.
Hebbian Learning
Strengthen connections through co-activation
Hebb 1949FSRS-style Spaced Repetition
FSRS-style review scheduling
FSRS project (open-spaced-repetition)Sleep Consolidation
Simulated replay modelled on sleep
Stickgold & Walker 2013Ebbinghaus Decay
Forgetting curve with adaptive intervals
Ebbinghaus 1885Bayesian Confidence
Confidence propagation over a graph (Bayesian-style, noisy-OR)
@zensation/algorithms/bayesianEmotional Tagging
Emotional content decays more slowly
Cahill & McGaugh 1998Personalized PageRank
Associative search over a graph
HippoRAG 2 (2025)Context-Dependent Retrieval
Retrieval by context (encoding specificity)
Tulving 1973Consolidation
Emotionally weighted episodes become facts
@zensation/coreUncertainty Bands
For retrievability and propagation (heuristic, Wald-type)
@zensation/algorithms/intervalsCross-Context (experimental)
Find merge candidates across contexts
@zensation/coreRetention Visualization
Export Ebbinghaus curves as data points
Ebbinghaus 1885Neuromodulation
Dopamine, NE, 5-HT, ACh — four channels with tonic + phasic dynamics
Schultz 1997 · Aston-Jones 2005Reconsolidation
Memory becomes labile on retrieval — four PE-gated update modes with rollback
Nader 2000 · Schiller 2010Triple-Copy Memory
Three traces with divergent dynamics — fast (4h), medium (14d), deep (logarithmic)
Squire & Bayley 2007One coordinator. 7 memory layers.
The MemoryCoordinator picks the layer when you store, searches up to five layers at once when you recall, and turns emotionally weighted episodes into facts.
import { MemoryCoordinator }
from '@zensation/core';
import { createMemoryAdapter }
from '@zensation/adapter-sqlite';
const memory =
new MemoryCoordinator({
storage: await createMemoryAdapter()
});
// Store — auto-routes
await memory.store(
'TypeScript has generics'
);
// Recall — cross-layer
const results =
await memory.recall(
'What do I know about TypeScript?'
);
// Consolidate — episodes to facts
await memory.consolidate();Sovereign — runs in your stack
ZenBrain is the memory core, not the model and not the infrastructure — it runs in your stack: your LLM (Mistral, Llama, or whatever you choose), your inference (vLLM, Ollama), your database (PostgreSQL/SQLite), your infrastructure. No cloud lock-in, no vendor lock-in — a sovereign memory layer for European AI stacks.
How it compares
How ZenBrain relates to other open memory systems is set out on separate pages. Every figure there carries its method and source.
Two core packages. One system.
@zensation/algorithms is the pure core — zero dependencies, every function importable on its own. @zensation/core ties the layers together in the MemoryCoordinator and uses FSRS-style scheduling and emotional tagging from it.
npm i @zensation/corenpm i @zensation/algorithms# published with v0.3# published with v0.3Open source means: build together.
Apache 2.0. Contributions welcome. No CLA required.
GitHub
Source code, issues, discussions
Repository →GitHub Discussions
Questions, ideas, show & tell, release updates
Open →Contributing
Read CONTRIBUTING.md, pick an issue, open a PR
Read guide →What's next.
MemoryCoordinator, Sleep Consolidation, 276 tests
March 2026Ten more algorithms (20 modules), 429 tests
Q2 2026Node 22+, MCP server and AI SDK middleware on npm
August 2026Forgetting by id (also over MCP), PostgreSQL with pgvector in CI, README separates the system from the algorithm library
October 2026Forgetting follows consolidation, one score from 0 to 1 in every layer, ai-sdk injects only memories scoring above 0
October 2026 · patch v0.6.1 on 31 OctoberAPI stability (Semver 1.0). Tagged once two consecutive minor releases have shipped without a breaking change to the public API of @zensation/algorithms and @zensation/core.
No calendar date.Frequently asked questions.
What's the difference between ZenBrain and Eigenraum?
ZenBrain is the extracted, open-source core of the memory algorithms. Eigenraum by ZenSation is our AI workspace built on it, the extended version of our first product, ZenAI. Want to build your own system → ZenBrain.
Do I need a database?
No database server. @zensation/algorithms is zero-dependency and runs completely in-memory. For persistence, both adapters are published on npm: adapter-sqlite (zero-config, also runs fully in memory) and adapter-postgres (pgvector). MemoryCoordinator requires a storage adapter — adapter-sqlite is the smallest one.
Which LLMs are supported?
ZenBrain is LLM-agnostic and also runs without an embedding provider, using lexical ranking. Embeddings can come from OpenAI, Mistral, Ollama or your own model.
Is ZenBrain production-ready?
The algorithms come from ZenAI (440K+ LOC, over 12,000 tests as of August 2026), where they ran in production. The extracted packages have 948 tests of their own (as of v0.6.1). API stability (Semver 1.0) is planned. The packages are pre-1.0 and the public API can still change; v1.0.0 will be tagged once two consecutive minor releases have shipped without a breaking change. We do not promise a calendar date.
How is ZenBrain different from Mem0?
Mem0 describes itself as a memory layer for AI assistants and agents, self-hosted or as a cloud service. ZenBrain separates seven layers and ships FSRS-style scheduling, Hebbian learning, sleep replay and uncertainty bands as functions you import one by one, self-hosted and TypeScript-native; no third-party dependencies in algorithms and core. The detailed comparison is on “ZenBrain vs Mem0”.
Can I use @zensation/algorithms without core?
Yes. The algorithms package is completely standalone with zero dependencies. You can import individual algorithms and integrate them into existing systems without using the MemoryCoordinator.