Skip to main content

1. Scaffold

This writes three things: a package.json depending on @loop.js/core (which provides the project-local loop bin), a loop.config.ts, and an empty workspace/ — the work tree the agents build in. Agents run on the Claude Agent SDK, so set your key:

2. State the Goal

loop.config.ts is goal-only: goal is the field you edit; limits spells out the tight engine defaults, and every other knob is a commented line already carrying its default.
Make the Goal judgeable: a testable end state beats a vibe. “The test suite passes and the README documents the new flag” gives Verify a bar; “improve the code” does not. When the bar deserves its own text, hand the judge one — verify takes a prompt exactly like goal (a string, { file: "./verify.md" }, or a function):

3. Run

Rounds stream by until the Loop settles or a guard fires — the exit code says which. Check on it any time, from any shell:

4. Schedule it (optional)

Let a real scheduler re-trigger the loop instead of babysitting it:
The Entry runs loop run in this directory every morning and removes itself at the first settle — capped at 3 runs / 24 hours by default, in case it never does. With --backend modal, State lives on a Modal Volume and removing the Entry never deletes it — see loop cron.

Where things live