代理数据库查询

人工智能 社区

技能解读

当前原文的自动摘译,尚未人工审校。

何时使用

当您需要跨代理会话存储、检索或搜索知识时。 AgentDB 提供分层存储、因果知识图、语义路由和上下文合成。

步骤

检查健康状况 — mcp__claude-flow__agentdb_health。健全性检查available: true。开始会话 — mcp__claude-flow__agentdb_session-start(如果尚未激活)。存储知识 — mcp__claude-flow__agentdb_hierarchical-store 用于结构化的层键控数据(层:working|episodic|semantic)。通过查询回忆知识 — mcp__claude-flow__agentdb_hierarchical-recall。搜索模式 — mcp__claude-flow__agentdb_pattern-search 用于学习模式(ReasoningBank 路由)。

可用的控制器组

调用mcp__claude-flow__agentdb_controllers列出运行时注册表。通过 15 个 MCP 工具呈现的功能类别: 层次结构 — agentdb_hierarchical-store、_recall(分层路由) 模式 — agentdb_pattern-store、_search(ReasoningBank 路由) 语义 — agentdb_semantic-route、_context-synthesize 因果 — agentdb_causal-edge (带有桥接回退的图节点后端)

重要:命名空间处理

命名空间字符串仅适用于 memory_* 和 embeddings_search。 agentdb_hierarchical-*、agentdb_pattern-*和agentdb_causal-edge工具按层或控制器而不是命名空间进行路由。不要将namespace: 'foo'传递给这些工具——它将被默默地忽略。请参阅插件自述文件“命名空间约定”。

运营后备(这些分支)

controller: 'memory-store-fallback' — 模式通过memory_store --namespace pattern持续存在。不是失败。 _graphNodeBackend: true — 由@ruvector/graph-node处理的因果边。 success: false, error: '...Use memory_store/memory_search instead.' — 网桥不可用;根据 README 替换表切换到memory_* 工具。

流狐档案 运行与权限由流狐静态检查推断,不代表作者声明或实际测试结果。
领域
人工智能
作者声明的智能体
未找到明确声明;不据此推断已兼容或已测试
静态检查
88 / 100 · 启发式扫描,不代表运行安全
运行环境证据
未执行;当前没有隔离运行测试证据
作者 / 版本 / 许可证
@ruvnet · 未声明许可证
上下文用量评级
低消耗
接入复杂程度
即装即用
是否需要外部接口密钥
不需要
兼容的系统
macOS · Linux · Windows
运行环境要求
Node.js
检测到的文件与系统行为
  • 只读
网络行为
仅限本地
安装命令数
无(仅作为资料)

需要注意: 未声明工具权限范围;实际权限由运行环境决定。

作者说明文件(原文) SKILL.md

# 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 health** — `mcp__claude-flow__agentdb_health`. Sanity-check `available: true`.
2. **Start session** — `mcp__claude-flow__agentdb_session-start` if not already active.
3. **Store knowledge** — `mcp__claude-flow__agentdb_hierarchical-store` for structured tier-keyed data (tiers: `working|episodic|semantic`).
4. **Recall knowledge** — `mcp__claude-flow__agentdb_hierarchical-recall` with a query.
5. **Search patterns** — `mcp__claude-flow__agentdb_pattern-search` for learned patterns (ReasoningBank-routed).
6. **Synthesize context** — `mcp__claude-flow__agentdb_context-synthesize` to combine multiple memories.
7. **Build causal graph** — `mcp__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:

- **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`

## 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
```

讨论

基于 GitHub Discussions。登录 GitHub 即可参与讨论、点赞、订阅更新。