Agent Harness Engineering
Engineers who want to understand and build agent systems, not just use them, on whichever model API they have
Prerequisites: Module 19 or equivalent. Python. An API key for the model you build on; the worked example uses the Claude API and names the Gemini and OpenAI equivalents.
Last verified 2026-09-17
Learning objectives
- Explain the core thesis: agency comes from the model, the product is model plus harness
- Build the minimal agent loop (messages, tool dispatch, stop reason) from scratch
- Add the key harness mechanisms one at a time: permissions, hooks, planning, subagents, skill loading, context compaction
- Understand long-running and multi-agent patterns: task systems, background work, scheduling, agent teams, worktree isolation
- Plug in external capability via MCP
What's in this module
7 lessons · 7 exercises · ~7 min reading
Starts withThe thesis~1 minExecutive summary
You will learn how agents actually work under the hood: the model supplies intelligence, and everything else is a harness you can build. End state is a working minimal agent (loop plus tools plus permissions plus one hook) you wrote yourself, and a mental map of every mechanism in production tools like Claude Code. After this module you can build and reason about agent systems instead of just operating them, evaluate agent products by their harness design, and call yourself a harness engineer with a straight face.
Sources
- Anthropic, "Agent SDK overview", the harness mechanisms in this module as documented primitives: the agent loop, permissions, hooks, sessions, subagents, custom tools: https://code.claude.com/docs/en/agent-sdk/overview
- Anthropic, "How the agent loop works", the reference description of the loop you write by hand above: https://code.claude.com/docs/en/agent-sdk/agent-loop
- Anthropic, "Prompting Claude Opus 5", delegation caps, over-verification, and what to strip from a harness written for an older model: https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-opus-5
- Google, "Function calling with the Gemini API", the tool-call vocabulary for the same loop on Gemini, including remote MCP servers: https://ai.google.dev/gemini-api/docs/function-calling
- Google, Agent Development Kit (ADK), the open-source agent framework for Gemini and other models, with MCP tools: https://adk.dev/
- OpenAI, "Agents", when to build on the Responses API directly and when to use the Agents SDK: https://developers.openai.com/api/docs/guides/agents
- OpenAI, Agents SDK (Python), agents, handoffs, guardrails, sessions and MCP servers as primitives: https://openai.github.io/openai-agents-python/
- shareAI-lab, "Learn Claude Code" (20-lesson harness engineering curriculum, MIT): https://github.com/shareAI-lab/learn-claude-code
- Anthropic quickstarts (autonomous coding agent, computer use): https://github.com/anthropics/claude-quickstarts
- Anthropic courses (tool use): https://github.com/anthropics/courses
Prefer the live room?
This module also runs inside our in-person bootcamps and workshops in Copenhagen.
More in Track F
Prompt Engineering Deep Dive
The complete prompting toolkit, from structure and roles to hallucination control and complex industry prompts, plus how to measure prompt quality with evaluations.
Claude Code for Developers
How to run Claude Code as a professional engineering tool: operating manuals, subagents, hooks, skills, MCP, and git/CI workflows.
Agentic Futures Briefing
Where agentic engineering is heading across three horizons: what's standard practice now, what arrives within a quarter, and what's forming six months out.