Brain-inspired memory architecture. Connect AI agents to lifelike memory shaped by the concepts of time and dreams, building natural long-term recall.
Today’s LLMs lose context with every conversation reset, forcing users to repeat themselves endlessly. Cerememory is an LLM-agnostic memory database built on five specialized memory stores grounded in neuroscience research. Memories are not merely stored – they decay over time, reactivate when related memories fire, and have their retention rates modulated by emotional intensity. Every record carries a structured meta-memory plane that records why it exists – intent, rationale, evidence, alternatives, and a typed context graph. This is not a database. It is a living memory system. With a user-sovereign, local-first design, full ownership of memory data is guaranteed to the user.
Every LLM today suffers from a fundamental flaw. Each time a conversation resets, the context window flushes, and users are forced to re-explain themselves from scratch. Existing memory solutions are shallow, text-only, model-specific, and vendor-controlled.
Cerememory addresses this with three principles. Memory must be alive – not frozen at write-time, but evolving over time. It must be LLM-agnostic – a standardized protocol (CMP) allows any LLM to read and write to the memory layer. And it must be user-sovereign – local-first and fully exportable by design.
Just as the human brain processes different types of memory in distinct regions, Cerememory distributes memories across five specialized stores.
| Store | Brain Analog | Function |
|---|---|---|
| Episodic | Hippocampus | Temporal event logs. Records what happened, when, and where. Persistent via redb. |
| Semantic | Neocortex | Graph of facts, concepts, and relationships. Stores what things mean. Typed-edge graph structure. |
| Procedural | Basal Ganglia | Behavioral patterns, preferences, and skills. Learns how things are done. |
| Emotional | Amygdala | Cross-cutting affective metadata. Modulates decay rates and retrieval priority across all stores. |
| Working | Prefrontal Cortex | Volatile, capacity-limited, high-speed active context cache. LRU-evicted, in-memory. |
Supporting engines run alongside the engine and operate on every store.
In a traditional database, data is static. In Cerememory, memories breathe, decay, and reactivate.
Memory fidelity decreases over time following a modified power-law curve. This is not "forget everything" – it is gradual, realistic degradation. Emotional intensity modulates decay rates, and repeated access increases stability.
Similar memories blur each other’s details over time. This reproduces the interference phenomenon observed in human memory research.
An 8-dimensional emotion vector is attached to every memory, influencing decay rates, retrieval priority, and association strength. Emotionally intense memories are retained longer.
During sleep, the brain replays the day and consolidates ephemeral experience into lasting knowledge. Cerememory mirrors that pipeline. The raw journal preserves verbatim conversation, tool I/O, and scratchpad content. The dream_tick lifecycle groups those raw entries by topic (time gaps and lexical shift), summarizes each group into episodic memory, and conditionally promotes factual content to the semantic store — always with backlinks to the verbatim source.
CMP is the single, transport-agnostic protocol spoken by Cerememory. HTTP, gRPC, and MCP are three transport bindings that carry the same CMP messages – not competing APIs. HTTP and gRPC expose the full protocol surface; MCP is a curated 15-tool binding tailored for LLM agents.
Build one binary from source, start the shared HTTP server, then point every MCP client at it.
# Build the binary from source git clone https://github.com/co-r-e/cerememory.git cd cerememory cargo build -p cerememory-cli --release # Start the one long-lived server that owns the data directory target/release/cerememory serve --data-dir ~/.cerememory/data # Point every MCP client (Claude Code, Codex CLI, Cursor, ...) at that shared server target/release/cerememory mcp --server-url http://127.0.0.1:8420
# ~/.codex/config.toml — point every MCP client at one shared server [mcp_servers.cerememory] command = "/absolute/path/to/target/release/cerememory" args = ["mcp", "--server-url", "http://127.0.0.1:8420"] # Claude Code uses the same shape in ~/.claude/claude_desktop_config.json # { # "mcpServers": { # "cerememory": { # "command": "/absolute/path/to/target/release/cerememory", # "args": ["mcp", "--server-url", "http://127.0.0.1:8420"] # } # } # }
cerememory mcp --server-url proxies to the shared HTTP server. Works with Claude Code, Codex CLI, Cursor, Cline, Windsurf, Zed, Continue, and any other MCP-compatible client.Cerememory’s core engine is implemented in Rust – the only choice that delivers memory safety, zero-cost concurrency, and predictable performance. Tokio handles async I/O while Rayon powers CPU-intensive operations like decay computation and spreading activation, with thread pools optimally separated by workload characteristics.
Memory is the foundation of identity. A system that stores, evolves, and retrieves the accumulated context of a person’s interaction with AI is too important to be controlled by any single entity.
– Cerememory WhitepaperCerememory is open source. Get started now and give your AI systems persistent, evolving memory.