memory-sleep

Lightweight memory consolidation for OpenClaw agents. Reviews recent daily memory files (`memory/*.md`), extracts durable knowledge, and merges it into `MEMORY.md` without imposing a new file architecture. Triggers: dream, consolidate memory, memory consolidation. Works well with manual runs or a simple nightly cron.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "memory-sleep" with this command: npx skills add balukov/memory-sleep

Sleep — Lightweight Memory Consolidation for OpenClaw

memory-sleep is a small, conservative skill for agents that keep:

  • daily notes in memory/YYYY-MM-DD.md
  • long-term knowledge in MEMORY.md

It does not introduce extra indexes, dashboards, archives, or custom memory schemas. Its job is simple: keep MEMORY.md fresh while daily files remain raw journals.

Use When

  • User says dream
  • User asks to consolidate memory
  • A nightly cron runs the skill
  • Daily memory files are piling up and MEMORY.md is getting stale

Goals

  • Keep the existing OpenClaw-style memory structure
  • Distill durable facts from recent journals
  • Correct stale information in MEMORY.md
  • Avoid over-editing or inventing new structure

Inputs

  • MEMORY.md
  • memory/YYYY-MM-DD.md files

Outputs

  • Updated MEMORY.md
  • Optional short run note appended to today's daily file

Consolidation Flow

1. Orient

  1. Read MEMORY.md
  2. List files in memory/
  3. Focus on recent daily files first

2. Scan Recent Daily Files

Default window: last 7 days.

Extract only durable items such as:

  • preferences
  • decisions
  • recurring facts
  • important project context
  • corrections to stale memory

Ignore or down-rank:

  • routine acknowledgements
  • temporary chatter
  • one-off noise with no lasting value

3. Merge Conservatively into MEMORY.md

Use surgical edits only.

Allowed operations:

  • Add new durable facts
  • Correct stale facts with newer confirmed info
  • Deduplicate overlapping entries
  • Prune clearly obsolete items when confidence is high
  • Absolutize relative dates where useful

Do not:

  • rewrite the whole file unnecessarily
  • create a new memory system
  • add bureaucratic structure unless the file already uses it

4. Optional Journal Marking

For older files already consolidated, optionally prepend a short HTML comment such as:

<!-- consolidated to MEMORY.md on YYYY-MM-DD -->

Never delete journal files.

5. Report Briefly

Return a short summary like:

🌙 Dream complete
- Scanned N daily files
- MEMORY.md: +N added / ~N corrected / -N pruned

Rules

  • Prefer the existing workspace memory architecture
  • MEMORY.md is the primary long-term memory output
  • Daily files remain journals, not databases
  • Be conservative when removing information
  • Avoid leaking secrets into reports or memory summaries
  • If logging the run, keep it short

Recommended Cron

Nightly example:

0 3 * * *

Example job message:

Execute dream skill: consolidate memory

Design Principle

This skill is intentionally minimal.

It is for users who want:

  • lightweight consolidation
  • compatibility with default OpenClaw memory habits
  • no imposed sidecar files unless they choose to add them later

Think of it as a careful editor, not a memory framework.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

Signal Dreaming

Signal-driven memory consolidation for OpenClaw agents. Automatically consolidates recent session logs into long-term memory using recall frequency signals f...

Registry SourceRecently Updated
1390Profile unavailable
Automation

Agent Dream

Nightly memory consolidation and self-reflection for OpenClaw agents. Your agent dreams — reviewing sessions, organizing memories, pruning stale info, and re...

Registry SourceRecently Updated
5215Profile unavailable
Automation

Memory Lifecycle

Systematic memory management for long-running AI agents. Implements a five-tier lifecycle — heartbeat micro-attention, nightly consolidation, weekly reflecti...

Registry Source
1020Profile unavailable
Automation

Cognition

Practical memory architecture for OpenClaw agents. Helps agents remember commitments, retrieve context, prevent repeat mistakes, compile reusable procedures,...

Registry Source
3622Profile unavailable