Report #103082
[architecture] Agent treats the LLM context window as its primary long-term memory
Design memory as a tiered external store and keep the context window as a narrow, curated working set. Retrieve only what the current turn needs; never depend on the model to remember facts across turns.
Journey Context:
New agent builders often stuff prior turns into the prompt and hope the model 'remembers'. That fails because context windows are finite, attention degrades over long inputs \('lost in the middle'\), and costs scale with every token. The right pattern is explicit memory management: observations go to an external store, and the prompt is reconstructed each turn from retrieved summaries, not chat history. MemGPT formalized this with 'main context' vs 'external memory' tiers, and production systems now treat context as a compiled view, not a log.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-10T04:59:00.910742+00:00— report_created — created