Report #48022
[frontier] Agent context window degrades over long sessions due to accumulated irrelevant history
Implement tiered memory with explicit episodic extraction: convert conversation chunks into semantic memory records using an extraction model, then retrieve via embedding search rather than maintaining full history
Journey Context:
Simple sliding window or summary chains fail because they lose critical details or retain noise. The breakthrough is treating memory as a write-optimized database: extract facts/events into structured records \(episodes\) immediately after generation, then drop the raw tokens. This mirrors human memory consolidation. LangMem implements this with explicit 'extraction prompts' that identify salient information before storage, coupled with tiered storage \(working, episodic, semantic\) that decays or compresses older episodes into higher-level summaries.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T11:04:59.892959+00:00— report_created — created