Course outline
Agentic Engineering: the hands-on course · Module 2: Context engineering
The context budget: what the agent actually sees
The agent only knows what is in its context window. Learn what fills it, what it costs, and how to spend it on signal instead of noise.
Lesson 5 / 24 · ⏱ 7 min
In Module 1 we saw the loop: the agent reads, acts, observes, repeats. Every step of that loop happens inside one space, the context window. If something is not in there, the agent does not know it. Full stop.
I think of that window as a budget. Every file read, every command output, every message spends from it. This lesson is about spending it well.
What fills the window
Before you type a single word, part of the budget is already gone. Then the session starts eating the rest.
The proportions change per tool and per task, so don’t read the widths literally. The shape is what matters: the working set is usually the biggest slice, and you control most of it.
Where the budget leaks
Most waste is not the agent’s fault. It comes from habits: dumping whole log files, letting a test runner print thousands of lines, pasting a full spec when one section applies.
✕ Budget leaks
- –Pasting a 5,000-line log so it can find the error
- –Running the whole test suite with verbose output on every step
- –Asking it to read every file in a folder “to get familiar”
- –Keeping one session alive across three unrelated tasks
✓ Budget savers
- +Pasting the stack trace plus the 20 lines around it
- +Running only the tests for the module being changed
- +Naming the two or three files that actually matter
- +Starting a fresh session per task (more in lesson 2.4)
Signal or noise?
Quick game. For each item, decide whether it earns its place in the context for this task: fix a bug where the invoice total ignores discounts.
🎮 Signal or noise?
1 / 8 · Score: 0
Task: fix the invoice total that ignores discounts. Does this belong in the context?
Before you move on
✅ Key takeaways
0 / 4 completed