Skip to content

2.5 The Agent Loop

The tool-calling loop itself: model, tool, observe, repeat until the model says it is done. The shape most 2026 systems are built on, and the place where the model decides what happens next.

Also called: the agent loop, the ReAct loop, the tool-use loop, "the loop".

Stub: scaffolding, not finished writing · planned for a later release. The skeleton below shows the beats this chapter will hit. Contributions welcome.

Why you'd reach for it

The problem, what breaks without it, and when you need it. To be written.

What it actually is

A crisp definition, the maturity call argued with cited evidence, and how it differs from its neighbours. To be written.

How to do it

Code included from a tested file in listing-studio/, so the prose can't drift from working code. To be written.

Gotchas

The real costs and when not to, feeding the Anti-Patterns Catalog. To be written.

In short

A weighted recommendation: what you would actually do. To be written.

Maturity: Standard (the loop is the default shape of a 2026 agent; what varies is the harness around it) · Grounding: companion repo + research · Last reviewed: 2026-08

Sources

Citations added as the chapter is written. Every non-obvious claim gets a footnote.

See also

Related chapters.