# 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/raw` - `DELETE /memory/{id}` - temporal clustering (`gap-minutes`) - LLM segment extraction + summary writer - dry-run reporting ## Operating mode - default dry-run - `--apply` to mutate memory state - bounded deletions with `--max-deletes` ## Design notes - write compacted summary before deleting old entries - annotate summaries with provenance metadata (`segment_source_ids`, extraction) - set `metadata.created_at` to the segment end timestamp so summary ordering stays intact ## Next steps 1. Add rollback snapshot file before apply 2. Add explicit per-user allowlist 3. Add cron integration helper (OpenClaw cron payload template) 4. Add quality checks pre/post compaction