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
- Course programThe first three modules are free: start in the browser or the app, no card needed.
- Daily drill casesReal situations from building agents - with the answer and why.
- Library: guides, skills and promptsReady prompt templates, grouped into collections.
- AI ChroniclesSourced stories from the history of AI.
- ConceptsPlain-language explainers of agent engineering.
- Learn AI agentsApps and courses for learning AI agents, compared honestly.
Still in this lesson: 3 more cards, a quiz of 5 questions, XP and stars - in the course.
Continue the lesson on the Path