On v0.9.27 our store had 439 lessons, but default memory_lesson_recall calls returned only a handful, which reads as "agentmemory has almost no lessons." Actual distribution: 438 of 439 active lessons sit at confidence 0.05-0.1, below the default recall threshold - only 1 lesson (0.2%) is visible to a default-parameter recall.
Mechanism (all verified in source):
mem::lesson-recall defaults minConfidence to 0.1 (src/functions/lessons.ts:101), while a second recall path defaults it to 0 (lessons.ts:157-161) - the two defaults are inconsistent.
- Lessons decay at
decayRate: 0.05, so auto-consolidated lessons drift below 0.1 and vanish from default recalls.
lessons.ts:242: if (lesson.confidence <= 0.1 && lesson.reinforcements === 0) deletes the lesson - so a lesson sitting at the visibility floor is also on the verge of silent deletion.
src/config.ts has no AGENTMEMORY_* variable for lesson confidence, decay, or minConfidence (only CONSOLIDATION_DECAY_DAYS, which is unrelated).
Ask:
- Align the two recall defaults (either both 0 or both 0.1).
- Add a config knob (e.g.
AGENTMEMORY_LESSON_MIN_CONFIDENCE) or lower the recall-tool default.
- Surface "N lessons hidden below minConfidence" in the recall response so users know the store is not empty.
Workaround we use: pass minConfidence: 0 explicitly on every recall.
Related but distinct: #274 (lessons not created in consolidation paths), #457/#458 (context injection), #831 (qualityScore heuristics).
On v0.9.27 our store had 439 lessons, but default
memory_lesson_recallcalls returned only a handful, which reads as "agentmemory has almost no lessons." Actual distribution: 438 of 439 active lessons sit at confidence 0.05-0.1, below the default recall threshold - only 1 lesson (0.2%) is visible to a default-parameter recall.Mechanism (all verified in source):
mem::lesson-recalldefaultsminConfidenceto 0.1 (src/functions/lessons.ts:101), while a second recall path defaults it to 0 (lessons.ts:157-161) - the two defaults are inconsistent.decayRate: 0.05, so auto-consolidated lessons drift below 0.1 and vanish from default recalls.lessons.ts:242:if (lesson.confidence <= 0.1 && lesson.reinforcements === 0)deletes the lesson - so a lesson sitting at the visibility floor is also on the verge of silent deletion.src/config.tshas noAGENTMEMORY_*variable for lesson confidence, decay, or minConfidence (onlyCONSOLIDATION_DECAY_DAYS, which is unrelated).Ask:
AGENTMEMORY_LESSON_MIN_CONFIDENCE) or lower the recall-tool default.Workaround we use: pass
minConfidence: 0explicitly on every recall.Related but distinct: #274 (lessons not created in consolidation paths), #457/#458 (context injection), #831 (qualityScore heuristics).