Knowledge Maxxing
← Back to topic library
AI MaxxingIntermediate90 sec

Agent loop

An agent loop is the repeated cycle of a model deciding an action, an application executing it, and the result being fed back to the model before it decides the next action.

Prerequisite: Tool calling

What matters

This loop is what allows multi-step tasks to unfold automatically, since each cycle's outcome informs the next decision, instead of everything being planned in one single response.

Example

In an agent loop, a model might search the web, read a result, then decide to search again with a refined query, repeating until it has enough information to answer.

Common misconception

An agent loop is not guaranteed to converge quickly; without limits, it can repeat unhelpful actions or run far longer than expected.

Recall question

What is fed back into the model at each step of an agent loop?

Keywords and related concepts

agent loopexecution cyclemulti-stepai agent

Related topics

AI agent
AI MaxxingBeginner
Tool calling
AI MaxxingIntermediate
Agent memory
AI MaxxingIntermediate