以下为本文档的中文说明

agentdb-query 是一个通过控制器桥接器查询和管理 AgentDB 的技能。AgentDB 是一个专为 AI Agent 会话设计的知识存储系统,提供了 15 个 agentdb_* MCP 工具。该技能定义了这些工具的标准使用路径,使 Agent 能够高效地存储、检索和搜索跨会话的知识。其核心功能包括:语义路由——根据查询含义智能路由到最相关的存储层级;层次化召回——支持工作记忆(working)、情景记忆(episodic)和语义记忆(semantic)三个层级的知识召回;因果知识图谱——管理和查询 Agent 之间的因果关系;上下文合成——将多个相关信息片段合成为连贯的上下文;模式存储与搜索——存储和查找重复出现的交互模式。标准工作流程包括:首先检查 AgentDB 健康状态,然后启动会话,接着进行知识存储和召回,最后进行模式搜索。该技能还支持知识版本管理,可以追溯知识变化的历史记录。该技能适用于需要长期记忆的 Agent 系统、跨会话知识管理的应用、以及需要构建 Agent 知识图谱的复杂场景。核心原则是“结构化知识管理是 Agent 智能的基础”,通过层次化存储和语义化检索,让 Agent 的知识像人脑一样有序组织。


AgentDB Query

Query and manage AgentDB through the controller bridge. AgentDB exposes 15 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 healthmcp__claude-flow__agentdb_health. Sanity-check available: true.
  2. Start sessionmcp__claude-flow__agentdb_session-start if not already active.
  3. Store knowledgemcp__claude-flow__agentdb_hierarchical-store for structured tier-keyed data (tiers: working|episodic|semantic).
  4. Recall knowledgemcp__claude-flow__agentdb_hierarchical-recall with a query.
  5. Search patternsmcp__claude-flow__agentdb_pattern-search for learned patterns (ReasoningBank-routed).
  6. Synthesize contextmcp__claude-flow__agentdb_context-synthesize to combine multiple memories.
  7. Build causal graphmcp__claude-flow__agentdb_causal-edge to link related knowledge.

Available controller groups

Call mcp__claude-flow__agentdb_controllers to list the runtime registry. Functional categories surfaced via the 15 MCP tools:

  • Hierarchicalagentdb_hierarchical-store, _recall (tier-routed)
  • Patternagentdb_pattern-store, _search (ReasoningBank-routed)
  • Semanticagentdb_semantic-route, _context-synthesize
  • Causalagentdb_causal-edge (graph-node backend with bridge fallback)
  • Lifecycleagentdb_health, _controllers, _session-start, _session-end
  • Bulkagentdb_batch (≤500 entries), _consolidate
  • Qualityagentdb_feedback

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

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

3f:[“","","","L42”,null,{“content”:“$43”,“frontMatter”:{“name”:“agentdb-query”,“description”:“Query AgentDB through the controller bridge – semantic routing, hierarchical recall, causal graphs, context synthesis, pattern store/search”,“argument-hint”:“”,“allowed-tools”:“mcp__claude-flow__agentdb_semantic-route mcp__claude-flow__agentdb_hierarchical-recall mcp__claude-flow__agentdb_hierarchical-store mcp__claude-flow__agentdb_context-synthesize mcp__claude-flow__agentdb_causal-edge mcp__claude-flow__agentdb_pattern-search mcp__claude-flow__agentdb_pattern-store mcp__claude-flow__agentdb_controllers mcp__claude-flow__agentdb_health mcp__claude-flow__agentdb_batch mcp__claude-flow__agentdb_feedback mcp__claude-flow__agentdb_consolidate mcp__claude-flow__agentdb_session-start mcp__claude-flow__agentdb_session-end Bash”}}]

Logo

这里是“一人公司”的成长家园。我们提供从产品曝光、技术变现到法律财税的全栈内容,并连接云服务、办公空间等稀缺资源,助你专注创造,无忧运营。

更多推荐