Skip to content
All learning paths

Study notes · three weeks · 2–3 h a week

Context Engineering

Long-running agents fail when their context fills with noise. This path starts from one essay that names the problems, then works through a hands-on course that builds the fixes into real coding agents.

The core material

ResourceRoleUse it for
Effective context engineering for AI agentsMental modelContext rot, the attention budget, compaction, note-taking, sub-agents, just-in-time retrieval (Anthropic, Sept 2025)
Hugging Face Context CourseGuided hands-onSkills, MCP, plugins, sub-agents and hooks, about 2–3 h a unit, with free certificates
Context Engineering (DeepLearning.AI with Chroma)Retrieval depthA long series; pick the retrieval and memory lessons rather than doing it all

01 / Week 1

Principles and skills

Learn why more context can make an agent worse, then package know-how as skills that load only when needed.

TechniqueWhat it doesWhen to reach for it
CompactionSummarize the history and restart with the summaryLong conversations near the window limit
Clearing tool resultsDrop old, bulky tool outputTool-heavy loops
Structured notesWrite progress to memory outside the windowMulti-hour or multi-session tasks
Sub-agentsDo focused work in a clean window; return a short summaryBroad research or parallel subtasks
Just-in-time retrievalKeep references; load content with tools when neededLarge corpora and codebases

Source: Anthropic, Effective context engineering

Do (~2 h)

  • Context Course Unit 0: onboarding: needs a code agent such as Claude Code, Codex or OpenCode
  • Context Course Unit 1: Agent Skills. Write a SKILL.md for one workflow you repeat at work.

CheckpointFor one agent you run, name its biggest source of wasted tokens and which technique above you'd apply.

02 / Week 2

Plugins, sub-agents and hooks

Bundle context for reuse, split work across clean windows, and observe or block steps in the agent loop.

Do (~3 h)

  1. Context Course Unit 3: Plugins. Bundle your skill and an MCP server together.
  2. Context Course Unit 4: Sub-agents. Measure tokens in the lead agent with and without one.
  3. Context Course Unit 5: Hooks. Add a hook that blocks a risky command and one that logs every tool call.

CheckpointYou can show token counts for one task before and after adding a sub-agent, and explain the difference.

03 / Week 3

Retrieval, memory and a harness from scratch

Go below the tools: build a minimal agent loop and decide what it retrieves and remembers.

Do (~3 h)

  1. Context Course Unit 6 (bonus): Nano Harness. Build a minimal agent loop yourself.
  2. Context Engineering (DeepLearning.AI): choose the retrieval and memory lessons
  3. Add compaction and a notes file to your harness, then run it on a task that outlasts one window.

CheckpointYour harness finishes a task that needs more than one context window without losing track of its goal.

Capstone

Tune one real agent's context. Done when every line holds:

Reference links