Explainer

Agent Loop

The cycle

The cycle.
Prompt
ReasoncallLlm
Reply

Agent Loop

ActrunTool
tool resultrequest tool

The user prompt enters the loop at Reason. Reason and Act circulate: Reason requests a tool call, Act provides the tool result back. When Reason is done, the agent replies. The loop has not started.