Tiered Memory System for Openclaw

A sophisticated three-tier memory architecture that mimics human cognition to provide AI agents with efficient, hierarchical, and long-term context retention.

bowen31337
v2.2.0
Feb 14, 2026
0
1.6k
2

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install tiered-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 tiered-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 Tiered Memory System?

The Tiered Memory System is a professional-grade memory architecture designed to solve the context window limitations of modern LLMs within Openclaw Skills. By organizing information into Hot, Warm, and Cold tiers, it ensures that agents retain critical identity data and active project context while archiving historical facts in a searchable, tree-structured index. This system is inspired by human cognition, utilizing relevance decay and strategic forgetting to keep agent responses sharp and focused.

Unlike standard vector-based RAG, this skill employs a vectorless retrieval method based on LLM reasoning and a PageIndex-inspired tree structure. This allows for O(log n) navigation of categories, ensuring that retrieval is not only fast but also explainable and highly accurate. With its cloud-first design, the soul of your agent lives in the cloud, allowing for seamless synchronization across multiple devices and robust disaster recovery.

Tiered Memory System Use Cases

  • Maintaining long-term agent identity, owner preferences, and relationship history over years of interaction.
  • Organizing complex project technical architectures and decisions into a hierarchical, searchable category tree.
  • Automatically distilling daily conversations into structured facts while preserving critical metadata like URLs and shell commands.
  • Managing memory for multiple independent agents using scoped IDs within a single deployment.
  • Validating daily notes to ensure technical information like documentation links and installation commands are not missing.

How Tiered Memory System Works

  1. The system ingests raw conversation text or daily notes and passes them through a distillation engine to extract core facts.
  2. Extracted facts are assigned an importance score and categorized within a hierarchical tree index.
  3. Recent facts are stored in the Warm Memory tier where they undergo a periodic decay process based on age and access frequency.
  4. High-importance items like core identity and active tasks are promoted to the Hot Memory tier, which is always present in the agent context.
  5. Aging or low-scored memories are archived into the Cold Memory tier (powered by Turso) to maintain a lean and efficient active context window.
  6. During retrieval, the system uses LLM reasoning to navigate the tree index and fetch only the most relevant memory nodes for the current query.

Tiered Memory System Setup

To integrate this memory architecture into your Openclaw Skills, follow these installation steps:

# Install the tiered-memory skill
clawhub install tiered-memory

# Configure your Turso database credentials for cloud sync
export TURSO_URL="your-database-url"
export TURSO_TOKEN="your-auth-token"

# Initialize the cold storage tables
python3 skills/tiered-memory/scripts/memory_cli.py cold --init --db-url $TURSO_URL --auth-token $TURSO_TOKEN

# Rebuild the initial hot state
python3 skills/tiered-memory/scripts/memory_cli.py consolidate --mode daily

Tiered Memory System Data Schema & Taxonomy

The skill manages information across several specialized files and database tables to optimize retrieval performance.

Component Format Max Size Description
Hot Memory JSON 5KB Core identity, owner profile, and active context (always in-context).
Warm Memory JSON 50KB Distilled facts from the last 30 days with decay scoring.
Cold Memory SQL Unlimited Long-term archive stored in Turso DB for historical queries.
Tree Index JSON 2KB Hierarchical category map for efficient navigation.
Metrics JSON N/A Observability data tracking token savings and retrieval counts.

Tiered Memory System Advanced Features

  • LLM-powered semantic tree search that reasons about category relevance rather than relying on simple keyword similarity.
  • Automated metadata extraction engine that identifies and preserves URLs, shell commands, and file paths during distillation.
  • Multi-tier consolidation modes (Quick, Daily, Monthly, Full) for automated maintenance and tree pruning.
  • Cloud-first synchronization that backs up critical hot state and index structure after every conversation for multi-device persistence.
  • Proactive memory validation that flags incomplete technical notes or missing documentation links.

SKILL.md


Loading

Related Openclaw Skills

Featured*