Practical overview
When it fits
Use it when a task needs iterative execution and can be judged against explicit completion criteria, especially for coding, research, maintenance or other scheduled workflows.
Who it is for
- Developers building autonomous agent workflows.
- Teams needing recurring tasks with explicit acceptance criteria.
- Product builders embedding an agent loop into an existing application.
- Operators running long-lived terminal or Modal-based tasks.
Documented uses
- Run an agent repeatedly toward a defined outcome.
- Preserve memory between fresh-context rounds.
- Have a separate agent verify completion.
- Apply round, time and model-spending limits.
- Schedule or resume work after interruptions.
Requirements & limits
The repository is public, documents Apache-2.0 licensing, and identifies TypeScript as its primary language. The supplied setup excerpt uses the Claude Agent SDK and an ANTHROPIC_API_KEY.
- A separate read-only verification agent, rather than the worker, supplies the completion verdict.
- Each round starts with fresh context and reads memory from disk.
- Limits can cover rounds, model spending and per-round timeout.
- Documented state, locking and resume behavior address restarts and overlapping triggers.
- The engine can be run from a terminal, scheduled, deployed to Modal’s cloud or embedded in a product.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Define and run a verified loop
Create a goal-driven loop with explicit completion criteria, then run it until it settles or a guard fires.
Before you start
- A TypeScript project using @loop.js/core.
- An ANTHROPIC_API_KEY environment variable; agents run on the Claude Agent SDK.
- A goal and a definition of what counts as done.
Steps
Create a loop with Loop.define, specifying goal, verify criteria and limits such as rounds, USD and timeout.
Run the loop with npx loop run.
Inspect its settling result or use npx loop status to check progress.
Expected outcome
The loop runs repeated rounds and ends when the verification agent accepts the criteria or a declared guard fires.
Guide limitations
- The supplied documentation does not specify installation details beyond the documented scaffold command or provide implementation configuration.
- The model and API costs are controlled by the loop's documented USD guard, but no pricing information is supplied.
Schedule a recurring loop
Set up a documented scheduled execution for a goal that should be checked repeatedly.
Before you start
- A configured loop with a goal and verification bar.
- A scheduler expression and a selected execution backend.
Steps
Define the recurring goal and its verification criteria.
Use npx loop cron add with a schedule and an --until mode such as settled or forever.
For cloud execution, specify the documented Modal backend option.
Expected outcome
The loop is installed into a scheduler and can reopen or settle according to its goal and schedule.
Guide limitations
- The supplied documentation does not describe scheduler configuration beyond the command examples.
- Modal deployment configuration is not supplied.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 30 September 2026
- Original website title
- loop-js/loop.js · Official homepage title · retained in its source language

