用途
AgentDB Query 用于通过控制器桥接(controller bridge)查询和管理 AgentDB。当你需要跨智能体会话存储、检索或搜索知识时使用本技能。AgentDB 提供分层存储、因果知识图谱、语义路由和上下文合成能力。AgentDB 暴露 15 个 agentdb_* MCP 工具,本技能枚举了标准使用路径。
主要能力
通过 15 个 MCP 工具呈现的功能类别包括:
- 分层(Hierarchical):agentdb_hierarchical-store、agentdb_hierarchical-recall(按层级路由)。
- 模式(Pattern):agentdb_pattern-store、agentdb_pattern-search(经 ReasoningBank 路由)。
- 语义(Semantic):agentdb_semantic-route、agentdb_context-synthesize。
- 因果(Causal):agentdb_causal-edge(graph-node 后端,带桥接回退)。
- 生命周期(Lifecycle):agentdb_health、agentdb_controllers、agentdb_session-start、agentdb_session-end。
- 批量(Bulk):agentdb_batch(≤500 条)、agentdb_consolidate。
- 质量(Quality):agentdb_feedback。
使用方式
标准步骤:
- 检查健康状态 — 调用 mcp__plugin_ruflo-core_ruflo__agentdb_health,确认 available: true。
- 启动会话 — 若尚未激活,调用 mcp__plugin_ruflo-core_ruflo__agentdb_session-start。
- 存储知识 — 使用 mcp__plugin_ruflo-core_ruflo__agentdb_hierarchical-store 存储结构化的按层级键控数据(层级:working|episodic|semantic)。
- 召回知识 — 使用 mcp__plugin_ruflo-core_ruflo__agentdb_hierarchical-recall 并附带查询。
- 搜索模式 — 使用 mcp__plugin_ruflo-core_ruflo__agentdb_pattern-search 搜索已学习的模式(经 ReasoningBank 路由)。
- 合成上下文 — 使用 mcp__plugin_ruflo-core_ruflo__agentdb_context-synthesize 合并多个记忆。
- 构建因果图 — 使用 mcp__plugin_ruflo-core_ruflo__agentdb_causal-edge 关联相关知识。
可通过调用 mcp__plugin_ruflo-core_ruflo__agentdb_controllers 列出运行时注册表。
命名空间处理(重要)
命名空间字符串仅适用于 memory_* 和 embeddings_search。agentdb_hierarchical-、agentdb_pattern- 和 agentdb_causal-edge 工具按层级或控制器路由,而非命名空间。不要向这些工具传递 namespace: 'foo',它会被静默忽略。详见插件 README 的“Namespace convention”。
运维回退(据此分支处理)
- controller: 'memory-store-fallback' — 模式通过 memory_store --namespace pattern 持久化,这不是失败。
- _graphNodeBackend: true — 因果边由 @ruvector/graph-node 处理。
- success: false, error: '...Use memory_store/memory_search instead.' — 桥接不可用;按 README 替换表切换到 memory_* 工具。
CLI 替代方式
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
适用场景
适用于需要跨智能体会话持久化与检索知识的场景,包括分层记忆管理、模式学习与复用、语义路由、上下文合成以及因果关系构建。
限制
命名空间仅对 memory_* 和 embeddings_search 生效,对分层、模式和因果工具无效。批量操作上限为 500 条。桥接不可用时需切换到 memory_* 工具。其余收费、价格、平台等信息暂未提供。