Open Agent School · Public worked example

Agent loop: meaning and example

Welcome! Take one idea with you today.

A repeated cycle of observing the current situation, choosing a next action, executing an allowed action and using the result to decide whether to continue.

Picture it: Search for a document, inspect the result, refine the search, then stop when the evidence is sufficient.

What is easy to mix up?

A loop needs stopping conditions, budgets and safe handling of failures; repetition alone is not progress.

Teaching example by Open Agent School. Source: Anthropic - Building effective agents.