ZenBrain: A Neuroscience-Inspired 7-Layer Memory Architecture for Autonomous AI Systems
Head-to-head: On LongMemEval-500, ZenBrain wins all nine answer-quality comparisons against Letta, Mem0 and A-Mem (3 competitors x 3 LLM judges) under Bonferroni-corrected significance, and reaches 91.3% of a full-context oracle's binary-judge accuracy at 1/106 of the per-query token cost.
Built by: Alexander Bering β Division Manager in a mid-sized company and Principal Investigator. What is researched here has to survive a Monday morning, not just a review.
β If this is useful, a star on GitHub helps other agent developers find it.
Overview
ZenBrain is a 7-layer neuroscience-inspired memory architecture for autonomous AI systems. It bridges the gap between biological memory principles and practical AI system design, evaluated on long-context recall, memory stability, and knowledge retrieval tasks across ten experiments and a 15-algorithm ablation study (results below).
Paper: ZenBrain v8 (Zenodo) | DOI: 10.5281/zenodo.19353663 (concept DOI β always resolves to the latest version)
Status: arXiv preprint (April 2026). Independent replications, counter-results, and reviewer feedback welcome β contact: research@zensation.ai
Key Results (9 Experiments)
| Experiment | Metric | Result |
|---|---|---|
| Exp 1 β LoCoMo Retrieval | F1 score | +20.7% vs. Flat Store |
| Exp 2 β Layer Ablation | Storage efficiency | +47.4% vs. single-layer |
| Exp 3 β Retention Curves | Retention@30d | 89.9% (vs. 0% pure Ebbinghaus) |
| Exp 4 β Sleep Consolidation | Memory stability | +37.0% vs. no-sleep baseline |
| Exp 5 β Hebbian Retrieval | Precision@5 | 0.955 |
| Exp 6 β Bayesian Confidence | Confidence AUC | 0.797 (+49.5% vs. 0.533) |
| Exp 8 β Moderate Ablation | 15-algorithm suite | Cooperative redundancy (no single removal matters) |
| Exp 9 β Challenging Ablation | 15-algorithm suite | 7 of 15 algorithms individually significant |
| Exp 10 β Stress Ablation | 15-algorithm suite | 9 of 15 algorithms individually critical |
The full 15-algorithm ablation reveals a cooperative survival network with a measurable gradient across three difficulty levels. Sleep consolidation acts as a 1.92x multiplier. 95 reproducible tests across 4 experiment suites, all with Mulberry32 seeded PRNG (10 seeds).
Architecture: 7 Memory Layers
Layer 1: Working Memory β Active task focus (capacity-limited, 7Β±2 items)
Layer 2: Episodic Memory β Concrete experiences with temporal context
Layer 3: Semantic Memory β Abstracted facts and relationships
Layer 4: Procedural Memory β Skills and how-to knowledge
Layer 5: Short-Term Memory β Session context buffer
Layer 6: Long-Term Memory β Persistent cross-session knowledge
Layer 7: Core Memory β Pinned identity and values (Letta-pattern)
Key algorithms:
- Hebbian Learning (co-activation strengthening, decay, normalization)
- FSRS Spaced Repetition (optimal review scheduling)
- Bayesian Confidence Propagation (uncertainty quantification)
- Sleep Consolidation (Stickgold & Walker 2013 β memory replay simulation)
- Ebbinghaus Decay (forgetting curve modeling)
- Contextual Retrieval (Anthropic method: reduced retrieval failure rate by 67% with reranking, 49% without)
Installation
# Core algorithms (zero dependencies)
npm install @zensation/algorithms
# Memory layer orchestration
npm install @zensation/core
# PostgreSQL + pgvector adapter
npm install @zensation/adapter-postgres
# SQLite adapter (zero-config)
npm install @zensation/adapter-sqlite
Quick Start
import { MemoryCoordinator } from '@zensation/core';
import { PostgresAdapter } from '@zensation/adapter-postgres';
const memory = new MemoryCoordinator({
adapter: new PostgresAdapter({ connectionString: process.env.DATABASE_URL }),
});
// Store a memory across all relevant layers
await memory.store({
content: 'ZenBrain uses Hebbian learning for knowledge graph strengthening',
type: 'semantic',
importance: 0.9,
});
// Recall with confidence scores
const results = await memory.recall('Hebbian learning', { topK: 5 });
// Returns facts with 95% confidence intervals
Links
- Paper (v8, 9 Aug 2026): https://zenodo.org/records/21858218
- PDF: https://zenodo.org/records/21858218/files/zenbrain-v8.pdf
- GitHub: https://github.com/zensation-ai/zenbrain
- Website: https://zensation.ai/technologie
- Live demo (HF Space): https://huggingface.co/spaces/zensation-ai/zenbrain-playground β runs the real open library in your browser
- npm packages (7):
@zensation/algorithmsΒ·@zensation/coreΒ·@zensation/adapter-postgresΒ·@zensation/adapter-sqliteΒ·@zensation/mcpΒ·@zensation/ai-sdkΒ·@zensation/cli - Reproduction packages: Mechanism ablation, Tables 7-9 (Apache-2.0) Β· Measurement package: judged outputs, flag manifests, analysis scripts (CC BY 4.0)
- ORCID: https://orcid.org/0009-0001-1793-012X
Citation
@misc{bering2026zenbrain,
title = {ZenBrain: A Neuroscience-Inspired 7-Layer Memory Architecture for Autonomous AI Systems},
author = {Bering, Alexander},
year = {2026},
doi = {10.5281/zenodo.19353663},
url = {https://doi.org/10.5281/zenodo.19353663},
note = {Zenodo Preprint}
}
@article{bering2026zenbrainarxiv,
title = {ZenBrain: A Neuroscience-Inspired 7-Layer Memory Architecture for Autonomous AI Systems},
author = {Bering, Alexander},
year = {2026},
eprint = {2604.23878},
archivePrefix = {arXiv},
primaryClass = {cs.AI},
url = {https://arxiv.org/abs/2604.23878}
}
License
Code (the @zensation/* npm packages and the GitHub repository) β Apache-2.0, see LICENSE.
Paper and preprint records (zenbrain-v8.pdf, the arXiv preprint, the Zenodo preprint records) β CC BY 4.0. Reproduction packages carry their own licence, stated on each record (CC BY 4.0 or Apache-2.0).