Memory System for Openclaw

A comprehensive memory architecture for AI agents featuring tiered storage, semantic vector search, and automated memory consolidation.

minmengxhw-cpu
v1.2.0
Mar 31, 2026
0
604
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install enhanced-memory-v2

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 enhanced-memory-v2 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 System?

The Memory System is a sophisticated persistence layer designed for AI agents within the Openclaw Skills ecosystem. Unlike basic logging, this system utilizes a structured filesystem-based approach using Markdown files, ensuring zero database dependencies while providing powerful semantic retrieval via Ollama vector search. It allows agents to maintain long-term context across sessions by organizing information into specialized categories like User preferences and Project milestones.

At its core, the system prioritizes context management through a smart Memory Flush mechanism that triggers when token thresholds are reached. By integrating these Openclaw Skills, developers can build agents that not only remember facts but learn from human feedback over time, creating a more personalized and efficient automated workflow.

Memory System Use Cases

  • Storing persistent user personas, coding styles, and technical preferences to ensure consistent AI behavior.
  • Recording bi-directional feedback to help agents replicate successful patterns and avoid previous errors.
  • Managing complex project progression, decision logs, and team-specific documentation.
  • Indexing external reference pointers and system documentation for rapid semantic retrieval.

How Memory System Works

  1. Contextual Capture: The agent identifies relevant information during a session and classifies it into one of four categories: User, Feedback, Project, or Reference.
  2. Vector Embedding: New memories are processed using semantic embeddings (e.g., via Ollama), allowing for high-accuracy retrieval beyond simple keyword matching.
  3. Dynamic Loading: Upon starting a new session, the system automatically loads relevant memory fragments based on the current context.
  4. Persistence & Flush: When the active context window approaches a safety threshold, the system flushes memory to disk to prevent data loss or context overflow.
  5. AutoDream Consolidation: During idle periods, the system runs an automated maintenance task to merge duplicates, remove obsolete data, and re-index the memory files.

Memory System Setup

To install this capability from the library of Openclaw Skills, execute the following command in your terminal:

clawhub install memory-system

Ensure your configuration file (~/.openclaw/config.json) includes the following block to enable vector search and AutoDream features:

{
  "skills": {
    "memory-system": {
      "memoryDir": "~/.openclaw/workspace/memory",
      "vectorEnabled": true,
      "embeddingModel": "nomic-embed-text",
      "autoDream": {
        "enabled": true,
        "minHours": 24
      }
    }
  }
}

Memory System Data Schema & Taxonomy

The system organizes data in a hierarchical directory structure under the designated memory directory:

Directory Data Type Purpose
user/ Markdown Stores user profiles, roles, and long-term preferences.
feedback/ Markdown Contains positive/ (successes) and negative/ (corrections) logs.
project/ Markdown Tracks project-specific progress, goals, and technical decisions.
reference/ Markdown Stores pointers to external resources and system documentation.
MEMORY.md Index The main lookup index for all stored memory fragments.

Memory System Advanced Features

  • AutoDream Maintenance: An automated background process that merges redundant memories and prunes outdated information after 24 hours or 3 sessions.
  • Bi-Directional Feedback: Specifically tracks both what to do (positive) and what to avoid (negative) to prevent AI over-cautiousness.
  • Semantic Search API: High-level tools like memory_search allow agents to query their own history using natural language.
  • Manual Memory Flushing: Force persistence during critical operations using the memory_flush tool.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*