Install
openclaw skills install agent-memory-lifecycleSystematic memory management for long-running AI agents. Implements a five-tier lifecycle — heartbeat micro-attention, nightly consolidation, weekly reflecti...
openclaw skills install agent-memory-lifecycleStructured memory management that makes agents smarter over time — not through code, but through disciplined capture, consolidation, and distillation of context.
Memory management is not about saving tokens. It's about crafting high-signal context that makes a powerful LLM more effective.
Core principles:
Run the setup script to scaffold memory files and create cron jobs:
python3 scripts/setup.py
The script will:
## Recent working memory buffer to MEMORY.mdRun with --dry-run to preview changes without applying them.
Run with --agent <id> to target a specific agent (default: main).
Added to the agent's HEARTBEAT.md. Quick focused pass — capture, promote, tag:
memory/YYYY-MM-DD.mdMEMORY.md → ## Recent[decision], [lesson], [person] for the nightly cycleRead references/nightly-prompt.md for the full cron prompt.
## RecentRules: Never edit daily file content. Never remove from MEMORY.md unless completed AND archived.
Read references/weekly-prompt.md for the full cron prompt.
Read references/monthly-prompt.md for the full cron prompt.
memory/archive/YYYY-MM.md with full narratives of completed workRules: Archive entries must be self-contained. Active items never move to archive.
Read references/yearly-prompt.md for the full cron prompt.
memory/wisdom/YYYY.mdA ## Recent section at the top of MEMORY.md acts as working memory:
## Recent
> Working memory — heartbeat promotes critical items here, nightly cycle processes them.
- **2026-03-23:** Viewing booked Thu 26 Mar 9am with estate agent
- **2026-03-23:** Server upgraded v2.3.13 → v2.3.22
This bridges the gap between raw daily capture and curated long-term memory.
After setup, the memory directory contains:
MEMORY.md ← Active long-term memory (loaded every session)
memory/
YYYY-MM-DD.md ← Daily raw notes (immutable)
people.md ← Contacts, relationships, dynamics
decisions.md ← Key choices with rationale
lessons.md ← Mistakes and learnings (grows, never shrinks)
commitments.md ← Deadlines and obligations
archive/
YYYY-MM.md ← Monthly archives (full narratives)
wisdom/
YYYY.md ← Yearly distilled wisdom
Run the health check to verify the memory system is working:
python3 scripts/health_check.py
Checks: nightly cron status, MEMORY.md size, Recent buffer staleness, structured file freshness.