Universal Memory Management (qst-memory) for Openclaw

A universal memory management system for Openclaw agents that optimizes token usage and provides intelligent state-aware context.

zhuangclaw
v1.8.2
Feb 16, 2026
0
0
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install qst-memory-skill

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 qst-memory-skill 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 Universal Memory Management (qst-memory)?

qst-memory is a sophisticated memory management framework built for developers using Openclaw Skills. It provides a robust solution for persistent agent context, utilizing a hierarchical 3-level tree structure to organize data. The system is designed to drastically reduce token consumption (by up to 90%) while improving the relevance of retrieved information through its hybrid search engine.

Beyond simple storage, it features an integrated state machine that tracks agent activities like IDLE, DOING, or WAITING. This version 1.8.2 includes critical loop protection mechanisms and user priority windows, ensuring that automated agents remain efficient without interrupting active user sessions or falling into infinite task loops.

Universal Memory Management (qst-memory) Use Cases

  • Managing persistent context across multi-agent workflows for Openclaw Skills involving specialized personas.
  • Reducing LLM operational costs by implementing intelligent memory decay and high-relevance retrieval.
  • Preventing infinite task loops in automated agent heartbeats through multi-layer stagnation detection.
  • Securing sensitive technical configurations and API keys using industrial-grade AES-128-CBC encryption.

How Universal Memory Management (qst-memory) Works

  1. Data is ingested and automatically classified into a 3-level tree hierarchy using AI inference for high precision.
  2. The system maintains an active state machine (IDLE, DOING, etc.) for each agent, which dictates the intensity of background checks and heartbeat frequency.
  3. When a query is made, a hybrid search engine combines tree matching, geometric neighbor rules, and TF-IDF semantic analysis to fetch context.
  4. A background decay system evaluates memories based on weight (Critical, Important, Normal) and age, archiving or deleting data to keep the memory footprint lean.
  5. The loop protection layer monitors task progress; if a task stagnates or hits a priority-based timeout, the system automatically downgrades or blocks it to save resources.

Universal Memory Management (qst-memory) Setup

To integrate this memory system into your Openclaw Skills environment, follow these steps:

# Install via ClawHub
clawhub install qst-memory

# Or clone from the source repository
git clone https://github.com/ZhuangClaw/qst-memory-skill.git
cd qst-memory-skill

# Set up the heartbeat integration script
cp scripts/heartbeat_integration.py ~/.openclaw/workspace/heartbeat.py
chmod +x ~/.openclaw/workspace/heartbeat.py

# Add to crontab for periodic checks (e.g., every 20 minutes)
(crontab -l ; echo "*/20 * * * * python3 ~/.openclaw/workspace/heartbeat.py") | crontab -

Universal Memory Management (qst-memory) Data Schema & Taxonomy

The qst-memory system organizes data using a combination of Markdown files for content and JSON for state management.

Component Type Description
Memory Entry Markdown Includes Title, Category, Weight, Date, and Tags.
Agent State JSON Tracks status, task description, progress, and priority level.
Event History JSON A timeline of all state changes and task updates.
Configuration YAML Defines search thresholds, decay multipliers, and loop protection limits.
Encryption Key File Secure storage for the AES-128-CBC + HMAC master key.

Universal Memory Management (qst-memory) Advanced Features

  • Multi-Agent Support: Independent state tracking for various agent profiles like qst, mengtian, or custom personas.
  • Anti-Loop Protection: Four layers of safety including heartbeat throttling and priority-based timeout detection for Openclaw Skills.
  • User Priority Window: Intelligently skips system heartbeats during active user interaction to avoid interruptions.
  • Hybrid Search Engine: Combines semantic TF-IDF with hierarchical tree search for 95% relevance accuracy.
  • Memory Encryption: AES-128-CBC and PBKDF2HMAC key derivation for protecting sensitive data-at-rest.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*