Module 1 · Lesson 2 of 8

The first venue is unavailable. What should the assistant do now?

A system that performs only one calendar check has finished its programmed step. A system working toward the larger goal can use the result to decide what to try next. Perhaps it checks a second venue, asks whether Sunday is acceptable, or reports that the current requirements cannot be met.

The result becomes input to the next decision

A loop is a process that can repeat. In an agent loop, the system presents the current task and relevant information to the model, executes an allowed action it requests, and brings the result back for another decision.

For our event, one trip around the loop might check a venue. Another might investigate whether its catering package fits the budget. The number and order of actions can depend on what the system discovers.

What makes this agent-like?

In this series, an agent is a system that uses a model to choose actions toward a goal, within limits set by the application. The term has broader uses elsewhere; here we are discussing language-model agents.

Compare two instructions: “Check these three venues in order” and “Find a suitable venue, using the available search and calendar tools.” The first specifies a procedure. The second gives the system some responsibility for choosing a procedure.

A loop alone does not make an agent. A washing machine repeats programmed operations. The distinguishing feature here is that the model helps choose the next action from the information available.

Every loop needs an exit

Our assistant should stop when it has a suitable shortlist, when it needs the organizer to decide, or when further searching is no longer justified. The application can also impose a maximum number of tool calls, a time limit, or a spending limit.

“Keep trying until you succeed” is incomplete. If no venue fits, the useful answer may be to explain the conflict: the available spaces either cost too much or hold too few guests. Reporting that limit is better than quietly changing the requirements.

This is different from the training loop

In a neural-network training loop, optimization updates the model's parameters. In an ordinary agent run, new tool results update the context or stored task state. They do not usually change the model's parameters.

The assistant can behave differently after seeing “venue unavailable” because it has new information. That does not mean the model has been retrained. A later training process might use recorded experience, but that is a separate operation.

The loop is a repeated process. The agent uses the model to make choices inside that process. Next we need the software that actually keeps the process running.

The distinction between predefined workflows and model-directed agents is described in Building effective agents.