agentdb-query — Claude Code skill: persistent agent memory
A skill to store and query agent knowledge through AgentDB. Works with hierarchical memory tiers, causal graphs, and semantic routing — use it when your agent needs to retain context across sessions.
npx skills add ruvnet/ruflo --skill agentdb-query -a claude-codeWhat agentdb-query does
agentdb-query exposes 20 MCP tools for AgentDB: hierarchical storage across memory tiers (working, episodic, semantic), pattern search via ReasoningBank routing, context synthesis, and causal graph building. Query knowledge, store structured data by memory tier, search learned patterns, and link information into a graph through a single interface.
The skill follows a standard flow: health check → session start → store or recall → context synthesis. If the service is unavailable, it falls back to built-in memory_* tools. Bulk operations are supported (up to 500 entries per batch). One key detail: hierarchical and pattern tools route by memory tier or controller, not by namespace — passing a namespace argument will be silently ignored.
What it helps with
- keep agent knowledge across multiple runs or sessions
- retrieve relevant context by semantic similarity to a query
- link facts together into a causal graph
- find learned patterns for recurring problem types
- synthesize an answer from multiple memory layers
Example prompts for the agent
- Find all REST API integration solutions in memory and synthesize the context for my current issue
- Store a causal edge linking 'database configuration' to 'query optimization'
- Search patterns: how have I handled circular dependencies in graphs before?
How to install agentdb-query
1Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill agentdb-query -a claude-code2Manually: put the files in place
~/.claude/skills/agentdb-query/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/agentdb-query/
1Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill agentdb-query -a codex2Manually: put the files in place
.agents/skills/agentdb-query/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill agentdb-query -a cursor2Manually: put the files in place
.cursor/skills/agentdb-query/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install ruvnet/ruflo agentdb-query2Manually: put the files in place
.github/skills/agentdb-query/SKILL.md1Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill agentdb-query -a gemini-cli2Platform CLI
gemini skills install https://github.com/ruvnet/ruflo --path plugins/ruflo-agentdb/skills/agentdb-queryManually: put the files in place
.devin/skills/agentdb-query/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill agentdb-query -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set104
The whole set →Similar
Questions about agentdb-query
How do I install agentdb-query in Claude Code?
Run npx skills add ruvnet/ruflo --skill agentdb-query -a claude-code. The skill will be available at ~/.claude/skills/agentdb-query/SKILL.md.
What does agentdb-query do?
It's a skill for storing and retrieving agent knowledge through AgentDB. You can save structured data across memory tiers (working, episodic, semantic), search by semantic similarity, build relationship graphs, and extract learned patterns. Queries are routed through controllers for faster retrieval of relevant context.
What if AgentDB is unavailable?
The skill switches to fallback mode using built-in memory_store and memory_search tools. This is not an error — operations continue, but without graphs or context synthesis. Check service status with mcp__plugin_ruflo-core_ruflo__agentdb_health.
Source text
SKILL.md · MIT
--- name: agentdb-query description: Query AgentDB through the controller bridge -- semantic routing, hierarchical recall, causal graphs, context synthesis, pattern store/search argument-hint: "<query>" allowed-tools: mcp__plugin_ruflo-core_ruflo__agentdb_semantic-route mcp__plugin_ruflo-core_ruflo__agentdb_hierarchical-recall mcp__plugin_ruflo-core_ruflo__agentdb_hierarchical-store mcp__plugin_ruflo-core_ruflo__agentdb_context-synthesize mcp__plugin_ruflo-core_ruflo__agentdb_causal-edge mcp__plugin_ruflo-core_ruflo__agentdb_pattern-search mcp__plugin_ruflo-core_ruflo__agentdb_pattern-store mcp__plugin_ruflo-core_ruflo__agentdb_controllers mcp__plugin_ruflo-core_ruflo__agentdb_health mcp__plugin_ruflo-core_ruflo__agentdb_batch mcp__plugin_ruflo-core_ruflo__agentdb_feedback mcp__plugin_ruflo-core_ruflo__agentdb_consolidate mcp__plugin_ruflo-core_ruflo__agentdb_session-start mcp__plugin_ruflo-core_ruflo__agentdb_session-end Bash --- # AgentDB Query Query and manage AgentDB through the controller bridge. AgentDB exposes 20 `agentdb_*` MCP tools; this skill enumerates the standard usage path. ## When to use When you need to store, retrieve, or search knowledge across agent sessions. AgentDB provides hierarchical storage, causal knowledge graphs, semantic routing, and context synthesis. ## Steps 1. **Check health** — `mcp__plugin_ruflo-core_ruflo__agentdb_health`. Sanity-check `available: true`. 2. **Start session** — `mcp__plugin_ruflo-core_ruflo__agentdb_session-start` if not already active. 3. **Store knowledge** — `mcp__plugin_ruflo-core_ruflo__agentdb_hierarchical-store` for structured tier-keyed data (tiers: `working|episodic|semantic`). 4. **Recall knowledge** — `mcp__plugin_ruflo-core_ruflo__agentdb_hierarchical-recall` with a query. 5. **Search patterns** — `mcp__plugin_ruflo-core_ruflo__agentdb_pattern-search` for learned patterns (ReasoningBank-routed). 6. **Synthesize context** — `mcp__plugin_ruflo-core_ruflo__agentdb_context-synthesize` to combine multiple memories. 7. **Build causal graph** — `mcp__plugin_ruflo-core_ruflo__agentdb_causal-edge` to link related knowledge. ## Available controller groups Call `mcp__plugin_ruflo-core_ruflo__agentdb_controllers` to list the runtime registry. Functional categories surfaced via the 20 MCP tools: - **Hierarchical** — `agentdb_hierarchical-store`, `_recall` (tier-routed) - **Pattern** — `agentdb_pattern-store`, `_search` (ReasoningBank-routed) - **Semantic** — `agentdb_semantic-route`, `_context-synthesize` - **Causal** — `agentdb_causal-edge` (graph-node backend with bridge fallback) - **Lifecycle** — `agentdb_health`, `_controllers`, `_session-start`, `_session-end` - **Bulk** — `agentdb_batch` (≤500 entries), `_consolidate` - **Quality** — `agentdb_feedback` - **Graph reads** — `agentdb_graph-query` (k-hop / semantic / pagerank from a domain-prefixed node id such as `entity:xyz`; SQL k-hop is bounded at 3 hops, check `appliedDepth` and `truncated`) and `agentdb_graph-pathfinder` - **Deletes (destructive)** — `agentdb_hierarchical-delete`, `agentdb_causal-edge-delete`, `agentdb_causal-node-delete`. Confirm the exact ids with the user before calling; they are not undoable from this plugin. ## Important: namespace handling Namespace strings apply to `memory_*` and `embeddings_search` only. The `agentdb_hierarchical-*`, `agentdb_pattern-*`, and `agentdb_causal-edge` tools route by **tier** or **controller**, not namespace. Don't pass `namespace: 'foo'` to those tools — it will be silently ignored. See plugin README "Namespace convention". ## Operational fallbacks (branch on these) - `controller: 'memory-store-fallback'` — pattern persisted via `memory_store --namespace pattern`. NOT a failure. - `_graphNodeBackend: true` — causal-edge handled by `@ruvector/graph-node`. - `success: false, error: '...Use memory_store/memory_search instead.'` — bridge unavailable; switch to `memory_*` tools per the README replacement table. ## CLI alternative ```bash npx @claude-flow/cli@latest memory search --query "your query" --namespace patterns npx @claude-flow/cli@latest memory store --key "key" --value "value" --namespace patterns npx @claude-flow/cli@latest memory list --namespace patterns ```
© ruvnet · MIT · ruvnet/ruflo