Agentic loop
Published Updated
What is Agentic loop?
An agentic loop is the cycle an AI agent repeats until a goal is met: observe the situation, plan a step, call a tool, check the result, and decide what to do next. It is what separates an agent from a chatbot that answers once.
The continuous cycle where an AI agent observes its environment, makes a plan, executes a tool, evaluates the result, and decides what to do next.
An agentic loop is the architectural core of autonomous AI. Unlike a chatbot that answers once and stops, an agent operates in a loop: it reads an error, writes a fix, runs a test, sees the test failed, and loops back to rewrite the fix. This continues autonomously until the ultimate goal is achieved or constraints are hit.
How it relates to Orbit
A running Orbit Agent Session exposes the coding agent’s live turns, model, effort, and context use. See Agent Sessions & Harnesses for details.
When you would use it
You design an agentic loop when a task cannot be solved in a single AI prediction and requires multi-step reasoning, trial and error, and environmental feedback.
Common operations
- Autonomously resolving test suite failures by iteratively fixing code.
- Scraping a website, analyzing the data, and deciding to scrape subsequent linked pages.
Frequently asked questions
When does an agentic loop stop?
When the goal is reached or a constraint is hit, such as a turn limit, a budget, a failing check or a question for the human.
What goes wrong in an agentic loop?
The common failures are repeating the same failing tool call, drifting from the original goal as the context window fills, and reporting success without doing the work.
Can I watch an agent’s loop in Orbit?
Yes. A running Agent Session shows the agent’s live turns, model, effort and context use, and its result is checked against the commit afterwards. See Agent Sessions & Harnesses.