Install
openclaw skills install memory-dreamMemory consolidation for OpenClaw agents. Periodically reviews daily memory files (memory/*.md), extracts durable knowledge, and merges it into MEMORY.md — like a human brain consolidating memories during sleep. Triggers: dream, 做梦, consolidate memory, 整理记忆, memory consolidation. Can also run via Cron for automatic nightly consolidation.
openclaw skills install memory-dreamMemory consolidation for OpenClaw agents. Your agent accumulates daily notes in memory/YYYY-MM-DD.md files, but without periodic consolidation, long-term memory (MEMORY.md) becomes stale while daily files grow endlessly. Dream fixes this — like REM sleep for your AI.
ls memory/ to inventory daily filesMEMORY.md to understand current long-term memory structureRead daily files from the last 7 days (memory/YYYY-MM-DD.md). Extract:
Token budget rules:
Apply these operations to MEMORY.md using surgical edits (not full rewrites):
For daily files older than 30 days:
<!-- consolidated to MEMORY.md on YYYY-MM-DD -->Output a brief consolidation report:
🌙 Dream complete
- Scanned N daily files (X lines total)
- MEMORY.md: +N added / ~N corrected / -N pruned
- Next suggestion: [if any]
edit tool for precise changes, never overwrite the whole file## Dream Log (HH:MM) entry to today's memory/YYYY-MM-DD.md/cron add --schedule "0 3 * * *" --task "Execute dream skill: consolidate memory" --label dream-nightly
This skill mimics the human sleep cycle's memory consolidation process:
Daily experiences Nightly consolidation Long-term memory
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ memory/03-26.md │──┐ │ │ │ │
│ memory/03-27.md │──┤ │ Dream Skill │────────▶│ MEMORY.md │
│ memory/03-28.md │──┤ │ (scan+merge) │ │ (structured, │
│ memory/03-29.md │──┘ │ │ │ deduplicated) │
│ ... │ └─────────────────┘ └─────────────────┘
└─────────────────┘
Raw daily logs Consolidation Curated knowledge
Without Dream, MEMORY.md stays frozen at whatever was manually written, while daily files accumulate unbounded. With Dream, your agent's long-term memory stays fresh, accurate, and compact.