Mindket
IntermediateFree

Context engineering: give an AI agent the right context at each step

A black banner titled "Context engineering" over the line "What an AI agent sees at each step".

This free context engineering course has four lessons for people who build or run AI agents. You will learn what fills a model's context window on each turn and why answers get worse as it grows. Then you keep an agent on track over long tasks with compaction and notes, and load files and tool results only when a step needs them.

What you'll be able to do

  • Explain what context engineering is and how it differs from writing a single prompt.
  • Spot context rot and keep the context an agent carries small and relevant.
  • Give an agent memory across long tasks with compaction, notes and a memory tool.
  • Load files, search results and tool output just in time instead of all at once.
All courses

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

  1. 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.7 min
  2. 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.8 min
  3. 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.11 min
  4. 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.9 min

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.

Share this course

Give your agent more to work with

Browse the MCP servers on Mindket. Each one lets an AI agent fetch files, data or tool results only when a task needs them.

Browse MCP servers

All courses · All articles