Learn AI Math

Agent Loop

What is Agent Loop?

In one sentence: The agent loop is the repeating cycle an agent follows: think, act, observe the result, and repeat until the goal is reached.

Each turn, the model looks at the goal and what has happened so far, chooses an action like calling a tool, gets the result, and decides what to do next.

What does Agent Loop look like?

Think "I need the weather" → call weather tool → see "rainy" → think "suggest an umbrella" → answer.

Why does Agent Loop matter?

The loop is what turns a language model into an agent.

Last updated · Fact-checked by The AI Math

Linking to this page from a lesson or article?

Like this explanation? Get one every week.

The AI Math newsletter turns confusing AI news into plain English. No hype, no jargon walls.