返回顶部
m

memory-dream

Memory 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.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.3
安全检测
已通过
178
下载量
0
收藏
概述
安装方式
版本历史

memory-dream

# Dream — Memory Consolidation for OpenClaw Memory 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. ## When to Use - User says "dream", "做梦", "consolidate memory", or "整理记忆" - Cron trigger (recommended: nightly at 3:00 AM) - Heartbeat detects memory files piling up (>20 files or >3000 total lines) ## Consolidation Flow ### Phase 1 — Orient 1. `ls memory/` to inventory daily files 2. Read `MEMORY.md` to understand current long-term memory structure 3. Count: total files, total lines, files from last 7 days ### Phase 2 — Scan Recent Journals Read daily files from the **last 7 days** (`memory/YYYY-MM-DD.md`). Extract: - New facts, preferences, or decisions not yet in MEMORY.md - Information that **contradicts** MEMORY.md (needs correction) - Recurring themes (indicates importance) **Token budget rules:** - Skip files older than 7 days (too many tokens) - If a file exceeds 500 lines, read only the first 200 lines - Focus on headings and key facts, not verbose logs ### Phase 3 — Merge into MEMORY.md Apply these operations to MEMORY.md using **surgical edits** (not full rewrites): 1. **Add**: Append new facts to the appropriate section 2. **Correct**: Update outdated information with newer data from journals 3. **Deduplicate**: Merge entries that say the same thing 4. **Prune**: Remove clearly obsolete info (e.g., "temporary workaround for X" when X is resolved) 5. **Absolutize dates**: Convert "yesterday", "just now" → actual dates (e.g., "2026-03-27") ### Phase 4 — Mark Old Journals (Optional) For daily files **older than 30 days**: - If content is consolidated → prepend: `<!-- consolidated to MEMORY.md on YYYY-MM-DD -->` - **Never delete** any file (user may want to look back) ### Phase 5 — Report 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] ``` ## Critical Rules - **MEMORY.md is the primary output** — all consolidated knowledge goes here - **Surgical edits only** — use the `edit` tool for precise changes, never overwrite the whole file - **Conservative by default** — when unsure whether to remove something, keep it - **No secrets in logs** — don't expose API keys, passwords, or tokens in the dream report - **Log each run** — append a `## Dream Log (HH:MM)` entry to today's `memory/YYYY-MM-DD.md` ## Cron Setup ``` /cron add --schedule "0 3 * * *" --task "Execute dream skill: consolidate memory" --label dream-nightly ``` ## How It Works (Under the Hood) 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.

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 memory-dream-1775884216 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 memory-dream-1775884216 技能

通过命令行安装

skillhub install memory-dream-1775884216

下载 Zip 包

⬇ 下载 memory-dream v1.0.3

文件大小: 8.24 KB | 发布时间: 2026-4-12 10:34

v1.0.3 最新 2026-4-12 10:34
Major README enhancement: detailed bilingual docs with 5-phase walkthrough, output examples, FAQ, design principles, and Smart Compact integration guide.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部