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
| Resource | Role | Use it for |
|---|---|---|
| Effective context engineering for AI agents | Mental model | Context rot, the attention budget, compaction, note-taking, sub-agents, just-in-time retrieval (Anthropic, Sept 2025) |
| Hugging Face Context Course | Guided hands-on | Skills, MCP, plugins, sub-agents and hooks, about 2–3 h a unit, with free certificates |
| Context Engineering (DeepLearning.AI with Chroma) | Retrieval depth | A long series; pick the retrieval and memory lessons rather than doing it all |
- Skip what you've covered. Unit 2 of the HF course is MCP. If you've done the MCP path, skim it.
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.
| Technique | What it does | When to reach for it |
|---|---|---|
| Compaction | Summarize the history and restart with the summary | Long conversations near the window limit |
| Clearing tool results | Drop old, bulky tool output | Tool-heavy loops |
| Structured notes | Write progress to memory outside the window | Multi-hour or multi-session tasks |
| Sub-agents | Do focused work in a clean window; return a short summary | Broad research or parallel subtasks |
| Just-in-time retrieval | Keep references; load content with tools when needed | Large corpora and codebases |
Read (~1 h)
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)
- Context Course Unit 3: Plugins. Bundle your skill and an MCP server together.
- Context Course Unit 4: Sub-agents. Measure tokens in the lead agent with and without one.
- 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)
- Context Course Unit 6 (bonus): Nano Harness. Build a minimal agent loop yourself.
- Context Engineering (DeepLearning.AI): choose the retrieval and memory lessons
- 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:
- At least one workflow is a skill that loads on demand, not a standing prompt
- Bulky tool output is cleared or summarized after use
- Long tasks keep notes outside the window and survive compaction
- One sub-agent handles a focused subtask in its own window
- I've measured tokens per task before and after, and quality held or improved
- HF Context Fundamentals certificate earned