As your agent runs, it accumulates memories. Some are high-value long-term facts, while others are transient noise or duplicates. Mneno’s Auto-Compaction engine helps keep your memory store lean and useful.Documentation Index
Fetch the complete documentation index at: https://mneno.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
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
| Parameter | Default | Description |
|---|---|---|
max_memories | None | If set, forces the store down to this many memories, prioritizing high scores. |
min_score_to_keep | 0.20 | Memories with a total score below this are candidates for deletion. |
merge_duplicates | True | Whether to merge memories with high token overlap. |
stale_after_days | 180 | Age at which low-importance memories are considered stale. |
preserve_memory_types | [operational, preference] | Memory types that are never automatically discarded. |
preserve_tags | [] | Tags that prevent a memory from being discarded. |
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.