Free lesson · Module: Agent Foundations

Harness & SDK

A harness is the program around the model

The program around a model is called a harness. Your tool loop is already one, just tiny. A full harness retries a failed API call, waits out the rate limit, and stops the agent after a set number of turns. You get one ready-made as an SDK, a kit of code for your program. An example is the Claude Agent SDK. Inside is the same loop.

Why write the loop yourself

If you never wrote the loop, an SDK is a black box. When the agent hangs or does something extra, you can’t find the cause. You know what is inside: history, tool_use, tool_result, two appends. Give the SDK the same task and compare results and tokens. “Build it → take the ready one → compare” will serve you all course long.

More on Way of the Agent

Still in this lesson: 3 more cards, a quiz of 5 questions, XP and stars - in the course.

Continue the lesson on the Path