memory-tiers
Tiered memory management for AI agents — LRU cache for context. Hot/warm/cold tiers with automatic promotion, demotion, and access tracking.
Why use this skill?
Optimize your AI agent's context window with memory-tiers. Implement a tiered storage hierarchy to manage hot, warm, and cold data automatically.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/chrisrobison/memory-tiersWhat This Skill Does
The memory-tiers skill implements a sophisticated, hierarchy-based context management system for AI agents, functioning similarly to a CPU cache hierarchy. By categorizing memory into three distinct tiers—Hot (Tier 1), Warm (Tier 2), and Cold (Tier 3)—the agent can maintain a lean, responsive context window while retaining access to vast amounts of historical data. The skill automatically tracks access patterns to identify which information is mission-critical and should remain in immediate memory, and which data can be offloaded to long-term archives. It includes comprehensive maintenance scripts that handle promotion and demotion based on activity, preventing context overflow and ensuring the AI stays efficient.
Installation
To integrate this skill into your OpenClaw environment, execute the following command in your terminal: clawhub install openclaw/skills/skills/chrisrobison/memory-tiers
Ensure that you have Node.js installed, as the maintenance and tracking logic relies on the provided scripts within the scripts/ directory. Once installed, integrate the heartbeat routine into your existing agent lifecycle to ensure continuous optimization of your context.
Use Cases
This skill is ideal for agents that manage long-running projects, complex research databases, or personal knowledge bases. It shines in scenarios where an agent must balance immediate, task-relevant context with the ability to recall specific details from weeks or months prior. For example, a coding assistant can keep active documentation in Tier 1, project notes in Tier 2, and deprecated API logs in Tier 3.
Example Prompts
- "Check my current memory health report and show me which files are currently candidates for demotion to the archive."
- "I've been working on the authentication module all day; please promote that section to Tier 1 so the agent can reference it instantly."
- "Run a full maintenance cycle and force a manual demotion of the 'legacy-refactor' notes to Tier 3 to free up space in my active context."
Tips & Limitations
To get the most out of memory-tiers, ensure your configuration aligns with your token usage limits. Tier 1 should be kept compact (roughly 100 lines) to prevent excessive latency in the agent's reasoning process. Regularly review the state/access-log.json to monitor how the agent interprets 'relevance'—this can help you refine your own interaction patterns. Note that while this system automates the movement of data, you should periodically verify the 'Cold' storage manually if you handle sensitive information to ensure compliance with your personal or organizational data privacy policies.
Metadata
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 skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-chrisrobison-memory-tiers": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-write, file-read, code-execution