Home › Key concepts › The agent loop
Key concept · Walk (intermediate) · the same on every platform
The agent loop
Model, tool, result, model again, until done or a limit is hit.
What it is
An agent is a model in a loop. Each turn it reads the context, decides to answer or to call a tool, the tool runs, and the result goes back in. The loop stops when the task is done or a budget runs out (steps, time, money).
Why it matters
Agents can do multi-step work, but every extra step costs time, money and a chance to go wrong. Budgets and checks are not optional.
An example
Look up the policy, then the claim, then draft a reply: three tool calls, then an answer.
The common mistake
No step limit, so a confused agent loops 200 times on one request.
Where you meet it on each platform
The idea stays the same; only the product name changes.
| Job | AWS | Azure | Google Cloud | Databricks | Open source |
|---|---|---|---|---|---|
| Agent runtimewhere a long-running agent keeps its state and waits safely | Bedrock AgentCore | Foundry Agent Service / Durable Functions | Vertex AI Agent Engine | Mosaic AI Agent Framework | DBOS or Temporal + your loop |
| Tool callinglet the model ask your code to do things, and check before it runs | Bedrock tool use | Foundry function calling | Gemini function calling | Unity Catalog functions as tools | plain Python loop, no framework |
Related ideas
Where it shows up
Part of the Walk level on these paths: AI Engineering (tools and agents).