Agentic Loops
Agentic Development • Part 2 of 3

The agentic loop.
Observe. Think. Act. Check. Repeat.

Every agent runs the same loop: it observes where things stand, thinks about the next step, acts with a tool, then checks the result. It goes round until a stop rule fires. Pick a mission below to see three common loop patterns, and one loop that would run forever without its stop rules.

One step at a timeEach pass looks at the latest result before choosing what to do next
A scratchpad with limitsEvery pass fills the context window, so older steps get summarised
Stop rulesGoal met, too many loops, out of budget, the same error again, or a person needed
01

The mission

Each mission shows a different loop pattern.

  1. GoalWhat done looks like
  2. ObserveWhere things stand
  3. ThinkChoose the next step
  4. ActUse one tool
  5. CheckDone, or go again?
Pick a mission and press Start the Loop. Watch the agent go round until a stop rule fires.
A

Gear & Stop Rules

What it can use, and what ends the loop

Toolsone per Act step
Stop ruleschecked after every pass
    B

    The Loop

    One pass = observe, think, act, check

    Observe
    Think
    Act
    Check
    Loop 0 passes

    C

    Scratchpad

    The agent’s working memory for this mission

    Context window0 tokens used
    Tracewhat it saw, thought, did and found
    What you just saw

    Three loop patterns, and why stop rules matter

    REACT

    Reason and act

    Think one step, act, look at the result, think again. Simple and flexible, good when the path is unknown.

    PLAN & EXECUTE

    Plan first, re-plan on failure

    Write the whole plan up front, then work through it. Cheaper and easier to follow, and it re-plans when the numbers say it is off track.

    REFLECTION

    Draft, critique, revise

    A second agent, the Critic, reviews each draft against clear checks. Quality goes up with every pass, until the checks pass.

    STOP RULES

    Know when to quit

    Without them, a loop retries a broken service all night. With them, it stops, keeps the trace, and hands over to a person.