Step 1 of 82 · Host app → Modeltask + 5 toolsTurn 0 of 12 · context 0 of 2,000 tokens · 0 tokens in all · history: 0 papers
Chapter 5 of 7
Memory, and what survives it
Monday’s storm brings five damaged orders at once, and one customer asks for something the agent must not forget.
This chapter: What does an agent remember, and what does cutting its history lose?
About this chapter
You will learn
- Why the context grows with every result the agent gets back
- What compaction saves, and what a summary can drop
- How pinning keeps the line that has to survive
Words you’ll meet
- Context window
- How much text a model can read in one request, counted in tokens (a token is about ¾ of a word). You met it in RAG, chapter 2.
- Context budget
- The most tokens this host lets one turn send the model. Larkspur’s team set it; it is not the size of any model’s context window.
- Compaction
- The host replacing older history with a short summary, so later turns send less.
- Pinning
- Keeping a line outside the summary: the host sends it every turn and never compacts it.
Step 1 of 6
5 storm-damaged orders. The host re-sends the whole history each turn, within a : its own setting, not any model’s .
Predict first.