What problem does it solve? AI agent session logs accumulate over time but are expensive to re-read, causing important decisions, lessons, and commitments to get buried in noise or lost after context compaction and restarts. ## Core Features & Use Cases - Consolidate Mode: Searches recent session logs (JSONL) for decisions, lessons, facts, and TODOs, then distills them into a daily memory file and a durable MEMORY.md. - Defrag Mode: Reviews MEMORY.md to remove stale entries, merge duplicates, resolve inconsistencies, and compress verbose content. - Flexible Search Options: Works with plain grep/jq, Repo Prompt, or an agent's built-in memory_search tool, with no hard dependency on any single platform. - Use Case: After a busy week of agent sessions, run a full REM sleep cycle to extract key decisions from session logs and clean up MEMORY.md so the agent retains only relevant long-term knowledge. ## Quick Start Ask your agent to run REM sleep and consolidate the last few days of session logs into MEMORY.md.