yololoop is an autonomous agent loop with brakes: every action leaves an artifact, every change goes through a gate, and live work stays local until you choose the route.
Most autonomous agents are optimized for speed and assume you will review later. yololoop plans first, runs one backlog item at a time, and lets your gates decide when work is done.
The route-smoke fixture uses a local script as the agent route, so it does not require Codex, Claude, or GitHub authentication.
git clone https://github.com/pittaaron/yololoop.git
cd yololoop/examples/route-smoke
git init
node ../../bin/yololoop.js plan --no-branch
node ../../bin/yololoop.js run --once --no-branch
node ../../bin/yololoop.js statusExpected result: the backlog item is checked off, ROUTE_OUTPUT.md records the selected YOLOLOOP_* environment values, and .yololoop/runs/ contains a run artifact. See the demo transcript for the exact shape of the output.
Prerequisite: Node.js 22 or newer.
Install from npm:
npm install -g yololoop
mkdir my-agent-loop
cd my-agent-loop
git init
yololoop init
yololoop doctor
yololoop planYou can also install directly from GitHub:
npm install -g github:pittaaron/yololoopplan is safe: it writes a JSON artifact under .yololoop/plans/ and prints the side effects a live run would perform.
The starter backlog item is intentionally blocked for live execution until you configure routes.chore in yololoop.config.json; this keeps a fresh repo from dispatching an agent before you choose the route and gates.
This is an initial OSS core pass extracted from the local loop that runs the yololoop project itself. The public contract is intentionally small:
yololoop inityololoop doctoryololoop planyololoop run --onceyololoop loop --max <n>yololoop pr --dry-runyololoop status
Hosted runners, billing, auth, managed environments, and hosted UI are not part of this repo yet.
Run one item:
yololoop run --once --commitRun a bounded loop:
yololoop loop --max 10 --sleep 8 --max-runtime 14400 --timeout 900 --commit --branch yololoop/runThe loop stops when the backlog is empty, a route fails, a gate fails, --max is reached, or --max-runtime is reached. With --commit, each passed item is committed on its branch after the backlog item is checked off.
Every live run writes:
.yololoop/runs/run-*.jsonfor the full run artifact.yololoop/runs/<run-id>/blocks.jsonlfor per-route and per-gate execution records
yololoop.config.json maps backlog item classes to routes. Command routes are the lowest-level primitive.
{
"version": 0,
"runtime": {
"defaultTimeoutSeconds": 900,
"sleepSeconds": 0,
"maxRuntimeSeconds": 0
},
"routes": {
"chore": {
"mode": "command",
"command": "codex",
"args": [
"exec",
"Work on the selected yololoop backlog item. Keep changes scoped."
]
}
},
"gates": [
{
"name": "tests",
"command": "npm",
"args": ["test", "--if-present"]
}
]
}Model routes are a small convenience over command routes. They resolve model aliases and build the provider command for Codex or Claude Code.
{
"version": 0,
"models": {
"worker": "codex-model-id",
"reviewer": "claude-model-id"
},
"routes": {
"chore": {
"mode": "model",
"runner": "codex",
"model": "worker",
"timeoutSeconds": 900,
"args": ["--ephemeral", "-c", "approval_policy=\"never\""],
"prompt": "Work only on {{title}}. Keep changes scoped and run the configured gates."
}
},
"gates": [
{
"name": "tests",
"command": "npm",
"args": ["test", "--if-present"]
}
]
}Replace the placeholder model IDs with models available to your local codex or claude CLI account.
When a route command runs, yololoop provides these environment variables:
YOLOLOOP_ITEM_TITLEYOLOLOOP_ITEM_TYPEYOLOLOOP_ITEM_SLUGYOLOLOOP_BRANCHYOLOLOOP_REPOYOLOLOOP_RUN_IDYOLOLOOP_MODEL
yololoop reads the first unchecked Markdown task in BACKLOG.md.
- [ ] chore: add a focused unit test for the parser
- [ ] bug: fix the status badge when no run exists
- [ ] proposal: design a route policy for high-risk tasksThe prefix controls the route:
chore:->routes.chorebug:orfix:->routes.bugproposal:orfeature:->routes.proposal
The examples/demo-repo fixture uses a tiny local script as its "agent" route.
cd examples/demo-repo
git init
node ../../bin/yololoop.js doctor
node ../../bin/yololoop.js plan --no-branch
node ../../bin/yololoop.js run --once --no-branch
git diffThe demo writes NOTES.md, records a run artifact, and checks off the backlog item.
yololoop ships Codex and Claude skill files under .agents/skills/yololoop/ and .claude/skills/yololoop/. The intended assistant-facing handle is /yololoop: use it to preview the next item, run one gated loop step, and inspect the resulting artifacts.
- Dry-run first.
- Local auth only; do not store provider credentials in repo files.
- File-backed state before databases.
- Agent work goes through explicit routes.
- Every run leaves an artifact.
- Gates decide whether a backlog item can be marked complete.
- Hosted execution is a separate paid product surface, not hidden in the OSS core.
npm test
npm run checkThe package currently has no runtime dependencies.
