Back to directory

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

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.

More in Agent frameworks

See all 902
  • Recurse

    recurse.run

    A serverless harness that lets a coding agent design, test, and deploy its own specialist sub-agents as tools, MCP servers, or bots, defined by a schema-validated manifest.

  • ProofForge

    shulgin.is-a.dev

    An AI-agent pipeline that decomposes a mathematics problem, proves each piece, and formalizes the result in Lean 4 and Mathlib until the Lean kernel accepts it, with six of its proofs already merged into Google DeepMind's formal-conjectures repository.

  • local-coder

    github.com

    Builds a local coding-agent team on top of Ollama and OpenCode by detecting the machine's hardware, recommending models for seven specialist roles, and testing whether each assigned model can actually use tools, edit a repository and pass verification.