Memory Manager for Openclaw

A sophisticated three-tier memory management system for AI agents that handles short-term context, mid-term summaries, and long-term vector storage.

forvendettaw
v1.0.0
Feb 16, 2026
0
1.5k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install monica-three-tier-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 monica-three-tier-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 Memory Manager?

The Memory Manager is a professional-grade architectural tool designed to solve the context window limitations of modern LLMs. By integrating this into Openclaw Skills, developers can provide their agents with a structured memory hierarchy: short-term sliding windows for immediate flow, medium-term summaries for historical continuity, and long-term vector retrieval for permanent knowledge.

This system ensures that agents remain contextually aware without suffering from performance degradation or excessive token costs. It utilizes local storage and efficient vector databases to create a persistent identity for AI agents, allowing them to recall user preferences and past project details across different sessions and workflows.

Memory Manager Use Cases

  • Injecting relevant historical context into new conversation sessions using semantic search.
  • Automatically managing token limits during long development or research tasks by compressing history.
  • Building a persistent personal knowledge base that an agent can query via RAG.
  • Preserving critical user preferences and technical decisions across multiple agent interactions.

How Memory Manager Works

  1. The system initializes the memory infrastructure including JSON structures for immediate context and a ChromaDB instance for vector storage.
  2. Incoming messages are added to a First-In-First-Out (FIFO) sliding window to maintain immediate conversation coherence.
  3. When the token count reaches a configured threshold, the system triggers a background summarization process using cost-effective models.
  4. Summarized data and important dialogue fragments are embedded and stored as vectors in the long-term memory tier.
  5. Upon receiving a new query, the manager performs a semantic search against the vector store to retrieve and inject related past information into the prompt.

Memory Manager Setup

To get started with this memory architecture for Openclaw Skills, follow these steps:

# Initialize the memory management system
python3 scripts/memory_manager.py init

# Add a specific piece of information to the short-term memory
python3 scripts/memory_manager.py add --type short --content "User prefers Python for backend tasks"

# Query the memory tiers for relevant information
python3 scripts/memory_manager.py search "What are the user preferences?"

Ensure you configure your memory/config.yaml to set your desired window_size and summary_threshold values.

Memory Manager Data Schema & Taxonomy

The Memory Manager organizes data across three distinct layers to optimize retrieval speed and context accuracy:

Tier Storage Location Logic Purpose
Short-Term memory/sliding-window.json FIFO Queue Maintains real-time conversation flow.
Medium-Term memory/summaries/ Periodic Compression Saves token-heavy history as concise summaries.
Long-Term memory/vector-store/ ChromaDB (Vector) Provides semantic retrieval for permanent RAG.

Memory Manager Advanced Features

  • Automated token threshold triggers for background summarization to prevent context overflow.
  • Flexible backend support for vector storage, defaulting to high-performance local ChromaDB.
  • Configurable relevance scoring to ensure only the most pertinent long-term memories are retrieved.
  • Multi-model compatibility allowing different LLMs for chat vs. summarization tasks.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*