Apache 2.0TypeScriptZero Dependencies

Neuroscience Memory
for AI Agents.

The cognitive core extracted from ZenAI — tested, proven, open source. 12 algorithms that teach your AI to remember, forget, and sleep.

Hebbian LearningFSRS Spaced RepetitionSleep ConsolidationBayesian ConfidenceEbbinghaus DecayEmotional Tagging7-Layer MemoryMemoryCoordinatorCross-Context
276Tests
12Algorithms
0Dependencies
The Story

Extracted from 258,000 lines of production code.

ZenBrain is not an experiment. It's the core of ZenAI — an AI operating system with 9,228 tests and 6 cognitive pillars. We extracted the memory algorithms so you can use them.

ZenAI258K LOC9,228 TestsProduction AI OS
Extraction12 Algorithms7 LayersNeuroscience Core
ZenBrainnpm Packages276 TestsOpen Source Apache 2.0
Algorithms

12 Algorithms. Peer-reviewed Neuroscience.

Every algorithm is based on published research. No marketing buzzwords — real science.

Hebbian Learning

Strengthen connections through co-activation

Hebb 1949

FSRS Spaced Repetition

Optimal review scheduling

Wozniak 2022

Sleep Consolidation

Memory replay during sleep — like the brain

Stickgold & Walker 2013

Ebbinghaus Decay

Forgetting curve with adaptive intervals

Ebbinghaus 1885

Bayesian Confidence

Belief updates with prior + evidence

Bayes 1763

Emotional Tagging

Emotional markers for better recall

Damasio 1994

Activation Spreading

Associative network activation

Collins & Loftus 1975

Temporal Context

Time-based memory encoding

Howard & Kahana 2002

Memory Consolidation

STM→LTM transfer with importance scoring

McClelland et al. 1995

Confidence Intervals

95% CI for all probabilistic outputs

Wilson 1927

Cross-Context Transfer

Share knowledge across contexts

Tulving 1972

Retention Visualization

Export Ebbinghaus curves as data points

Ebbinghaus 1885
Orchestration

One Coordinator. 7 Memory Layers.

The MemoryCoordinator orchestrates all layers — from Working Memory to Sleep Consolidation. One call. The system decides.

Auto-Routingstore() auto-detects the correct layer
Cross-Layer RecallOne query, all layers simultaneously
ConsolidationSTM→LTM transfer with importance scoring
Decay ManagementEbbinghaus + FSRS automatically
Review QueueFSRS-based review scheduling
import { MemoryCoordinator }
  from '@zensation/core';

const memory =
  new MemoryCoordinator();

// Store — auto-routes
await memory.store(
  'TypeScript has generics',
  { context: 'learning' }
);

// Recall — cross-layer
const results =
  await memory.recall(
    'What do I know about TypeScript?'
  );

// Sleep — consolidate
await memory.consolidate();
Working
Episodic
Short-Term
Semantic
Procedural
Cross-Context
Long-Term
Quick Start

First memory in 30 seconds.

No setup. No config. No account.

Install
npm install @zensation/algorithms
npm install @zensation/core
Write code
import { MemoryCoordinator } from '@zensation/core';
import { HebbianLearning, FSRS } from '@zensation/algorithms';

const memory = new MemoryCoordinator({
  algorithms: [HebbianLearning, FSRS]
});

await memory.store('Project deadline is Friday',
  { context: 'work' });

const recall = await memory.recall(
  'When is the deadline?'
);
console.log(recall);
Result
{
  "content": "Project deadline is Friday",
  "confidence": 0.94,
  "layer": "short-term",
  "decay": 0.87,
  "nextReview": "2026-03-28T09:00:00Z"
}
Comparison

What other memory systems don't have.

Four competitors. All solve parts of the problem. None has Sleep Consolidation, 7 layers, or Confidence Intervals.

Feature Comparison at a Glance

Memory LayersSleep ConsolidationSpaced RepetitionGraph LearningSelf-HostedTypeScript
ZenBrain
Mem0
Letta
ZenBrainMem0LettaZepLangMem
Memory Layers71221
Sleep Consolidation
FSRS Spaced Rep.
Hebbian Learning
Confidence Intervals
Emotional Tagging
Cross-Context
Ebbinghaus Decay
Self-hosted
Zero Dependencies
TypeScript-nativePythonPythonPythonPython
Peer-reviewed Basis
Algorithms121321
Tests276????

As of March 2026. Based on public documentation.

Architecture

Two Packages. One System.

@zensation/algorithms is the pure core — zero dependencies. @zensation/core orchestrates everything with the MemoryCoordinator.

Your Application
uses
@zensation/core
MemoryCoordinatorstore() · recall() · consolidate() · decay()
Working
Episodic
Semantic
Procedural
npm i @zensation/core
uses
@zensation/algorithms
0 deps
Hebbian
FSRS
Sleep
Ebbinghaus
Bayesian
npm i @zensation/algorithms
optional
adapter-postgres+ pgvectornpm i @zensation/adapter-postgres
adapter-sqlitezero-confignpm i @zensation/adapter-sqlite
Community

Open source means: build together.

Apache 2.0. Contributions welcome. No CLA required.

What's next.

v0.2.0current

MemoryCoordinator, Sleep Consolidation, 276 tests

March 2026
v0.3.0

@zensation/mcp-server — IDE integration (Cursor, VS Code, Claude)

May 2026
v0.4.0

LOCOMO benchmark vs. Mem0/Zep/LangMem

June 2026
v1.0.0

API stability, ZenBrain Cloud MVP

Q3 2026
FAQ

Frequently asked questions.

What's the difference between ZenBrain and ZenAI?

ZenBrain is the extracted, open-source core of the memory algorithms. ZenAI is the complete AI operating system built on ZenBrain. Want to build your own system → ZenBrain. Want the finished product → ZenAI.

Do I need a database?

No. @zensation/algorithms is zero-dependency and runs completely in-memory. For persistence, optional adapters are available: adapter-postgres (pgvector) and adapter-sqlite (zero-config).

Which LLMs are supported?

ZenBrain is LLM-agnostic. The algorithms work on embeddings — whether from OpenAI, Anthropic, Mistral, Ollama, or your own model.

Is ZenBrain production-ready?

The algorithms come from ZenAI (258K LOC, 9,228 tests, months in production). The extracted package has 276 of its own tests. API stability (Semver 1.0) is planned for Q3 2026.

How is ZenBrain different from Mem0?

Mem0 has 1 memory layer and focuses on cloud API. ZenBrain has 7 layers, Sleep Consolidation, FSRS, Hebbian Learning, Confidence Intervals — all self-hosted, zero dependencies, TypeScript-native.

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.

Ready for AI
that remembers?

12 algorithms. 276 tests. Zero dependencies. Apache 2.0 — forever.

v0.2.0TypeScriptApache 2.0