Index Ai Academy
Phase 10 · Agent harnessesHarness foundations

What an agent harness is

About 30 minLooking ahead: some prerequisites aren't done yet

Why this matters

A model on its own only turns text into text. Everything that makes it an agent, the loop, the tools, the permissions, the memory, is software around it called a harness. Two products using the same model can differ enormously because of their harnesses. Claude Code is a model plus a very good harness. This phase teaches you to build one: to customize agents, debug them, and judge the ones you're offered.

  • Tell the model apart from the harness, and list what a harness is responsible for
  • Recognize the three meanings of "harness": agent, test and evaluation harnesses
  • Choose between a hand-built loop, the SDK's tool runner, the Claude Agent SDK and managed agents
  • Build a minimal harness with a scripted model, pluggable tools and an event log

Engine and car

Think of the model as an engine. It's the source of power, but an engine on a workbench goes nowhere. The harness is the rest of the car: wheels, brakes, fuel system, dashboard. A great engine in a bad car is a bad car.

A model call does exactly one thing: it reads a request (system prompt, messages, tool definitions) and returns a response (text, maybe tool_use blocks, and a stop_reason). Everything else is the harness:

harness partits joblessons
the loopcall the model, run its tools, feed results back, know when to stopcore loop
toolsthe actions on offer, their schemas and how they runregistry, files, execution
permissionswhich actions need a person's approvalpermissions
hooks and skillslet users and plugins change behavior; load know-how on demandhooks and skills
context managementkeep the conversation inside the window and cheapcontext
memory and planningcarry work across long tasks and new sessionsmemory and plans
subagentshand off focused sub-tasks to fresh contextssubagents
sessions and UIstream output, allow interrupts, save and resumesessions
observability and limitslogs, traces, costs, loop detectionproduction

In plain words: the model only ever writes a reply. The harness is everything that acts on that reply.

You built the smallest possible harness in Phase 1's agent loop lesson, and a host in Phase 9. This phase builds the full set.