From agentdb-causal
Walk the causal graph in AgentDB to explain why two memories are connected, or trace a root cause. Use when the user asks "why did X happen", "what led to Y", or after an incident.
npx claudepluginhub ruvnet/agentdb --plugin agentdb-causalThis skill uses the workspace's default tool permissions.
Given a target memory (an episode, a failed test, an outgoing change), traverse the causal graph backwards through edges to surface the chain of preceding events that explain it.
Record a causal relationship between two memories in AgentDB — "X caused Y", "A supersedes B", "patch-foo depends-on patch-bar". Use when the user is documenting cause/effect, dependencies, supersessions, or after-action analysis.
K-hop traversal from a starting node in AgentDB's graph. Use to explore neighborhoods, find reachable nodes, or visualize a memory's "context".
Implements unified four-tier memory system for AI agents: Tier 1 semantic search (Serena+Forgetful), Tier 2 episodic session replay, Tier 3 causal graphs. Use for memory-first checks before code changes.
Share bugs, ideas, or general feedback.
Given a target memory (an episode, a failed test, an outgoing change), traverse the causal graph backwards through edges to surface the chain of preceding events that explain it.
agentdb_causal_explain(
targetMemoryId: <id>
maxDepth?: 3
minConfidence?: 0.5
edgeWeights?: 'uplift' | 'confidence' | 'product' // ranking strategy
)
Returns a path or DAG of (node, edge, node) tuples ranked by combined confidence × |uplift|. Each step carries the relation (caused, supersedes, depends-on, etc.) so the explanation reads naturally.
Why did "deploy-2026-05-04 failed migration" happen?
┌─ skill[migrate-add-not-null-column] confidence 0.92
│ ─[supersedes]→ skill[v1: migrate-with-default]
│ ─[caused]→ episode[long-running migration on 50M rows]
│ ─[caused]→ episode[deploy-2026-05-04 failed migration]
│
└─ adr[ADR-046: zero-downtime migration policy] confidence 0.78
─[depends-on]→ skill[migrate-add-not-null-column]
For complex traces, dispatch the agentdb-investigator agent (this plugin) — it walks deeper, cross-references with hierarchical memory, and writes a postmortem-shaped report.
maxDepth > 5 casually — graph fan-out gets exponential and the bandit's confidence weights don't compensate.confidence column. A high-uplift edge with confidence 0.3 is gossip, not evidence.