en un clic
agentdb-causal-explain
// 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.
// 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.
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.
Store memories in tier-aware hierarchical memory — working / short-term / long-term — and recall with tier filters. Use for working-set context that should fade, vs facts that should persist, vs patterns that should be searchable forever.
Initialize an AgentDB Cognitive Container (.rvf file) in the current project. Sets up storage, embedder config, and the agentdb MCP server. Use when the user is starting a new project that needs vector memory, or asks to "set up agentdb" / "init agentdb".
Show AgentDB health — pattern count, embedder status, cache hit rate, learning gain since init. Use when the user asks "is agentdb working?", "how many memories?", "show agentdb stats", or after long-running sessions to confirm state.
Execute Cypher queries against AgentDB's graph backend. Use when the user wants to write a custom traversal that the standard tools don't cover, or when explaining graph state.
Search and manage hyperedges — n-ary relationships between memories. Use for swarm membership, multi-cause incidents, or any "this involves all of (A, B, C, D)" relationship that doesn't fit a binary edge.
| name | agentdb-causal-explain |
| description | 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. |
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.