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 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 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.
The ready-made prompt that builds a tool registry into your Claude Code harness - registry, dispatcher, tool_result round-trip. Copy-paste ready.
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.
Try it interactively
With a free account: hands-on experiments and the quiz for this phase.
Going deeper
With a free account: experiments, quizzes and the deeper material.
Deep dive
For pro members: the depth for everyone who wants to actually build it.