Asked about What an agent actually is

Where does the loop run?

An answer that works

In your code. The model cannot execute anything or call itself. It only emits a structured request, and your program decides whether to act on it and what to send back.

Reading an answer is not being able to give one. The section that teaches this is What an agent actually is, 3 hours of The agent loop.

Learn this properly