Dream Memory for Openclaw

A professional-grade four-layer workspace memory management system for AI agents utilizing vector engines and automated session flushing.

shoukuan
v1.0.0
Apr 4, 2026
0
693
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install dream-memory

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 dream-memory 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 Dream Memory?

Dream Memory is a robust memory management framework designed specifically for Openclaw Skills environments. It implements a sophisticated four-layer architecture that transitions seamlessly from high-level Agent rules down to session-level lifecycle tracking. By combining Markdown-based file storage with the OpenViking vector engine and Ollama bge-m3 embeddings, it ensures that AI agents maintain long-term context without losing performance.

The system is engineered to handle real-time logging, long-term memory promotion, and cross-session memory persistence. It solves the common problem of 'context amnesia' by providing a structured taxonomy for user preferences, historical decisions, and ongoing project progress, making it an essential component for any high-stakes AI coding or research agent.

Dream Memory Use Cases

  • Managing long-term project context across multiple AI chat sessions.
  • Synchronizing user preferences and personality profiles (USER.md/SOUL.md) for consistent agent behavior.
  • Automated daily logging and weekly progress tracking for developer workflows.
  • Recovering lost context through session start checks and 'Session End Flush' mechanisms.
  • High-performance vector retrieval of historical topics using OpenViking.

How Dream Memory Works

  1. Instruction Layer: The agent follows logic defined in AGENTS.md to determine when and how to record memory.
  2. Storage Layer: Real-time data is appended to Markdown files, including daily logs (YYYY-MM-DD.md) and task indexes (MEMORY.md).
  3. Retrieval Layer: The OpenViking engine indexes the memory directory, allowing semantic search via bge-m3 embeddings.
  4. Lifecycle Layer: The system monitors session events, triggering a 'Flush' to consolidate memories when a user exits or a timeout occurs.
  5. Validation: Upon a new session start, the system checks the last session's end time against the logs to ensure no data loss occurred during downtime.

Dream Memory Setup

To integrate Dream Memory into your Openclaw Skills environment, follow these steps:

  1. Initialize Directory Structure:
mkdir -p memory/topics memory/archive memory/.data
touch MEMORY.md SOUL.md USER.md WEEKLY-PROGRESS.md
  1. Configure Vector Engine: Ensure Ollama is running with the bge-m3 model for embeddings. Refer to references/ollama-setup.md for specific parameter tuning.

  2. Run Health Check: Use the built-in script to verify memory integrity:

./scripts/memory-check.sh

Dream Memory Data Schema & Taxonomy

Dream Memory organizes data through a strict file-based taxonomy to ensure maximum readability for both humans and agents:

File/Folder Description Size/Constraint
MEMORY.md Long-term memory index < 200 lines / 25KB
memory/ Directory containing daily logs Append-only format
sessions.json Tracks session metadata Internal tracking
.consolidate-lock Prevents race conditions during distillation Binary lock file
SOUL.md Defines Agent personality and traits Static configuration

Dream Memory Advanced Features

  • Session End Flush: Automated summarization of important decisions and new knowledge at the end of a session.
  • Self-Correction Logic: Automated checks to prompt the agent to fill in gaps if a session ended abruptly.
  • Vectorized Topic Search: Semantic retrieval of past discussions using the OpenViking engine.
  • Promotion Rules: Automatic migration of important daily logs into the long-term MEMORY.md index.
  • Cross-Instance Deployment: Standardized memory architecture that can be ported to any new Openclaw Skills instance.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*