PROJECT: memory-compactor
Aim
Compact noisy conversational memory stretches (especially debug sessions) into durable resolved summaries while preserving recall quality.
Current implementation
- HTTP client for custom mem0 server endpoints:
POST /memories/all
POST /memories
DELETE /memory/{id}
- temporal clustering (
gap-minutes)
- debug-arc heuristic and compact summary writer
- dry-run reporting
Operating mode
- default dry-run
--apply to mutate memory state
- bounded deletions with
--max-deletes
Design notes
- keep newest item in each compacted cluster as guardrail
- write compacted summary before deleting old entries
- annotate summaries with provenance metadata (
compacted_from_ids)
Next steps
- Add rollback snapshot file before apply
- Add explicit per-user allowlist
- Add cron integration helper (OpenClaw cron payload template)
- Add quality checks pre/post compaction