ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified productivity Safety 4/5

memory-manager

三级记忆管理系统 (Three-Tier Memory Management)。用于管理 AI 代理的短期、中期、长期记忆。包括:(1) 滑动窗口式短期记忆,(2) 自动摘要生成中期记忆,(3) 向量检索长期记忆 (RAG)。当需要管理对话历史、优化上下文、构建个人知识库、或实现记忆持久化时使用此 Skill。

Why use this skill?

Enhance your AI agent with OpenClaw Memory Manager. Implement short-term, summary-based medium-term, and vector-based long-term RAG memory for consistent, persistent AI.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/forvendettaw/three-tier-memory-v2
Or

What This Skill Does

The Memory Manager Skill is a sophisticated three-tier framework designed to optimize the context window and continuity of OpenClaw AI agents. By segmenting information into Short-term, Medium-term, and Long-term storage, it prevents model degradation due to context bloat while ensuring deep, persistent recall.

  1. Short-term Memory (Sliding Window): Acts as a FIFO (First-In-First-Out) buffer. It keeps the last N interactions immediately available, ensuring the AI maintains the thread of the current conversation without effort.
  2. Medium-term Memory (Auto-Summarization): Monitors token usage. Once a specific threshold is reached, the skill triggers a summarization process that compresses the historical data into a concise narrative, effectively preserving the 'gist' of conversations while freeing up context space.
  3. Long-term Memory (Vector RAG): Utilizes ChromaDB to store high-value information as vector embeddings. This allows the AI to perform semantic searches, pulling in relevant personal history or domain knowledge even across sessions.

Installation

To install the skill, execute the following command in your terminal:

clawhub install openclaw/skills/skills/forvendettaw/three-tier-memory-v2

Once installed, initialize the system using python3 scripts/memory_manager.py init and configure your settings in memory/config.yaml to match your specific hardware and API requirements.

Use Cases

  • Personalized Assistance: Maintain a consistent personality and remember recurring user preferences (e.g., 'the user prefers concise, professional answers').
  • Project Management: Track long-term project status across multiple work sessions, allowing the AI to 'remember' previous feedback or architectural decisions.
  • Knowledge Management: Build a self-growing knowledge base where the AI automatically categorizes and stores key information gained during daily interactions for later retrieval.

Example Prompts

  1. "Look through my long-term memory and summarize all the technical decisions we made about the database schema last week."
  2. "I'm starting a new conversation. Can you search your memory for my preferred coding style and previous project constraints?"
  3. "Summarize the current project status based on our recent chat history and update the vector store for future reference."

Tips & Limitations

  • Token Management: Always monitor your summary_threshold. Setting it too low may lead to frequent API calls to your summarization model, increasing costs.
  • Relevance: The long-term min_relevance parameter in config.yaml acts as a filter. If the AI is not retrieving enough relevant context, try lowering this threshold (e.g., from 0.7 to 0.6).
  • Limitations: This system relies on local file storage. Ensure your environment has sufficient disk space for the vector database, especially if you are processing massive amounts of historical conversation data.

Metadata

Stars2387
Views1
Updated2026-03-09
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-forvendettaw-three-tier-memory-v2": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#memory#rag#context-management#automation#vector-db
Safety Score: 4/5

Flags: file-write, file-read