Home / Use cases / Causal lineage for every decision
Use case

Causal lineage for every decision

MADB doesn’t just store what happened — it stores what caused it, as a graph you can walk.

Causal memory for AI agents means every event can carry caused_by links. Together they form a directed graph; walking it backward reconstructs the chain of reasoning that led to any action.

Trace any action

Call trace_cause on a decision and MADB returns the lineage back to its root cause — the literal answer to "why did the agent do this?"

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

Why it matters

  • Debug agents by replaying their actual reasoning
  • Build audit trails that aren’t reconstructed after the fact
  • Ground decisions in stored context instead of hallucinated history
Keep reading