lerim maintain¶
Refine existing memories offline (cold path).
Overview¶
Cold-path: offline memory refinement. Scans existing memories and merges duplicates, archives low-value items, and consolidates related memories. Archived items go to memory/archived/{decisions,learnings}/. Requires a running server (lerim up or lerim serve).
Syntax¶
Parameters¶
--force
boolean
default: off
Force maintenance even if a recent run was completed.
--dry-run
boolean
default: off
Record a run but skip actual memory changes.
Examples¶
lerim maintain # run one maintenance pass
lerim maintain --force # force maintenance even if recently run
lerim maintain --dry-run # preview only, no writes
What maintenance does¶
- Scan — Load all existing decision and learning files from
memory/ - Merge duplicates — Identify and consolidate similar memories
- Archive low-value — Move memories with low effective confidence to
memory/archived/ - Consolidate — Group and strengthen related learnings
- Apply decay — Reduce confidence for memories that haven't been accessed recently
Non-destructive
Maintenance is non-destructive — archived memories are moved to memory/archived/ rather than deleted.
Related commands¶
-
lerim sync
Index and extract new memories
-
Background loop
Sync + maintain intervals (inside
lerim serve)