QST Universal Memory Management for Openclaw

A sophisticated multi-agent memory and state management system designed to optimize token usage and prevent infinite task loops for Openclaw agents.

zhuangclaw
v1.8.4
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

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 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 QST Universal Memory Management?

QST Universal Memory Management is a high-performance framework built to provide AI agents with a structured, hierarchical memory and a robust state machine. By utilizing a 3-level tree-based classification system, this skill allows agents to store and retrieve information with precision, significantly reducing token consumption by 70-90% compared to flat-file memory systems. It is an essential component for developers building complex Openclaw Skills that require long-term contextual awareness and multi-agent coordination.

The latest version introduces an advanced Agent State System and Anti-Loop Protection. These features allow agents to communicate their current status—such as IDLE, DOING, or WAITING—and automatically detect when a task has stagnated or entered an infinite loop. This ensures that system resources are protected and that agents remain responsive to user priorities through an intelligent heartbeat integration mechanism.

QST Universal Memory Management Use Cases

  • Managing long-term context across multiple specialized agents such as qst, mengtian, and lisi within Openclaw Skills.
  • Minimizing API costs in production environments by using hybrid search to retrieve only the most relevant memory fragments.
  • Deploying long-running autonomous tasks that require state-driven heartbeat monitoring and automatic loop recovery.
  • Securing sensitive technical credentials and API keys within agent memory using industrial-grade AES-128-CBC encryption.

How QST Universal Memory Management Works

  1. The agent initializes its state using the internal state machine, setting the initial mode to IDLE or DOING based on the assigned task.
  2. New information is processed through the Auto-Classification engine, which uses AI inference to place data into a 3-level hierarchical tree structure.
  3. When information is required, the Hybrid Search engine combines Tree Search, Geometric Selection Rules, and Semantic TF-IDF indexing to find the most relevant context.
  4. The system runs a periodic Heartbeat Integration that checks the agent's progress and health, adjusting check frequency based on the current state.
  5. The Loop Protection layer monitors task stagnation; if a task exceeds its priority-based timeout, the system automatically downgrades its priority or blocks the task to prevent resource exhaustion.
  6. Memory Decay logic periodically archives or deletes old data based on assigned weights (Critical, Important, or Normal) to maintain optimal performance.

QST Universal Memory Management Setup

To install this skill via the official registry, run:

clawhub install qst-memory

For manual installation and configuration:

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

Configure your crontab to enable periodic heartbeats for your Openclaw Skills:

# Check every 20 minutes
*/20 * * * * python3 ~/.openclaw/workspace/heartbeat.py

QST Universal Memory Management Data Schema & Taxonomy

The system organizes data into a structured hierarchy defined in config.yaml. Data is stored in Markdown format with embedded metadata.

Memory Metadata Structure

Field Description
Title A descriptive header for the memory entry
Category 3-level path (e.g., Tech/Config/Database)
Weight [C] Critical, [I] Important, [N] Normal
Tags Comma-separated keywords for secondary indexing

Directory Hierarchy

  • qst-memory/: Root directory containing main logic.
  • scripts/: Modular search and maintenance utilities.
  • data/: JSON files for agent-specific state tracking (e.g., qst_doing-state.json).

QST Universal Memory Management Advanced Features

  • Hybrid Search Engine: Merges semantic context awareness with precise tree-based matching for superior retrieval relevance.
  • Anti-Loop Protection: Multi-layered defense including heartbeat throttling, stagnation detection, and priority-based timeouts.
  • AES-128-CBC Encryption: Secure storage for sensitive data using PBKDF2HMAC key derivation.
  • User Priority Window: Automatically suppresses system heartbeats during active user interactions to ensure a seamless conversational experience.
  • State-Driven Heartbeats: Intelligently skips non-essential checks (like voting) when an agent is in the DOING state to minimize interruptions.
  • Decay Multiplier: Dynamic aging algorithm that protects critical data while automatically cleaning up transient chat history in Openclaw Skills.

SKILL.md


Loading

Related Openclaw Skills

Featured*