Memory System for Openclaw

A comprehensive long-term memory framework for AI agents featuring Markdown-based storage, semantic search, and structured feedback loops.

minmengxhw-cpu
v1.1.0
Mar 31, 2026
0
568
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install enhanced-memory-4types

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-4types 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 robust persistent storage layer designed to give AI agents a long-term memory without the complexity of a dedicated database. By utilizing a local Markdown-based file system, it ensures that your agent's knowledge is human-readable, easily editable, and simple to back up. It is a core component of the Openclaw Skills ecosystem, enabling agents to remember user preferences, project details, and specific technical feedback over long periods.

This skill intelligently manages context by categorizing information into four distinct types: user, feedback, project, and reference. It also includes an automated Memory Flush mechanism that saves context to the file system when token limits are approached, preventing critical information loss during long sessions.

Memory System Use Cases

  • Preserving developer preferences and technical background (e.g., years of experience in specific languages).
  • Implementing bidirectional feedback loops to record both positive affirmations and corrective instructions.
  • Managing project-specific knowledge such as milestones, active contributors, and architectural decisions.
  • Storing external resource pointers like API documentation links, monitoring dashboards, and bug trackers.

How Memory System Works

  1. The system automatically loads relevant memories from the local directory at the start of a session.
  2. During the conversation, the agent identifies key information and classifies it into one of the four memory categories.
  3. The agent uses memory_write to persist data as Markdown files, ensuring portability and transparency.
  4. When the conversation context nears the token threshold, the Memory Flush mechanism triggers an automatic persistence routine.
  5. For retrieval, the system performs a semantic search via Ollama (if configured) or falls back to keyword matching to pull relevant context back into the prompt.

Memory System Setup

Install the memory-system via the Openclaw Skills manager:

clawhub install memory-system

To enable semantic vector search, ensure Ollama is installed and pull the required embedding model:

ollama pull nomic-embed-text

Memory System Data Schema & Taxonomy

The system organizes data in a hierarchical Markdown structure within the defined memory directory:

Directory Memory Type Description
/user User Personal details, goals, and skill levels.
/feedback Feedback Positive and negative corrections with 'Why' and 'How' metadata.
/project Project Status updates, deadlines, and project-specific logic.
/reference Reference External links, system pointers, and resource locations.
MEMORY.md Index A root index file acting as the entry point for all stored memories.

Memory System Advanced Features

  • Bidirectional Feedback Recording: Distinct tracking for positive and negative reinforcement to refine agent behavior.
  • Context Safeguard: Automated token-aware flushing to prevent memory loss in high-volume sessions.
  • Vector-Enabled Semantic Search: Integration with Ollama for deep-context retrieval beyond simple keyword matching.
  • Group Isolation: Support for multi-group environments where memory remains private and independent between different teams or projects.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*