Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Heuristic:23blocks OS Ai maestro Memory Tier Promotion

From Leeroopedia
Knowledge Sources
Domains Memory, Optimization
Last Updated 2026-10-26 18:00 GMT

Overview

Promote a memory from warm to recurring tier only after it surfaces in 2+ distinct sessions; fade one-session memories after 30 days of no recall.

Description

A single conversation never proves that knowledge will matter again — the same fact surfacing in a different session does. The memory tier system uses session count, not reinforcement count, as the promotion signal. A new memory starts as `warm` (seen in 1 session). When the same knowledge statement surfaces in a second distinct session, it is promoted to `recurring` (the tier called "long" until v0.42). Memories that never recur and are older than 30 days are `faded` — kept on disk but never recalled or injected. A faded card (structured memory) can be revived if it resurfaces in a new session; a faded legacy raw passage cannot.

Deduplication uses embedding distance (`SAME_POINT_DISTANCE = 0.25`) to find candidates, then a Jev classifier decides whether two statements express the same knowledge — because "use CozoDB" and "do not use CozoDB" embed close together but are opposite in meaning. Near-identical wording (distance < 0.12) needs less Jev confirmation (`SAME_POINT_MIN = 0.35` vs 0.5).

Usage

Use this heuristic when:

  • Designing a memory system where repeated exposure should strengthen, not duplicate
  • You need to distinguish "saw it once" from "saw it repeatedly" as a signal of importance
  • Old one-off memories should be retained but not clutter context

The Insight (Rule of Thumb)

  • Action: Track the count of distinct sessions a memory was observed in. Promote to `recurring` at `PROMOTE_AT_SESSIONS = 2`.
  • Value: `PROMOTE_AT_SESSIONS = 2`, `FADE_AFTER_DAYS = 30`, `MAX_EVIDENCE_PER_MEMORY = 12`.
  • Trade-off: 2 sessions is a low bar — it may promote incidental repetition. The trade-off is intentional: a higher threshold would miss genuinely important knowledge that happens to surface in few sessions.
  • Compatibility: Deduplication uses Jev classifier (not embedding distance alone) because semantically close but opposite statements ("use X" vs "do not use X") would falsely reinforce.

Reasoning

Human memory works by rehearsal: repeated exposure strengthens existing traces rather than creating new ones. The same principle applies to agent memory — a fact that appears once may be incidental, but the same fact appearing across sessions is signal. Using session count (not raw occurrence count) prevents a single long conversation from over-weighting a memory through sheer repetition.

The calibration is empirical (dated 2026-09-23): true duplicates showed embedding distance 0.07–0.21 and Jev "same" score 0.55–0.77; different points showed distance 0.29–0.44 and Jev "same" 0.02–0.30. A single Jev cutoff of 0.75 sat on the edge and missed 3 of 4 true repeats, so recurrence (the whole point) never built weight. The current thresholds (distance 0.25, Jev 0.5) were set from this data.

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment