a beginner-friendly guide to AI loops

Know when your AI should keep trying.

Some AI tasks need one clear instruction. Some need a few fixed steps. Some need the AI to try, check what happened, and try again. loops.guide helps you tell the difference.

yes no new result -> try again What it knows goal and latest result AI choose next step need a check? Check tests, files, replies Stop stop when there is nothing useful to observe

Three tasks, three different setups

The right answer depends on what the AI has to do after its first try.

"Translate this changelog into French."
ONE PROMPT

Ask once. The AI does not need to check anything after it answers.

"Fix the failing tests, and keep going until they pass."
LOOP

It has to check its work. The AI tries a fix, sees what failed, and tries again.

"Create the API, then add login, then write the docs."
FIXED STEPS

The order is already known. It can follow the list without deciding what to do next.

The simple test

Ask one question: after the AI tries something, will it learn anything useful from the result? If yes, it probably needs a loop. If no, one prompt or a short list of steps is usually enough.

A loop is useful when the AI must check its work, react to an error, compare results, or ask a person before doing something risky. The tool turns your task into a plain recommendation.

Run it on your task

simple test choose the smallest setup
Will the AI learn something after it tries?
ONE PROMPT
No new information Ask once. Get one answer.
FIXED STEPS
The order is known Do step 1, then step 2, then step 3.
LOOP
It needs feedback Try, check what happened, then try again.

common setups

Seven useful loop types

Each one explains when to use it, when to avoid it, and how to start without overbuilding.

  1. 01 Retry Loop Let the AI try, check if it worked, and try again if it did not. low cost · low risk
  2. 02 Plan and Check Loop Make a plan, do one step, check it, then continue. medium cost · medium risk
  3. 03 Try Options Loop Try a few possible answers, compare them, and keep the best one. high cost · medium risk
  4. 04 Human Approval Loop Let the AI work, but ask a person before important or risky steps. medium cost · low risk
  5. 05 Checker Loop Use a separate check to decide whether the AI's work is good enough. high cost · low risk
  6. 06 Triggered Loop Start the AI when something happens, like a new issue or a daily schedule. medium cost · medium risk
  7. 07 Improve Over Time Loop Use past runs to make the whole AI setup better. high cost · medium risk

If you remember one thing

Use the smallest setup that can do the job. Move up only when it stops working.

Prompt
Ask once, get one answer. Best for clear jobs like translate, summarize, or rewrite.
Fixed steps
Do step 1, then step 2, then step 3. Best when the order is known before the AI starts.
Loop
Try, check, then try again. Best when the next move depends on what just happened.

learn more

Beginner-friendly guides

Everything in the blog →