Salience | OpenMemory
Understand how OpenMemory calculates Salience (importance) to determine what to keep and what to forget.
Salience
Salience is the measure of how "important" a memory is. In OpenMemory, salience determines:
- Retrieval Priority: High salience memories are more likely to be recalled.
- Decay Resistance: High salience memories decay slower.
Calculation
Salience is calculated based on several factors:
- Recency: Newer memories are more salient.
- Frequency: Memories accessed often gain salience.
- Emotional Intensity: Memories with strong sentiment scores (positive or negative) are boosted.
- Explicit Priority: You can manually set importance.
Manual Control
You can override the calculated salience when adding a memory:
await mem.add("Critical system password", {
salience: 1.0 // Maximum importance, will stick around
});