Skip to content
Agent Memory
Command

/cortexdb-multi-hop

Answer a complex, multi-step question over the CortexDB brain using iterative agentic retrieval

From plugin
cortexdb
52913 skills13 commands1 MCP
> /plugin marketplace add liliang-cn/cortexdb
> /plugin install cortexdb@cortexdb

Command definition

cortexdb-multi-hop.md
description: Answer a complex, multi-step question over the CortexDB brain using iterative agentic retrieval

Answer a **complex, multi-step** question — the kind that needs chaining evidence across several lookups ("who leads the team that owns X?", "what does the tool my project depends on use under the hood?") — using **multi-hop retrieval**: retrieve → reason → retrieve. Each hop runs a GraphRAG search, accumulates the evidence, and the LLM decides whether it's enough or hands back a focused follow-up query to drive the next hop, until it can answer.

Requires an LLM — set `CORTEXDB_LLM_BASE_URL` (e.g. a local Ollama `http://localhost:11434`) and `CORTEXDB_LLM_MODEL` (e.g. `qwen3.5`). Run in a shell, putting the question in `Q`:

bin=$(ls -t ~/.claude/plugins/data/cortexdb-cortexdb/bin/cortexdb-mcp-* 2>/dev/null | head -1)
[ -n "$bin" ] || bin="${CORTEXDB_MCP_BIN:-cortexdb-mcp}"
Q="${ARGUMENTS:-}"
"$bin" --multi-hop "$Q"

The loop is bounded (a few hops) and prints its hop trace to stderr and the final answer to stdout. Relay the printed answer to the user. If the answer comes back empty, the brain has too little relevant content yet — suggest importing/organizing more (`/cortexdb-import-memory`, `/cortexdb-graph`, `knowledge_save`).

$ARGUMENTS

@liliang-cn
Ships withcortexdb

Memory your coding agents share. Tell Claude Code something once, and Codex, your other machines and next week's session already know it.

5293 skills1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
529
Star history of liliang-cn/cortexdb on GitHub, a chart by star-history.com

Other commands on cortexdb.

More commands from other plugins.

mempalace-audit

mempalace-audit

Command

Score how well organized your memory palace is, then run a guided repair session — one decision at a time.

@mempalace@mempalaceInstall Command
plan-to-beads

plan-to-beads

Command

Convert a Claude Code plan file into beads epic + tasks for cross-session tracking.

beads8d29k
@gastownhall@gastownhallInstall Command