Chapter 1: Why a harness?

A model reads text and writes text. It cannot run code, read files, or remember past calls. The harness adds those abilities. It does five jobs. It sends the prompt. It reads the reply. It runs the tools the model asks for. It returns the tool results. It decides when the run stops.

Figure 1.1. One harness run, with each of the five jobs labelled. Use Previous and Next to step through it. The count of 412 is the fake data from Chapter 4.

Example. Asked alone, a model can only guess whether checkout is slow. With a harness, the model calls a countErrors tool, reads the real count, and answers from that data.

Objectives: describe a model call, name the five harness jobs, and explain what the course builds.

docs