
Memory Management
This implements a three-tier memory system for AI agents: hot memory in MEMORY.md with P0/P1/P2 tags and TTLs, cold searchable storage in JSONL lesson files, and raw daily logs. The hook is the 70-80% token reduction claim, which makes sense since you're only loading ~200 lines of current context instead of everything. Comes with a Python janitor script that auto-archives expired entries based on priority and date tags. The discipline of deciding what's P0 versus P2 is actually the hard part here, not the tooling. If you're running long-lived agents that accumulate context bloat, this gives you a structured way to prune without losing important stuff to semantic search.
- skills.sh installs
- 229
- GitHub stars
- 39
- last updated
- Aug 21, 2026
Install
$ npx -y skills add jzocb/openclaw-memory-management --skill memory-management --agent claude-codeInstalls into .claude/skills of the current project.
Files
Memory Management Skill
Manage agent memory efficiently using a three-layer architecture with automatic archival.
Quick Setup
- Format MEMORY.md with priority tags:
- [P0] Core identity item (never expires)
- [P1][2026-02-10] Active project (90-day TTL)
- [P2][2026-02-10] Temporary item (30-day TTL)
- Set up auto-archive cron:
0 4 * * * python3 ~/.openclaw/workspace/scripts/memory-janitor.py
- Store lessons in
memory/lessons/*.jsonl:
{"id": "lesson-001", "date": "2026-02-10", "category": "infra", "title": "Problem title", "problem": "What happened", "solution": "How to fix", "tags": ["tag1"]}
Three-Layer Architecture
Layer 1: Hot Memory (MEMORY.md)
- Always loaded, ≤200 lines
- P0: Core identity, never expires
- P1: Active projects, 90-day TTL
- P2: Temporary, 30-day TTL
Layer 2: Cold Memory (searchable)
memory/lessons/*.jsonl— structured lessonsmemory/archive/— expired content- Use
memory_searchto recall
Layer 3: Raw Logs
memory/YYYY-MM-DD.md— daily logs- Not loaded automatically
Priority Guidelines
Sponsors
Details
- Repository
- github.com/jzocb/openclaw-memory-management
- Categories
- AI & Agent Building, Productivity & Planning, Automation & Workflows
- First seen
- Jun 3, 2026