Who it's for
For people who build AI agents or use coding agents such as Claude Code every day. Know the basics of prompts and the context window first. Two lessons' code examples are in Python. The other two show shell commands, a YAML config, a JSON request and a TypeScript sketch.
Lessons
- 1What is context engineering? Everything an AI agent sees on each callContext engineering decides what an AI agent sees on each call: instructions, tools, history, files and tool results. Follow one value through Python code.
- 2Context rot: why long context makes AI answers worseContext rot is the drop in accuracy as a model's input grows. See what the studies measured, run a needle test on your own model and learn what to cut.
- 3AI agent memory: compaction, tool-result clearing and a memory toolAI agent memory for long tasks: when to compact the conversation, when to clear old tool results and when the agent should keep notes with a memory tool.
- 4Just-in-time context: load files, tools and results when a step needs themJust-in-time context for AI agents: keep file paths and queries instead of contents, and load files, tools and results only when a step needs them.
Frequently asked questions
Is this context engineering course free?
Yes. Every lesson is free to read. The examples call model APIs, and those providers may bill for their use.
What is the difference between prompt engineering and context engineering?
Prompt engineering writes the instructions. Context engineering decides everything the model sees on each turn, the instructions included, plus tool definitions, files, earlier messages, memory and the results of each step.
Does a bigger context window remove the need for it?
No. Anthropic's context engineering guide notes that a model recalls information less accurately as its context grows, so a bigger window still needs care about what goes in it.
What should I learn after this course?
The harness engineering course is next. It covers the code around an AI agent: its tools, its loop, how it keeps working for hours and what it is allowed to do.
