Free Course

Context Engineering
for Developers

Your conversation with the AI is less than 1% of what the model actually sees. This course covers the other 99%.

System instructions, tool definitions, conversation history, retrieved documents, metadata you never typed. That's what fills a model's context window; your prompt is maybe 1% of it. This course walks through eight patterns for managing the rest, sequenced so each one builds on what came before, and three of the lessons include exercises using real data from a benchmark I ran across five frontier models.

If you're past the prompt engineering basics and wondering why your agent still falls apart after ten turns, this is where to start.

Progress can't be saved in this browser session. Check if cookies or local storage are blocked.

0 of 8 lessons complete
1

What Is Context Engineering?

The discipline behind what your AI actually sees

~8 min read

Context breaks before it overflows. Long-running agent sessions degrade in predictable ways, and most developers don't notice until the output has already gone to garbage.

2

The Problem: Context Rot

Why agents degrade over time, and how to see it happening

~7 min read + ~30 min exercise

So context rots. The next question is whether you can delay that by being smarter about what goes in and where you put it.

3

Structure & Selection

Put the right information in the right place

~6 min read + ~20 min exercise

Good structure and careful selection buy you time, but context still grows with every turn. At some point the window fills up, and you need a plan for what to compress, what to persist outside the window, and what to let go.

4

Managing Growth

Keep context under control as sessions run long

~6 min read

You can structure context well and manage its growth, but you're still paying full price for every file the model reads, every single turn. One pattern changes that math.

5

The Anchor Turn

Front-load your reads, pay once, cache forever

~4 min read + ~25 min exercise

You've got the right context in the window and it's not growing out of control. Now the question is whether the model actually uses what you gave it, or hallucinates around it.

6

Grounding

Make the model use what you retrieved, not what it imagines

~4 min read

The core patterns apply regardless of what you're building, but the specifics of applying them differ by domain. Pick whichever guide is closest to your use case.

7

Pick Your Domain

Apply what you've learned to your specific use case

~6 min read

This agent has six context engineering problems stacked on top of each other. Find them all, name the pattern that fixes each one, and rewrite the configuration from scratch.

8

Capstone: Fix a Broken Agent

Diagnose and fix an agent with six context engineering problems

~5 min read + ~45 min exercise
Coming soon

This exercise is still being built. Sign up below to get notified when it ships.

Further Reading

These patterns and guides go deeper into specific topics. They're not part of the core path, but worth exploring once you've finished the 8 lessons.

Get notified when new exercises ship

The course is live and growing. Drop your email to hear when new exercises and lessons are added.