Remembering Conversations
Core principle: Search before reinventing. Searching costs nothing; reinventing or repeating mistakes costs everything.
Mandatory: Use the Search Agent
YOU MUST dispatch the search-conversations agent for any historical search.
Announce: "Dispatching search agent to find [topic]."
Then use the Task tool with subagent_type: "search-conversations":
CODEBLOCK0
The agent will:
- 1. Search with the
search tool - Read top 2-5 results with the
show tool - Synthesize findings (200-1000 words)
- Return actionable insights + sources
Saves 50-100x context vs. loading raw conversations.
When to Use
You often get value out of consulting your episodic memory once you understand what you're being asked. Search memory in these situations:
After understanding the task:
- - User asks "how should I..." or "what's the best approach..."
- You've explored current codebase and need to make architectural decisions
- User asks for implementation approach after describing what they want
When you're stuck:
- - You've investigated a problem and can't find the solution
- Facing a complex problem without obvious solution in current code
- Need to follow an unfamiliar workflow or process
When historical signals are present:
- - User says "last time", "before", "we discussed", "you implemented"
- User asks "why did we...", "what was the reason..."
- User says "do you remember...", "what do we know about..."
Don't search first:
- - For current codebase structure (use Grep/Read to explore first)
- For info in current conversation
- Before understanding what you're being asked to do
Direct Tool Access (Discouraged)
You CAN use MCP tools directly, but DON'T:
Using these directly wastes your context window. Always dispatch the agent instead.
See MCP-TOOLS.md for complete API reference if needed for advanced usage.
记忆对话
核心原则:先搜索,再创造。搜索无需成本;重新创造或重复错误代价高昂。
必须使用:搜索代理
你必须派遣搜索对话代理进行任何历史搜索。
声明:正在派遣搜索代理查找[主题]。
然后使用带有 subagent_type: search-conversations 的任务工具:
任务工具:
描述:搜索过去关于[主题]的对话
提示:搜索[具体查询或主题]。重点关注[你正在寻找的内容——例如,决策、模式、注意事项、代码示例]。
subagent_type: search-conversations
该代理将:
- 1. 使用 search 工具进行搜索
- 使用 show 工具读取前2-5条结果
- 综合发现(200-1000字)
- 返回可操作的见解 + 来源
相比加载原始对话,可节省50-100倍的上下文空间。
何时使用
一旦你理解了被问及的内容,查阅你的情景记忆通常会带来价值。在以下情况下搜索记忆:
理解任务后:
- - 用户问我应该如何...或最佳方法是什么...
- 你已探索当前代码库,需要做出架构决策
- 用户在描述他们想要的内容后询问实现方法
当你遇到困难时:
- - 你已调查问题但找不到解决方案
- 面对复杂问题,当前代码中无明显解决方案
- 需要遵循不熟悉的工作流程或过程
当存在历史信号时:
- - 用户说上次、之前、我们讨论过、你实现了
- 用户问为什么我们...、原因是什么...
- 用户说你还记得吗...、我们对...了解多少
不要首先搜索:
- - 当前代码库结构(先使用Grep/Read探索)
- 当前对话中的信息
- 在理解被要求做什么之前
直接工具访问(不推荐)
你可以直接使用MCP工具,但不要:
- - mcppluginepisodic-memoryepisodic-memorysearch
- mcppluginepisodic-memoryepisodic-memoryshow
直接使用这些工具会浪费你的上下文窗口。始终派遣代理代替。
如需高级用法,请参阅MCP-TOOLS.md获取完整API参考。