the-brain
Open memory platform for AI — 3-layer cognitive architecture
🧠 the-brain
An open memory platform for AI — in the making. 3-layer cognitive architecture with an extension-first philosophy. Runs locally, costs nothing, and lets you swap any component.
🧪 Experimental — pre-alpha. Far from stable. This repository is for experimental purposes only. Do not use in production. the-brain explores what persistent, private, 3-layer AI memory looks like. Breaking changes, missing features, and rough edges are the norm. If you're curious about the concept, contribute on GitHub or build an extension.
Why the-brain?
AI forgets everything between sessions. the-brain remembers — across any AI tool you use. It harvests your conversations, filters noise from signal, and consolidates what matters. No cloud. No telemetry. Just a background daemon learning your patterns.
Quick Links
| 🚀 Installation | Install in 60 seconds on macOS or Linux |
| ⚡ Quickstart | Your first brain in 5 minutes |
| ⚙️ Configuration | Config file reference |
| 🏗️ Architecture | 3-layer cognitive architecture |
| 🧩 Writing Plugins | Extend the-brain with custom plugins |
| 💻 CLI Reference | Complete command reference |
| 🌐 MCP Server | Use with Claude Desktop, Cursor, Zed |
| 📡 Remote Mode | Run on a Linux server, connect from macOS |
Architecture at a Glance
Your AI tools feed into three plugin slots:
Any AI tool → ⚡ INSTANT slot — what happens now (default: graph-memory)
→ ⚖️ SELECTION slot — what's worth keeping (default: spm-curator)
→ 🌌 DEEP slot — permanent consolidation (default: mlx-lora + auto-wiki)Each slot is replaceable. Add extension names to config.json ("extensions": ["my-ext"]) and daemon loads them on start. Extensions are disabled by default for security — you must explicitly enable each one.
What the-brain Learns
- Corrections — "No, actually use
useCallbackhere" → remembers for next time - Preferences — "I prefer arrow functions" → injected into every context
- Patterns — Repeated choices across sessions → auto-suggests related concepts
- Identity — Your stable preferences and style, maintained across retrains
Documentation Sections
| Section | Description |
|---|---|
| Start Here | Installation, quickstart, configuration |
| Core Concepts | Architecture, hook system, memory layers |
| Customization | Plugins, harvesters, training, extensions |
| Reference | CLI, config schema, MCP tools, env vars |
| Integrations | MCP server, remote mode, AI tools, team mode, menu bar |
| Development | Contributing, project structure, testing |
Tech Stack
| Component | Technology |
|---|---|
| Runtime | Bun + TypeScript |
| Database | bun:sqlite + Drizzle ORM |
| Plugins | hookable event system |
| Training | Apple MLX (Python sidecar) |
| Docs | Next.js + Fumadocs |
License
MIT © 2026 Oskar Schachta