Dreaming Optimizer for Openclaw

A sophisticated memory consolidation engine that uses an REM-inspired six-step process to refine and persist AI agent knowledge.

chongjie-ran
v1.0.0
Apr 17, 2026
0
705
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install dreaming-optimizer

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 dreaming-optimizer 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 Dreaming Optimizer?

Dreaming Optimizer is a specialized utility designed to manage the lifecycle of AI agent memories within the ecosystem of Openclaw Skills. Inspired by the REM stage of human sleep, it performs essential background maintenance on raw interaction logs, transforming them into a structured, high-signal long-term memory store.

By leveraging LLM-based scoring and semantic analysis, the skill ensures that only valuable, non-redundant information is promoted to the agent's persistent B-layer. This prevents memory bloat and significantly improves the retrieval accuracy of your AI agents during long-term projects.

Dreaming Optimizer Use Cases

  • Periodic cleanup of daily interaction logs to maintain a high-quality knowledge base.
  • Automated deduplication of redundant facts gathered across multiple chat sessions.
  • Categorizing raw data into distinct buckets like facts, preferences, and context for better agent reasoning.
  • Generating traceable REM consolidation reports to audit what an AI agent has learned and why.

How Dreaming Optimizer Works

  1. Organize: The system reads raw daily markdown logs from the workspace memory directory.
  2. Score: An LLM-based entry scorer assigns a priority value (0-100) to each piece of information.
  3. Deduplicate: Semantic similarity checks are performed against existing SQLite memories to prevent repeats.
  4. Tag: A fact tagger labels entries with metadata such as preference, context, or hard fact.
  5. Commit: Validated and optimized entries are written to the persistent B-layer SQLite database.
  6. Summarize: The process concludes by generating a Dreaming Summary report for user review.

Dreaming Optimizer Setup

To get started with this component of Openclaw Skills, ensure you have the required dependencies and run the optimizer via the CLI:

# Install required python dependencies
pip install tiktoken sqlite3

# Run the optimization process with default settings
dreaming-optimizer/bin/optimize.sh

# Run with a custom importance threshold (e.g., 80%)
dreaming-optimizer/bin/optimize.sh --threshold 80

Dreaming Optimizer Data Schema & Taxonomy

The skill manages data across markdown files and relational databases to ensure durability and accessibility:

Data Type Location Format
Input Logs ~/.openclaw/workspace/memory/YYYY-MM-DD.md Markdown
Persistent Store ~/.openclaw/memory/<agent>.sqlite SQLite (B-layer)
Reports ~/.openclaw/workspace/memory/dreaming-summaries/ Markdown
Config dreaming-optimizer/config/default_threshold.yaml YAML

Dreaming Optimizer Advanced Features

  • LLM-powered priority scoring to distinguish between trivial chatter and critical project data.
  • Semantic deduplication to merge similar concepts even if phrased differently.
  • Automated backfill queue (Pro feature) for processing historical interaction logs.
  • Obsidian export support for users who want to visualize their AI's memory in a second brain environment.
  • Configurable retention thresholds to control the density of the long-term memory store.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*