name: openclaw-memorybox description: "Memory health CLI that diagnoses bloated MEMORY.md files, splits oversized sections into domain files, archives stale daily logs, and runs continuous health monitoring. Use when MEMORY.md exceeds 10KB, context windows overflow from memory bloat, or agent sessions slow down from loading large memory files. Pure bash, zero dependencies." version: 2.2.0 author: Ramsbaby license: MIT tags: [memory, maintenance, cli, devtools, zero-dependency]
OpenClaw MemoryBox
Install with:
clawhub install openclaw-memorybox
Memory health CLI for AI agents — diagnoses, splits, archives, and monitors MEMORY.md to prevent context overflow.
Commands
memorybox doctor— Full diagnostic: health score, size analysis, duplicates, stale contentmemorybox split— Interactive: move large sections tomemory/domains/memorybox health— Quick health score (0–100)memorybox archive— Move daily logs older than 14 days tomemory/archive/memorybox watch— Background daemon: alerts when health drops below threshold
Install
clawhub install openclaw-memorybox
Or manually:
curl -sSL https://raw.githubusercontent.com/Ramsbaby/openclaw-memorybox/main/install.sh | bash
Recommended Workflow
- Run
memorybox init ~/openclawto set up the 3-tier directory structure - Run
memorybox doctor ~/openclawto get a full diagnostic - Run
memorybox split ~/openclawfor any flagged sections - Verify with
memorybox health ~/openclaw— target score above 80 - Run
memorybox archive ~/openclawto clean up old daily logs
Optional: Weekly Health Cron
Add to your OpenClaw tasks.json:
{
"id": "memory-health-weekly",
"name": "Weekly Memory Health Check",
"schedule": { "kind": "cron", "expr": "0 23 * * 0", "tz": "Asia/Seoul" },
"payload": {
"kind": "agentTurn",
"message": "Run: memorybox doctor ~/openclaw. If score < 80, run memorybox split and report."
}
}
Compatibility
- macOS 12+ / Linux (bash 3.2+)
- OpenClaw agents, Claude Code, any markdown-based memory system
- Zero external dependencies — pure bash