causal-memory
Active·★ 99·Apache-2.0·Updated 2026-10-16
Causal-memory is an agent memory system with a causal core, uniquely modeling both excitatory and inhibitory connections for robust long-term retention. It enables agents to understand not just what happened, but why it worked or failed, and anticipate outcomes, thereby preventing repeated mistakes.
#Agent Memory#Causal Reasoning#Long-term Memory#Knowledge Graph#LLM Agent#Spreading Activation#Cognitive Architecture#Decision Making
01
Features
01Causal Core with Excitatory and Inhibitory Connections: Models 'caused', 'enabled', and 'prevented' relationships using typed causal semantics and negative activation spread (GABA analogue).
02Immutable Consolidation & Q-value Dynamics: Employs hippocampus-style SWR (Sleep-Wake Replay) consolidation with LTP/LTD/GC, Q-value dynamics, and novelty-entropy triggers for robust memory evolution.
03Intervention & Counterfactual Query: Enables forward simulation to predict outcomes before action and contrastive analysis to compare outcomes of different alternatives.
04Compaction Survival: Stores causal information in an external SQLite database, making it immune to context window compaction and preserving critical 'why' knowledge.
05Unified Memory Graph: Integrates facts, temporal state, and decision-outcome causal edges into a single graph, accessible via RRF-fused retrieval (BM25 + semantic).
02
Compatibility
Rust
Language
Verified via docs
Python
Bindings
Verified via docs
SQLite
Database
Verified via docs
MCP (Multi-Agent)
Integration
Verified via docs
Hermes
Plugin
Verified via docs
DeepSeek Harness
Plugin
Verified via docs
03
Quick start
1
$ git clone https://github.com/JingxuanC/causal-memory.git
2
$ cd causal-memory
3
$ cargo build --release
04
Use cases
↳Preventing Repeated Mistakes: Agents can recall past `decision → outcome` causal edges, avoiding re-fixing the same bug or repeating past failed architectural choices.
↳Proactive Warning and Intervention: Before committing risky actions (e.g., `git push --no-verify`), the system can fire DANGER warnings based on recorded past negative outcomes.
↳Root Cause Analysis: Trace multi-hop backward causal chains to identify the ultimate root cause of failures or unexpected outcomes.
↳Informed Decision Making: Agents can perform counterfactual comparisons between alternative actions, leveraging known outcomes to choose the best path.
↳Cross-Task Lesson Transfer: Discover and apply meta-edges (e.g., `similar_to`, `repeated`) to transfer lessons and patterns across different tasks or sessions.
05
Alternatives
telemem★ 494
TeleMem is a high-performance drop-in replacement for Mem0, featuring semantic deduplication, long-term dialogue memory, and multimodal video reasoning.
dense-mem★ 39
Self-hosted AI agent memory server with MCP, evidence provenance, typed claims, conflict detection, embeddings, recall, PostgreSQL, and Neo4j.
sqlite-memory-mcp★ 18
SQLite-backed MCP Memory Server with WAL concurrent safety, FTS5 search, session tracking, task management, and cross-machine bridge sync
iai-personal-memory-engine★ 911
Independent Autistic Intelligence — a cyber brain for your AI. It never forgets a detail, remembers exactly what you said, and learns how you work over time. Free, local, works with Cursor, Claude Code, Codex, OpenClaw, Hermes and more. MIT.
Comments
Log in to leave a comment
No comments yet. Be the first!