The iterative cycle of an LLM agent: receive input → decide on action (often a tool call) → execute → observe result → decide next action — until the agent reaches a final response.
An Agent Loop is the runtime pattern that turns a stateless LLM into a multi-step agent. Each iteration: the model takes the current context + observation history, decides on a tool call (or final answer), executes the tool, appends the result to context, and loops. Loops typically have a max-iteration safety cap. Quality depends on the agent's ability to recognize when it has enough information to stop and when it should keep gathering more.
An incident-response agent that loops through: query logs → identify pattern → query metrics → correlate with deploys → produce root-cause hypothesis.
Agent loops are how single-prompt LLMs become multi-step task executors — the abstraction underpinning every modern LLM agent framework (LangChain, LangGraph, OpenAI Assistants, etc.).
Need help implementing this in your business?
Get Started