How Compaction Works
The compaction engine analyzes your memories and makes one of three decisions for each:- Kept: The memory is high-value or recently updated and remains unchanged.
- Merged: Near-duplicate memories are combined into a single, consolidated memory.
- Discarded: Stale or low-scoring memories are removed to save space and reduce noise.
Preview vs. Compact
Mneno allows you to preview the changes before they are applied to your storage.compact() method:
Compaction Policy
You can control how aggressive compaction is by passing aCompactionPolicy.
Policy Parameters
Explainable Merges
When memories are merged, Mneno creates a new memory that consolidates the metadata and tags of the sources. TheCompactionDiff includes a list of created memories and links them to the merged sources via related_memory_ids.