Agent Loop

The agent loop is the cycle an AI agent repeats while pursuing a goal: observe the current state, plan the next action, act through a tool, check the result, then continue, re-plan or stop.

Agents & automationagentic loopsense-plan-act loop
§ 01DefinitionAgent Loop

No jargon, no math

In plain words, what is it?

Each turn the agent reads what changed since last time (observe), picks the single next action that gets closer to the goal (plan), executes it through a tool (act), and reads the outcome (check). Then the cycle restarts from the new state. A chatbot runs the loop zero times: one question, one answer, done. An agent runs it as many times as the goal needs, with the stop conditions you set: goal reached, step limit, budget limit, or a boundary that hands off to a human. The loop is where both the power and the failure live: no stop condition and it retries forever, small unchecked deviations compound into drift, and every turn costs tokens and seconds.

§ 02How it worksObserve, plan, act, check, repeat until done
  1. 01

    Observe. Read the current state: results so far, errors, new data.

  2. 02

    Plan. Choose the next action that moves the goal forward.

  3. 03

    Act. Execute it through a tool: an API call, a query, a click.

  4. 04

    Check. Did it work, and what changed?

  5. 05

    Loop or stop. Success feeds the next turn; goal, limit or boundary ends the cycle.

§ 04

Want this running in your stack?

We design and ship AI systems with permissions, logs and human approval. It starts with a 30-minute scoping call.