Read this first
You are three commands away from watching an agent find real work on its own.
A loop is a small system that finds work, hands it to an agent, checks the result, and writes down what it learned. You build it once. It runs without you after that.
This repo is thirty five of them. That number is the point of the book and the problem with the repo, so here is the honest advice: do not look at thirty five loops. Look at one. The rest are a catalog you come back to.
Pick your door
| If you want to… | Go to | Time |
|---|---|---|
| See it work, right now, no setup | Run the demos | 1 minute |
| Understand what you are looking at first | What a loop is | 5 minutes |
| Put one on your own repo and get a real PR | Your first loop | 10 minutes |
| Browse all thirty five | Engineering · Cloud · AI and ML · QA | browse |
If a word here is unfamiliar, it is in plain words. Nothing is assumed.
What you need
- Node 18 or newer and bash. That is all the demos need, and all any check ever needs.
- A Claude Code or Codex login to run a loop for real on your machine. If you are already
signed in, including on a subscription,
./run-loop.shuses that. There is nothing to buy to try this. - An API key only when you put a loop on GitHub Actions. A runner has no login, so the
workflow reads
ANTHROPIC_API_KEY(orOPENAI_API_KEY) from your repo secrets, and that is metered per token. - git, and the GitHub CLI
gh, only for the steps that open a PR or read an issue.
Every agent run is capped at two dollars and thirty turns, and the check runs first, so a loop with nothing to do never wakes one. See what it costs.
The book this came from
From Prompt to Loop sits in the root of this repo, and it is free. It has the thinking: the nine rules, the five question test for whether something is really a loop, and the operations chapters. This repo is the working code that guide points at.
Read the guide for why. Read these pages for how.
Before you point a loop at anything you care about, read SECURITY.md. It is short, and it is the honest version: what the fences actually stop, what they do not, and which parts stay your job.
Contents · Next: What a loop is →
The 35 loops: Engineering · Cloud · AI and ML · QA
Reading is the slow way round. This runs all four chapters against seeded data:
git clone https://github.com/fakiolinho/From-Prompt-to-Loop.git && cd From-Prompt-to-Loop && ./run-all-demos.sh