Skip to content

Courses

Learning streak: 6 days in a row

Reading · 9 min · Lesson 2 of 7

Tools, plans and loops

What happens inside an agent while it works on a task.

Under the hood, an agent is a loop. The model looks at the goal and what it knows so far, decides on the next action, calls a tool such as a search, a database query or an API, reads the result and decides again. The loop ends when the goal is reached or a limit is hit.

Tools are defined by the people building the agent: a name, a description and the parameters the tool accepts. The quality of those descriptions matters as much as the model, because the agent chooses tools by reading them. Vague tool descriptions lead to wrong calls.

Loops can also go wrong: an agent can repeat the same failing step, wander off the goal or run up costs. Production agents therefore have step, time and budget limits, clear stop conditions, and they hand over to a person when they get stuck.

Key takeaways

  1. An agent is a loop of deciding, acting and observing.
  2. Clear tool descriptions matter as much as the model.
  3. Step, time and budget limits keep loops under control.