Apache-2.0 · Rust + SQLite · MCP
Agent memory with a causal core.
The only one that models inhibition.
Facts, temporal state, and decision → outcome causal edges on one SQLite store. Agents recall what happened, when it was true, why it worked — and what would happen if they acted differently.
30s demo — the agent is about to `git push --no-verify`; intervention_query fires a DANGER chain
Memory that compaction cannot touch
Causal information is the most fragile type under text compaction. In a real-LLM benchmark with a production compaction prompt, textual recall collapses — while the causal table, living outside the context window, never degrades.
| Compactions (k) | Textual recall | Causal-table recall |
|---|---|---|
| 1 | 100% | 100% |
| 2 | 85% | 100% |
| 3 | 55% | 100% |
| 5 | 45% | 100% |
What makes it different
Capabilities no fact store can offer — verified by 322 workspace tests.
| Capability | causal-memory | mem0 | Zep | Letta |
|---|---|---|---|---|
| Typed causal semantics (caused/enabled/prevented) | ✅ | ❌ | ❌ | ❌ |
| prevented negative spread (inhibitory) | ✅ | ❌ | ❌ | ❌ |
| Forward simulation (intervention_query) | ✅ | ❌ | ❌ | ❌ |
| SWR offline consolidation (LTP/LTD/GC) | ✅ | ❌ | ❌ | ❌ |
| Q-value dynamic utility | ✅ | ❌ | ❌ | ❌ |
| Immutable consolidation (delta + clone) | ✅ | ❌ | ❌ | ❌ |
| Meta-edge cross-session pattern mining | ✅ | ❌ | ❌ | ❌ |
| Compaction survival evidence | ✅ | ❌ | ❌ | ❌ |
| One graph unifying all memory types | ✅ | ❌ | ✅ | ❌ |
| Local ONNX embedding (offline) | ✅ | ✅ | ❌ | ❌ |
Measured on what matters
CausalEval — the graph-grounded causal memory benchmark. The causal graph is the answer key.
| Capability | causal-memory | mem0 | What it tests |
|---|---|---|---|
| C7 Update | 100% | 80% | Supersede old belief after falsification |
| C3 Counterfactual | 95% | 80% | Choosing between alternatives with known outcomes |
| C2 Intervention | 75% | 40% | Forward prediction: "if X again, what happens?" |
| C4 Inhibition | 80% | 50% | Root-cause fix vs blast-radius limiter |
| C1 Attribution | 85% | 90% | Backward causal chain → root cause |
| C5 Temporal-causal | 90% | 90% | Ordering on a causal chain |
| Overall | 78% | 65% | CausalEval v13 · 140 questions, 20 graphs |
Three steps to memory that survives
step 1
Install
pip install causal-memory
or cargo build --release from source
step 2
Wire MCP
{ "mcpServers": { "causal-memory":
{ "command": "causal-memory" } } }Claude Code, Cursor, Kimi Code CLI, …
step 3
Add the skill
npx skills add JingxuanC/causal-memory@causal-memory
teaches the agent when to remember