Tiered Context Manager for Openclaw

A sophisticated multi-agent context management system providing tiered compression and hierarchical memory storage for optimized AI performance.

scorpioxyb
v1.0.0
Apr 4, 2026
0
605
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install tiered-context-manager

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-context-manager 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 Context Manager?

The Tiered Context Manager is a robust solution designed to handle the complexities of long-term AI sessions and multi-agent collaboration. By implementing a sophisticated L1, L2, and L3 compression strategy, it ensures that your Openclaw Skills maintain high performance even as conversation history grows, preventing context window overflow while minimizing token costs.

This skill goes beyond simple truncation by providing a structured memory hierarchy—categorizing data into Persistent, Normal, and Ephemeral tiers. This allows agents to retain critical knowledge for up to a year while automatically pruning transient data, facilitating seamless cross-agent knowledge sharing and conflict resolution.

Tiered Context Manager Use Cases

  • Managing long-running AI conversations that exceed standard token limits.
  • Synchronizing memory and knowledge across multiple specialized AI agents.
  • Reducing API costs by using intelligent L1/L2 compression before resorting to AI-driven summaries.
  • Implementing automated data retention policies for AI-generated logs and session data.

How Tiered Context Manager Works

  1. The Real-time Monitor tracks the token usage and session size against predefined thresholds.
  2. When usage hits 75%, L1 compression triggers to truncate the oldest tool results.
  3. At 90% usage, L2 compression generates a basic summary of the first half of the conversation.
  4. If usage reaches 95%, L3 compression uses an AI agent to create a highly dense, intelligent summary of the entire context.
  5. The Memory Tiering module then sorts this information into Persistent (365 days), Normal (30 days), or Ephemeral (7 days) storage based on importance.

Tiered Context Manager Setup

To integrate this into your environment, follow these steps:

# Navigate to your Openclaw directory and install dependencies
cd skills/tiered-context-manager
npm install

# Run a scan to check current session context health
node scripts/tiered_standalone.js scan

# Execute tests to ensure compression logic is active
node scripts/run_tests.js

Ensure your config/default.json is updated with your desired compression thresholds for Openclaw Skills.

Tiered Context Manager Data Schema & Taxonomy

The system organizes context and memory using a tiered architecture and specific file modules:

Level Retention Purpose
Persistent 365 Days Core knowledge and user preferences
Normal 30 Days Active project context and recent history
Ephemeral 7 Days Temporary variables and tool execution logs

Key Modules:

  • tiered-engine.js: Primary entry point for L1/L2/L3 logic.
  • l3_ai_compressor.js: Handles AI-driven intelligent summarization.
  • cross_agent_context.js: Manages the inbox queue and shared memory between agents.

Tiered Context Manager Advanced Features

  • Intelligent L3 AI Compression for high-density information retention.
  • Cross-agent collaboration via shared memory and task inbox queues.
  • Automated conflict resolution for multi-agent data writes.
  • Detailed compression statistics and performance reporting for Openclaw Skills optimization.
  • Real-time threshold monitoring with customizable hooks for custom logic.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*