Agents remember decisions, conventions and preferences across sessions. Memories are Markdown files in ~/.brain/, shared by every agent you use.
The agent saves decisions, conventions and preferences as Markdown files.
At session start and on request, the most relevant memories are loaded into context.
Memories fade unless used. Recall strengthens them. A sleep cycle consolidates and prunes.
| Storage | One Markdown file per memory in ~/.brain/, with YAML frontmatter. No database. |
| Recall | Keyword relevance, strength after decay, links between memories and project context. No model calls; the same ranking in every agent. |
| Memory types | Eight types, from decision to observation, each with its own strength and decay rate. |
| Time | A newer fact can supersede an older one. Past states stay queryable by date. |
| Skills | Procedures stored as SKILL.md files and loaded only when a task needs them. |
| Safety | Every memory records its origin. Content from tools or the web waits for your approval before recall. |
| Sync | Git remote, encrypted export, any synced folder via BRAIN_DIR, or Brain Cloud. |
| Requirements | Node.js 18 or later. No runtime dependencies. |
| License | MIT |
Claude Sonnet 5.5, 10 runs per arm, graded by a three-judge panel from other model families. Wins, ties and nulls are all published. Results → Methodology →
Judge agreement with human grading has not been measured yet. Raw data: JSON.
| Mechanism | In Brain Memory |
|---|---|
| Ebbinghaus decay | Strength falls exponentially, at a rate set by memory type. |
| Spacing effect | Longer gaps between recalls give larger, longer-lasting boosts. |
| Spreading activation | Recalling a memory also surfaces its linked memories. |
| Hebbian learning | Memories recalled together become more strongly linked. |
| Context-dependent recall | Memories from the current project rank higher. |
| Synaptic homeostasis | Sleep scales all strengths down to prevent inflation. |
Add the hosted MCP connector to any agent below. Sign-in is OAuth.
The npm plugin writes to ~/.brain/ on your machine. No account needed.
* Experimental.
Then run brain --claude, --codex, --opencode or --all. For the Claude and ChatGPT apps, add the MCP connector.
| What is Brain Memory? | Long-term memory for AI agents. Agents store decisions, conventions and preferences as Markdown files and recall them in later sessions. |
| Which agents does it work with? | Through the hosted MCP connector: Claude Code, Codex CLI, OpenCode, Copilot CLI, Kilo, Antigravity, the Claude apps and ChatGPT. The local plugin supports the same CLIs. OpenClaw and Hermes use it as their memory engine. |
| Where are memories stored? | In ~/.brain/ on your machine, one Markdown file per memory. There is no database. Set BRAIN_DIR to keep the folder elsewhere. |
| How is it different from a vector database? | Recall is computed from the files, without embeddings or model calls: keyword relevance, strength after decay, links between memories and the current project. Every agent gets the same ranking. |
| Is it free? | Yes. The plugin is MIT-licensed and published on npm as brain-memory. Brain Cloud sync is optional. |