memory-sleep for Openclaw

A conservative memory consolidation skill that distills durable facts from daily agent journals into a permanent long-term memory file.

balukov
v1.0.0
Apr 6, 2026
1
831
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install memory-sleep

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install memory-sleep using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is memory-sleep?

memory-sleep is a lightweight and conservative skill designed for AI agents to manage their long-term knowledge base. It focuses on the transition of information from temporary daily journals, usually stored in memory/*.md, into a primary MEMORY.md file. By utilizing this contribution to Openclaw Skills, developers can ensure their agents maintain a high-fidelity long-term memory without the overhead of complex database architectures or custom indexing systems.

The skill operates on the principle of minimal intervention, performing surgical edits to maintain the existing workspace structure. It effectively turns raw daily interactions into refined, actionable knowledge by extracting preferences, decisions, and recurring facts while filtering out the noise of temporary session chatter.

memory-sleep Use Cases

  • Triggered manually when a user issues a dream command to sync agent knowledge.
  • Executed automatically via a nightly cron job to prevent daily journal files from becoming unmanageable.
  • Used to consolidate sprawling session notes into a clean, searchable long-term context.
  • Updating stale information in the master memory file based on more recent, confirmed interactions.

How memory-sleep Works

  1. The skill begins by reading the current MEMORY.md and listing all files within the memory/ directory to establish context.
  2. It scans recent daily files, typically focusing on a 7-day window, to identify durable information like project decisions or user preferences.
  3. Facts are extracted and filtered, prioritizing recurring data and corrections while ignoring one-off noise and routine acknowledgments.
  4. The skill performs a conservative merge into MEMORY.md, using surgical edits to add, update, or prune entries without rewriting the entire file.
  5. Optionally, it marks processed journal files with an HTML comment to track consolidation status without deleting the original records.
  6. A brief summary report is generated, detailing the number of files scanned and the specific edits made to the long-term memory.

memory-sleep Setup

To deploy memory-sleep within your Openclaw Skills environment, ensure your agent has access to a standard memory directory structure. No complex installation is required beyond configuring the skill triggers.

# Trigger memory consolidation manually
OpenClaw: dream

# Recommended cron configuration for nightly maintenance
0 3 * * * "Execute dream skill: consolidate memory"

memory-sleep Data Schema & Taxonomy

The skill manages information across two primary file types to ensure compatibility with standard Openclaw Skills memory habits:

File Path Description Content Policy
MEMORY.md Long-term Knowledge Durable facts, preferences, and project context.
memory/YYYY-MM-DD.md Daily Journals Raw interaction logs used as the source for consolidation.

During the consolidation process, relative dates (e.g., "next Tuesday") may be absolutized into specific dates to ensure long-term clarity within the MEMORY.md file.

memory-sleep Advanced Features

  • Intelligent Distillation: Automatically distinguishes between temporary session noise and durable knowledge.
  • Surgical Edits: Modifies only the necessary lines in the long-term memory file to prevent file bloat or corruption.
  • Relative Date Normalization: Converts relative time references into absolute timestamps for better historical accuracy.
  • Non-Destructive Workflow: Maintains original journal files as an audit trail while marking them as processed via HTML comments.
  • Multi-Trigger Support: Works seamlessly via direct user intent, automated scheduling, or system-level hooks within Openclaw Skills.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*