The agent loop is plan-act-observe in a cycle: the model decides a next action, a tool executes it, the result feeds back, and the model decides again. Designing the loop — when to stop, how to recover from errors — is most of building a reliable agent.

