causal-memory
Causal memory layer for AI agents — MCP server that records decision→outcome relationships. Survives compaction.
一句话定位
Causal memory layer for AI agents — MCP server that records decision→outcome relationships. Survives compaction.
安装方式
在 DSH 的 web profile 中执行下面的命令;装完刷新页面即可。
$ dsh plugin --profile web add 'git+https://github.com/JingxuanC/causal-memory.git#b05d671fc45d1f73c99c36a58f05c0bdd673cb88'
兼容的 DSH 版本
未声明
作者与热度
JingxuanC · ★ 106 · 更新于 2026-11-04
关于这个插件
causal-memory An agent memory system with a causal core — and the only one that models inhibition. Facts, temporal state, and decision → outcome causal edges on one SQLite store, powered by a hippocampus-style engine: typed spreading activation (excitatory *and* inhibitory), Hebbian co-occurrence reinforcement, Q-value dynamics, and immutable SWR consolidation. Agents recall *what* happened, *when* it was true, *why* it worked — and *what would happen if* they acted differently.
English · 简体中文 Why
Every agent forgets *why* it made past decisions after a few context compactions. It re-fixes the same bug the same wrong way, re-debates the same architecture choice, relearns the same lesson.
This happens because causal information is the most fragile type under text compaction. Real-LLM benchmark (grok-build's production compaction prompt): The causal table survives because it lives outside the agent's context window — compaction cannot touch it. Demo
30-second single scene — the agent is about to git push --no-verify; intervention_query fires a DANGER chain citing the lesson it recorded last time ("production login failed for 40 minutes; emergency rollback"):
Download video · DANGER-scene screenshot · Regenerate: scripts/capture_demo30.py → scripts/render_demo30.py
A 21-second hands-on demo (real memory store, no mocks): pre-action warning (intervention_query → DANGER chain) → experience recall (search_causal) → counterfactual comparison (counterfactual_query) → write loop (record_decision → immediately searchable).
Download video · Warning-scene screenshot · Brand card · Regenerate: scripts/render_demo.py Benchmarks CausalEval — the causal memory benchmark (primary)
Most agent-memory benchmarks (LoCoMo, LongMemEval, Memora) test fact recall ("what is the user's preference"). causal-memory's differentiators — typed causal edges, inhibition, intervention prediction, cross-task transfer — are invisible on those suites. CausalEval measures them.
Design: the causal graph is the answer key. Typed DAGs are generated deterministically; conversations are narrated from the graph; gold answers are derived from graph structure — zero hand annotation, zero ambiguity.
CausalEval v13 (soft supersession) — 140 questions, 20 graphs (same LLM, same judge; v12 baseline was 70q/10 graphs; mem0 comparison ran on the 70q protocol): Key result: C7 update 50% → 100% (+50pp, 20/20 questions) and it holds at doubled sample size. Soft supersession annotates superseded edges (superseded_by) instead of hiding them — the falsification signal reaches the answer model while the old lesson stays retrievable for counterfactuals (C3 unharmed at 95%). The C6 gap (20% vs mem0 30%) is the remaining open limitation; C1/C4/C5 dips vs v12 are within re-distillation variance and new-graph difficulty (v12 and v13 do not share a distilled corpus). Fact-recall benchmarks (not our strong suit)
相似插件
EverOS
One portable memory layer for every AI agent: local-first, Markdown-native, user-owned, and self-evolving across apps, t…
billion-context
A context-compression plugin — small context windows (a 100K context is enough), 5x fewer tokens, month-long single sess…
dsh-context
A DeepSeek Harness plugin for context insight and management, with context dashboard and context command, for understand…