hybrid-memory
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseHybrid Memory System
混合内存系统
We use two memory systems integrated into a single view:
- QMD (Vector Store): For retrieving documents, specs, and full content.
- Graphiti (Knowledge Graph): For retrieving facts, timelines, and relationships.
我们将两个内存系统整合为一个统一视图:
- QMD(向量存储):用于检索文档、规格说明和完整内容。
- Graphiti(知识图谱):用于检索事实、时间线和关系。
Primary Tool
主要工具
For 95% of memory queries, use the hybrid search script. It queries both systems in parallel.
bash
~/clawd/scripts/memory-hybrid-search.sh "your query"Optional flags:
- — Specify agent group (default:
[group_id])clawdbot-main - — Output JSON for programmatic use
--json
对于95%的内存查询,请使用混合搜索脚本。它会并行查询两个系统。
bash
~/clawd/scripts/memory-hybrid-search.sh "your query"可选参数:
- — 指定Agent组(默认值:
[group_id])clawdbot-main - — 输出JSON格式以支持程序化调用
--json
Specific Tools (Advanced)
专用工具(进阶)
Only use these if the hybrid script fails or you need granular control.
仅在混合脚本失效或需要精细控制时使用这些工具。
Graphiti Only (Temporal/Facts)
仅使用Graphiti(时序/事实)
Search for specific temporal facts:
bash
~/clawd/scripts/graphiti-search.sh "your question" clawdbot-main 10Log new facts (IMPORTANT):
bash
~/clawd/scripts/graphiti-log.sh clawdbot-main user "Name" "Fact to remember"搜索特定的时序事实:
bash
~/clawd/scripts/graphiti-search.sh "your question" clawdbot-main 10记录新事实(重要):
bash
~/clawd/scripts/graphiti-log.sh clawdbot-main user "Name" "Fact to remember"QMD Only (Deep Document Search)
仅使用QMD(深度文档搜索)
If you need more results or specific file filtering:
bash
qmd search "query" -n 10如果需要更多结果或特定文件过滤:
bash
qmd search "query" -n 10Recall Pattern
召回流程
- User asks question ("What was the plan for the project?")
- Run Hybrid Search ()
~/clawd/scripts/memory-hybrid-search.sh "plan for the project" - Synthesize Answer from both the temporal facts and document snippets found.
- If needed: Use to get the full content of a file found in the QMD results.
read
- 用户提出问题(例如:“项目的计划是什么?”)
- 运行混合搜索()
~/clawd/scripts/memory-hybrid-search.sh "plan for the project" - 综合答案:结合找到的时序事实和文档片段生成答案。
- 如有需要:使用命令获取QMD结果中找到的文件的完整内容。
read
When to Use Which
适用场景对照表
| Question Type | Use |
|---|---|
| "What's in GOALS.md?" | Hybrid search → |
| "When did we discuss X?" | Hybrid search (Graphiti results) |
| "What did I say last Tuesday?" | Graphiti direct |
| "Find notes about architecture" | Hybrid search (QMD results) |
| 问题类型 | 适用方式 |
|---|---|
| “GOALS.md里有什么内容?” | 混合搜索 → |
| “我们什么时候讨论过X?” | 混合搜索(依赖Graphiti结果) |
| “我上周二说了什么?” | 直接使用Graphiti |
| “查找关于架构的笔记” | 混合搜索(依赖QMD结果) |