memory-distiller 🧠
The subconscious of your OpenClaw agent. Automatically distills fleeting conversation moments into permanent wisdom.
Most agents wake up blank. memory-distiller changes that — it automatically identifies what's worth remembering during each conversation, writes it to persistent memory files, and creates a true learning loop. Your agent gets smarter every session.
Why You Need It
OpenClaw natively has MEMORY.md and memory/YYYY-MM-DD.md, but updating them requires manual effort.
The problem: You correct the agent, it says "got it", and makes the same mistake next session.
memory-distiller closes this loop:
- - Automatically scans conversations for "worth remembering" signals
- Applies a quality gate to filter out one-time, temporary information
- Writes structured entries to memory files automatically
How It Fits With proactive-agent
| Skill | Role | Responsibility |
|---|
| proactive-agent | Butler | Real-time detail capture (WAL), proactive behaviors, Heartbeat |
| memory-distiller |
Historian | Post-conversation reflection, distilling lessons into long-term memory |
One line: proactive-agent owns the present. memory-distiller owns the future.
Trigger Conditions
Auto-Triggers (scan every user message for these signals)
| Type | Signal Words | Example |
|---|
| 🔴 Correction | "wrong", "not right", "no, I meant", "actually", "stop doing" | "No, that command is wrong" |
| 💚 Preference |
"I prefer", "always use", "don't use", "from now on", "by default" | "Always send reports as attachments" |
| 💡
Insight | "the issue was", "turns out", "the key is", "got it", "solved" | "Turns out Feishu doesn't render Markdown" |
| 📌
Explicit | "remember this", "save this", "note that", "write this down" | "Remember this config" |
Manual Trigger
When the user says any of the following, immediately distill the session:
CODEBLOCK0
Quality Gate (All 4 Must Pass)
Before writing anything, check these 4 gates:
- 1. Durability — Will this still be valuable in 24 hours? (Skip one-time context)
- Generality — Is this a reusable rule, or a one-off special case? (Prefer rules)
- Novelty — Does
MEMORY.md already contain this? (Avoid duplicates; update if stale) - Actionability — Can this guide future behavior? (Skip vague impressions; only concrete rules)
Don't record (examples):
- - "Today we researched LangChain" → one-time, no guidance value
- "User is in Shanghai" → already in USER.md, duplicate
Do record (examples):
- - "
clawhub install only accepts slugs, not GitHub URLs" → actionable rule - "Feishu chat does NOT render Markdown — long reports must be sent as attachments or doc links" → prevents repeated mistakes
Memory Write Format
Where to Write
| Content Type | Target File |
|---|
| Today's new discoveries, lessons | INLINECODE4 |
| Important rules, persistent preferences |
MEMORY.md (relevant section) |
| User personal info / preferences |
USER.md |
Entry Format
CODEBLOCK1
Example:
CODEBLOCK2
Execution Flow
CODEBLOCK3
Behavioral Rules
When to Notify the User
- - Auto-triggered → Write silently, do NOT say "I've noted that" — don't interrupt the flow
- Explicitly triggered → Confirm with one line: "✅ Noted." + brief summary of what was recorded
When NOT to Record
- - User says "suppose...", "hypothetically...", "for example..." → hypothetical, skip
- System errors, network timeouts → environment issues, not learnable rules
- Content already fully documented in
MEMORY.md → don't duplicate; update if stale
Privacy Filter
Never write the following to any memory file, even if the user asks:
- - Passwords, tokens, API keys
- Personal identification info (ID numbers, bank accounts, etc.)
- Sensitive information about third parties
Installation
CODEBLOCK4
Zero configuration. Restart your OpenClaw session after installation.
Recommended Pairing
| Skill | Purpose |
|---|
| proactive-agent | Real-time WAL protocol + proactive behaviors |
| memory-distiller |
Post-conversation automatic experience distillation (this skill) |
Together: never lose present details, never repeat past mistakes.
Design Philosophy
Inspired by Claudeception (a Claude Code self-learning plugin), redesigned from scratch for OpenClaw's architecture and memory model.
Core belief:
An agent should never be tripped up by the same problem twice.
Every correction is a learning opportunity. memory-distiller ensures none of them go to waste.
Academic foundation: Voyager (2023), CASCADE (2024), SEAgent (2025), Reflexion (2023) — all point to the same conclusion: agents that persist and reflect on their learning dramatically outperform those that start fresh every time.
Designed with 🐝 claw-multi-agent — 3 parallel agents, 28s
memory-distiller 🧠
你的OpenClaw代理的潜意识。 自动将转瞬即逝的对话瞬间提炼为永久智慧。
大多数代理启动时一片空白。memory-distiller改变了这一点——它自动识别每次对话中值得记住的内容,将其写入持久化记忆文件,并创建真正的学习循环。你的代理每次会话都会变得更聪明。
为什么你需要它
OpenClaw原生拥有MEMORY.md和memory/YYYY-MM-DD.md,但更新它们需要手动操作。
问题在于:你纠正了代理,它说明白了,但下次会话又犯同样的错误。
memory-distiller闭环了这一点:
- - 自动扫描对话中的值得记住信号
- 应用质量门控过滤一次性、临时性信息
- 自动将结构化条目写入记忆文件
如何与proactive-agent配合使用
| 技能 | 角色 | 职责 |
|---|
| proactive-agent | 管家 | 实时细节捕获(WAL)、主动行为、心跳 |
| memory-distiller |
历史学家 | 对话后反思,将经验提炼为长期记忆 |
一句话总结:proactive-agent掌控当下。memory-distiller掌控未来。
触发条件
自动触发(扫描每条用户消息中的这些信号)
| 类型 | 信号词 | 示例 |
|---|
| 🔴 纠正 | 错了、不对、不,我的意思是、实际上、别再 | 不,那个命令是错的 |
| 💚 偏好 |
我更喜欢、总是用、不要用、从现在开始、默认 | 总是以附件形式发送报告 |
| 💡
洞察 | 问题在于、原来、关键是、明白了、解决了 | 原来飞书不渲染Markdown |
| 📌
显式 | 记住这个、保存这个、注意这点、记下来 | 记住这个配置 |
手动触发
当用户说出以下任何内容时,立即提炼本次会话:
记住这个 / 保存这个 / 注意这点
记下我们刚学到的 / 提炼本次会话
质量门控(必须全部通过4项)
在写入任何内容之前,检查这4个门控:
- 1. 持久性 — 24小时后这还有价值吗?(跳过一次性上下文)
- 通用性 — 这是可复用的规则,还是一次性的特殊情况?(优先规则)
- 新颖性 — MEMORY.md是否已包含此内容?(避免重复;如果过时则更新)
- 可操作性 — 这能指导未来的行为吗?(跳过模糊印象;只保留具体规则)
不要记录(示例):
- - 今天我们研究了LangChain → 一次性,无指导价值
- 用户在上海 → 已在USER.md中,重复
要记录(示例):
- - clawhub install只接受slug,不接受GitHub URL → 可操作规则
- 飞书聊天不渲染Markdown——长篇报告必须以附件或文档链接形式发送 → 防止重复错误
记忆写入格式
写入位置
| 内容类型 | 目标文件 |
|---|
| 今天的新发现、经验教训 | memory/YYYY-MM-DD.md |
| 重要规则、持久偏好 |
MEMORY.md(相关章节) |
| 用户个人信息/偏好 | USER.md |
条目格式
markdown
🧠 自动学习 [YYYY-MM-DD HH:MM]
- - 类型: 纠正 / 偏好 / 洞察 / 显式
- 触发: 一句话说明触发原因
- 规则: 具体、可操作的规则,可直接指导未来行为
示例:
markdown
🧠 自动学习 [2026-03-02 00:30]
- - 类型: 纠正
- 触发: 用户纠正了安装命令格式
- 规则: clawhub install只接受slug(例如claw-multi-agent),不接受GitHub URL
执行流程
用户消息到达
↓
扫描触发信号(纠正 / 偏好 / 洞察 / 显式)
↓
检测到信号?
├─ 否 → 正常回复,无操作
└─ 是 → 应用质量门控
↓
全部4个门控通过?
├─ 否 → 丢弃,正常回复
└─ 是 → 提炼为结构化记忆条目
↓
写入目标文件
↓
正常回复
(除非显式触发,否则静默执行)
行为规则
何时通知用户
- - 自动触发 → 静默写入,不要说我已记下——不要打断对话流程
- 显式触发 → 用一行确认:✅ 已记下。 + 简要记录内容摘要
何时不记录
- - 用户说假设……、理论上……、例如…… → 假设性内容,跳过
- 系统错误、网络超时 → 环境问题,非可学习规则
- 内容已在MEMORY.md中完整记录 → 不重复;如果过时则更新
隐私过滤器
永远不要将以下内容写入任何记忆文件,即使用户要求:
- - 密码、令牌、API密钥
- 个人身份信息(身份证号、银行账户等)
- 关于第三方的敏感信息
安装
bash
npx clawhub@latest install memory-distiller
零配置。安装后重启你的OpenClaw会话。
推荐搭配
| 技能 | 用途 |
|---|
| proactive-agent | 实时WAL协议 + 主动行为 |
| memory-distiller |
对话后自动经验提炼(本技能) |
两者结合:永不丢失当下细节,永不重复过去错误。
设计理念
灵感来自Claudeception(一个Claude Code自学习插件),为OpenClaw的架构和记忆模型从头重新设计。
核心理念:
一个代理绝不应被同一个问题绊倒两次。
每一次纠正都是一次学习机会。memory-distiller确保没有一次被浪费。
学术基础:Voyager(2023)、CASCADE(2024)、SEAgent(2025)、Reflexion(2023)——都指向同一个结论:能够持久化并反思学习的代理,其表现远超每次从头开始的代理。
使用 🐝 claw-multi-agent 设计——3个并行代理,28秒