fractal-memory
Automated hierarchical memory compression system that prevents context overflow through daily→weekly→monthly→core compression. Use when you need (1) long-term memory management without manual curation, (2) token-efficient context loading with attention-optimized hierarchy, (3) preventing session bloat from accumulated history, (4) automated memory rollups via cron, or (5) migrating from flat daily files to structured memory. Activates for memory architecture questions, context overflow issues, or setting up persistent agent memory.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/bugmaker2/fractal-memoryWhat This Skill Does
The fractal-memory skill is an automated, hierarchical memory management system for OpenClaw agents. It solves the critical problem of context overflow by mimicking biological memory consolidation. Instead of retaining a flat, bloated history of every interaction, the system compresses raw conversation data through a multi-layered structure: daily logs, weekly summaries, monthly rollups, and finally, core permanent memory (MEMORY.md). By processing data in intervals, the agent maintains high-fidelity context for long-term projects without exhausting token limits or degrading performance during reasoning tasks.
Installation
To install, run: clawhub install openclaw/skills/skills/bugmaker2/fractal-memory. After installation, set up the directory structure using mkdir -p memory/diary/{2026/{daily,weekly,monthly},sticky-notes/{workflows,apis,commands,facts}}. Initialize your state files by copying assets/rollup-state.json and heartbeat-state.json into your memory directory. Finally, migrate all scripts from the scripts/ folder to your workspace and ensure your cron daemon is configured to trigger the daily, weekly, and monthly rollup scripts at the designated times (23:59). Update your AGENT.md to include the specified context loading order: TODAY -> THIS WEEK -> THIS MONTH -> MEMORY.md.
Use Cases
This skill is essential for:
- Long-running autonomous projects that require consistency over weeks or months.
- Agents acting as personal assistants that need to retain user preferences and past project decisions.
- Developers needing to keep track of evolving API schemas or complex codebase patterns without manual documentation.
- Users attempting to mitigate token-heavy sessions where session bloat causes the agent to 'forget' early project instructions.
Example Prompts
- "Check my memory: What were the key technical decisions we made regarding the database schema last week?"
- "Please summarize today's progress and ensure it is properly tagged for the weekly rollup tonight."
- "I'm feeling like our current session is getting cluttered. Can you verify the integrity of my memory system and clear out redundant temporary logs?"
Tips & Limitations
- Proactive Logging: Always treat
memory/diary/YYYY-MM-DD.mdas your primary source of truth; if it isn't written there, the rollup process will lose the detail. - Regular Audits: Use
verify_memory_integrity.pymonthly to ensure that the cron jobs successfully triggered and no files were corrupted during the compression cycle. - Token Budgeting: Keep your 'sticky-notes' section lean. This is for timeless facts only; cluttering this directory will negate the performance benefits of the fractal compression model.
- Cron Sensitivity: Ensure your server time zone matches the expected 23:59 execution windows, or the rollover sequence may trigger prematurely.
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-bugmaker2-fractal-memory": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-write, file-read, code-execution