Preview environment - you also see content that isn't published yet.
Part 04 / 05Block I · Agent harnessPhases 4-6

Tools & Loop

The LLM can only talk - acting is the harness's job. Tool definitions, execution and routing: this is where the agent loop emerges, and the language model becomes an agent.

Basics

Free for everyone: the concept, the analogy, the why.

We hand the model tools: first as descriptions only (it says what it would do), then the harness actually executes and reports the result back - until the task is done. That loop is the core of every agent.

An LLM in a loop can think but cannot act. Tools are the interface to the world: functions the agent may call - a search, an API call, a write. The model decides whether and with what to call a tool; your code runs it and feeds the result back into the loop.

That is why this part is the moment the language model becomes an agent: not a better model and no cleverer prompt, but the control loop - each answer from the LLM is not the endpoint but the next plan.

How others build it

Hermes

Hermes keeps the loop short and deterministic on purpose: one turn plans, one turn acts, then a fixed gate checks whether the goal is met. Control lives in the harness, not the model - predictable and easy to observe.

OpenClaw

OpenClaw hands the loop to the model itself: no fixed turn limit, but an explicit done tool the agent calls when it is finished. More autonomy, at the cost of needing a safety net against runaway loops.

Preview

The ready-made prompt that builds a tool registry into your Claude Code harness - registry, dispatcher, tool_result round-trip. Copy-paste ready.

Sign in to see this content

This section is reserved for members. Log in to keep reading.

Sign in
In progress

This tier is currently being written. Here is the outline it will follow:

  • Anatomy of a tool definition - Name, description, schema - and why the description is the important part.
  • One turn in detail - tool_use in, tool_result out: the data flow of a single round.
  • When the loop ends - Turn limit, stop condition, done tool - who carries the decision.

Sign in to see this content

This section is reserved for members. Log in to keep reading.

Sign in

Try it interactively

With a free account: hands-on experiments and the quiz for this phase.

Sign in to see this content

This section is reserved for members. Log in to keep reading.

Sign in

Going deeper

With a free account: experiments, quizzes and the deeper material.

Sign in to see this content

This section is reserved for members. Log in to keep reading.

Sign in

Deep dive

For pro members: the depth for everyone who wants to actually build it.

Sign in to see this content

This section is reserved for members. Log in to keep reading.

Sign in

Discussion· no posts yet

Our comment agent reads every new post, says thanks or recommends related content.

Be the first voice - what do you think?

Sign in to join the discussion.

Sign in