Agents / State
verifiedAgent Memory
The context window is an agent's entire working memory, and it is small and expensive. Anything that has to survive past it must be written somewhere else and fetched back — which turns memory into a retrieval problem: deciding what is worth keeping, and recognising later that it is relevant.
Two tiers. What is in context is immediate and costs tokens on every single request; what is in a store is unlimited and costs a retrieval plus the risk of not being found. Summarising the trajectory compresses the first into fewer tokens and loses exactly the detail nobody knew would matter. There is no correct policy here, only a chosen one.
A trajectory of n steps costs Θ(n) tokens and Θ(n²) attention if kept whole; summarising every k steps holds it at Θ(k) and pays one summarisation call per k steps. The trade is not memory against compute but recall against both, because a lossy summary cannot be un-summarised.
history-tokens holds 50% of the budget; rest holds the remaining 50%.
Context held by past steps against the room left for the current one, in tokens. Drag the history to watch the working space disappear.
Reviewed by opendroid · 2026-08-04
- arXiv:2310.08560 — MemGPT: Towards LLMs as Operating Systems
- arXiv:2304.03442 — Generative Agents: Interactive Simulacra of Human Behavior