โ† Back to skills
extension
Category: Development & EngineeringNo API key required

Memory Distiller

OpenClaw's subconscious. Automatically distills conversation insights, corrections, and preferences into durable memory. The agent that learns from every ses...

personAuthor: zcyynlhubclawhub

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:

"remember this" / "save this" / "note that"
"write down what we just learned" / "distill this session"

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)
  2. Generality โ€” Is this a reusable rule, or a one-off special case? (Prefer rules)
  3. Novelty โ€” Does MEMORY.md already contain this? (Avoid duplicates; update if stale)
  4. 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 | memory/YYYY-MM-DD.md | | Important rules, persistent preferences | MEMORY.md (relevant section) | | User personal info / preferences | USER.md |

Entry Format

### ๐Ÿง  Auto-Learned [YYYY-MM-DD HH:MM]
- **Type:** Correction / Preference / Insight / Explicit
- **Trigger:** One sentence explaining what triggered this
- **Rule:** Specific, actionable rule that can directly guide future behavior

Example:

### ๐Ÿง  Auto-Learned [2026-03-02 00:30]
- **Type:** Correction
- **Trigger:** User corrected the install command format
- **Rule:** `clawhub install` only accepts slugs (e.g. claw-multi-agent), not GitHub URLs

Execution Flow

User message arrives
    โ†“
Scan for trigger signals (Correction / Preference / Insight / Explicit)
    โ†“
Signal detected?
    โ”œโ”€ No  โ†’ Reply normally, no action
    โ””โ”€ Yes โ†’ Apply quality gate
                โ†“
            All 4 gates pass?
                โ”œโ”€ No  โ†’ Discard, reply normally
                โ””โ”€ Yes โ†’ Distill into structured memory entry
                            โ†“
                        Write to target file
                            โ†“
                        Reply normally
                        (silent unless explicitly triggered)

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

npx clawhub@latest install memory-distiller

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