Models that call tools in a loop to finish multi-step tasks.
Starting with What an agent is, Workflows vs agents, Planning and loops, Stopping conditions, Human in the loop, Debugging agents, and more
Made for you now: slide lessons from basics to production, usually with code and a quiz. See a finished one
Models that call tools in a loop to finish multi-step tasks.
AI EngineeringStage 11 of 17: Agents
A plain model call returns text. An agent lets the model request actions, such as calling a function, then reads the result and decides what to do next.
The model proposes a tool call, your code runs it, the result goes back into the context, and the model continues until it answers without asking for another tool.
Limits on steps and cost, permission for risky tools, and logging of every call. The loop is simple; making it safe and bounded is the work.
Step 1
Model decides
Answer, or request a tool.
Step 2
Your code runs the tool
Validate arguments first.
Step 3
Result returns to context
The model sees what happened.
↺ Stop when the model answers or a step limit is hit
Start with these 6. 12 more are one tap away.
A model calling tools in a loop until it reaches a goal.
Fixed steps are cheaper and safer; use an agent when the steps are unknown.
Plan, act, observe: how an agent decides its next step and when to stop.
Step limits, budgets and done checks so loops end.
Approvals, hand-offs and undo for actions that matter.
Read the trace step by step to find where a run went wrong.