Context Engineering
7 min read.
Curate a finite context window: watch the budget fill as the loop runs, break down what fills it, apply the select/compress/isolate/persist levers, and avoid context rot.
Think of it this way: The context window is a small desk: only so much fits. Context engineering is choosing which papers to lay out, filing old ones into a one-page summary, and keeping the rest in a drawer you reach into on demand — a cluttered desk slows you down, it doesn't help.
Each agent turn adds 1,300 tokens. Add turns and watch what happens past 80%.
- system prompt and task (always kept)800
Check your understanding
Answer from memory before you scroll back up. Pulling an idea out of your head is what makes it stay there.
Budget the context window
Sort each item by whether it earns its tokens on every call.
Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.
Always worth the tokens
Drop items hereCompress or retrieve instead
Drop items hereQuiz
20 questionsWhy can adding more context to the window hurt an agent?
Done with this lesson?
Sign in free to keep your progress, streak and quiz scores.