loop.js
A TypeScript framework for loop engineering that runs an agent toward a stated goal in rounds, with a separate skeptical, read-only verify agent deciding when the goal is actually met.
loop.js runs an agent repeatedly toward a stated goal, in rounds, until a separate verify agent, with its own session and optionally a cheaper model, judges the goal met; only the verify agent's verdict settles a run, so the worker agent never grades its own work. Each round starts with fresh context and reads the worker's own handoff notes back from disk, so a later round starts as fresh as the first rather than accumulating drift from a long session.
A rejected verdict carries a mandatory reason fed into the next round, and a goal that can never pass settles as an explicit give-up rather than silently burning its budget. Guards default to tight limits on total cost in dollars, round count and per-round timeout, and all state lives on disk so a run is idempotent, resumable after a crash, and safe to trigger more than once thanks to a heartbeat-based lock. It can be scheduled with crontab, launchd, Task Scheduler or a cloud scheduler, or embedded directly in a product as the same engine.
It is written in TypeScript and licensed under Apache-2.0.