Agentic loop
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.
What it is
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.
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.