Chapter 12 · Tools, agents and harnesses
The agent loop
An agent repeats: think, act with a tool, observe the result, until the goal is done.
Chapter 12 · Tools, agents and harnesses
An agent repeats: think, act with a tool, observe the result, until the goal is done.
Think: what do I need next?
An agent is a model in a loop. Each time round, what it observes changes what it thinks next.
Some goals need several steps: look something up, do a sum with the result, then compare. A single reply cannot do that.
Pick a task and press Run next loop. Then lower the loop limit, or make a tool fail once and watch the agent adjust.
A fixed script for three tiny tasks with made-up prices, not a real planner. Real agents choose their own next step, which is why limits and checks matter.
What are the three parts of the agent loop?
A tool returns an error. What does a good agent do?
Why add a loop limit?