Skip to content
AgenticAIWiki
  1. Learn
  2. Part 11. Context engineering and reliability
  3. Chapter 60

Summarization and compaction

4 lessons · 16 min

Folding a long conversation

Full screen
Context sent each turnTurns 1 to 2040k tokensTurns 21 to 4040k tokensTurns 41 to 50in full, 20k tokensSummariserone model callContext: 100k of 120k threshold

Swipe to change step

Step 1 of 8. A support chat has run for 50 turns. The app resends all of it every time, and it is nearing the threshold set for this agent. Turns 1 to 20 (40k tokens), highlighted. Turns 21 to 40 (40k tokens), highlighted. Turns 41 to 50 (in full, 20k tokens), highlighted. Summariser (one model call).

In this chapter

  1. 60.1Progressive summarization4 min read
  2. 60.2Compaction4 min read
  3. 60.3Context editing and clearing tool results4 min read
  4. 60.4Preserving critical information4 min read

Chapter check

Already know this? Score 80% or more and you can skip ahead. Each attempt draws 4 questions from 12.

Loading check…