Home / Blog / What is causal memory for AI agents?
2026-06-30

What is causal memory for AI agents?

Most "agent memory" today is similarity search: embed everything an agent sees, then fetch the nearest vectors to a query. That’s useful, but it answers only one question — "what looks like this?" It can’t answer the one that matters when an agent acts on its own: "why did it do that?"

Causal memory stores the why

Causal memory records not just what happened but what caused it. In MADB, every memory event can carry caused_by links to the events that led to it. Those links form a directed graph — a lineage — over the agent’s history.

Walking the graph

Because the causes are stored explicitly, you can walk them. trace_cause takes a decision and returns the chain back to its root:

trace_cause("refund_4471", direction="backward")
# refund_4471 ← policy_under_5k ← fraud_score_0.04 ← duplicate_charge ← dispute_4471

Why similarity isn’t enough

Similarity can surface a related memory, but it can’t prove a path of reasoning. For debugging, review, and audit trails, you need the actual causal chain — captured as the agent works, not reconstructed afterward. That’s what makes agents explainable.

MADB also folds causality into recall itself: results are scored on similarity, recency, causal proximity, importance, and tag overlap, so causally-relevant memories surface even when the wording differs.

Try MADB

Local causal memory for your agents, free in one command.

Install free
Keep reading