From agentdb-graph
K-hop traversal from a starting node in AgentDB's graph. Use to explore neighborhoods, find reachable nodes, or visualize a memory's "context".
npx claudepluginhub ruvnet/agentdb --plugin agentdb-graphThis skill uses the workspace's default tool permissions.
Walk outward from a node up to K hops, returning the visited subgraph.
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.
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.
Executes Neo4j GDS algorithms like PageRank, Louvain, WCC, FastRP, KNN; projects in-memory graphs with gds.graph.project; supports stream/stats/mutate/write modes, memory estimation, Python client for ML pipelines and recommendations.
Share bugs, ideas, or general feedback.
Walk outward from a node up to K hops, returning the visited subgraph.
agentdb_kHopNeighbors(
startId: <node id>
k: 1..5 // hops
edgeFilter?: [<relation>, ...] // limit to specific relations
direction?: 'in' | 'out' | 'both'
maxNodes?: 100 // safety cap
)
Returns: { nodes, edges, stats: { reachable, capped } }
| Goal | Pattern |
|---|---|
| Forward influence | direction: 'out', k: 3 |
| Backward dependencies | direction: 'in', k: 3 |
| Local neighborhood | direction: 'both', k: 1 |
| Causal chain only | edgeFilter: ['caused', 'supersedes'] |
| Skill composition graph | edgeFilter: ['composes', 'requires'], start: skill id |
K-hop fans out exponentially. With average degree d, k hops returns up to d^k nodes. AgentDB defaults maxNodes: 100 — when you hit the cap, stats.capped: true and you should rerun with smaller k or tighter edgeFilter.
k > 4 without edgeFilter — explosive fan-out destroys the answer's signal.