Outerloop runs AI agents on your own research code. An agent proposes a
change, runs the experiment on your cluster, and opens a pull request only
when your benchmark actually improves. Every attempt ends in a short
written report, including the attempts that failed.
You run it yourself, with your own keys, your own compute and your own
repositories, and nothing reports back to us. It is built and used every
day by the Agentic Learning AI Lab at NYU,
where it co-develops our research codebases.
Get started
To see a run first, the quickstart
runs two CPU benchmarks on your own machine, with no GitHub account and no
cluster. You need Python 3.12 or later, uv, Git
2.38 or later and an Anthropic API key:
pip install outerloop-science
outerloop init --forge local --compute local --no-image --target me/quickstart \
--forge-source https://github.com/outerloop-science/quickstart
outerloop start
On macOS, sessions and evaluations run under a Seatbelt profile: they write their
workspace and a scratch directory, read system and toolchain paths, and cannot read
the rest of your home. On Linux without a container they can read any file your
account can. Either way, use a spend-capped API key.
For your own repository: three commands and one file. You need a repo with a benchmark command, an
API key for the model that will write the code, and a Slurm cluster or one
machine with a GPU.
pip install outerloop-science
outerloop init # where the loop runs, which repo, which model and its key, your GitHub identity
The wizard asks for a GitHub identity for the agents to open pull requests
as. Pick app and it walks you through creating a GitHub App under your
account and installing it on the repo. Pick pat if you already have a
token, and it writes the config and the key files either way. To try it
without GitHub, outerloop init --forge local keeps the repository and its
pull requests in a git repository on the same machine. Then add one file,
.outerloop.yaml, to the repo you want improved:
benchmarks:
- name: my-benchmark
command: uv run python -m mypkg.eval --json # prints {"success_rate": 0.42}
metric: success_rate
direction: max
budgets:
gpu_hours_per_run: 8
runs_per_week: 10
scope:
allowed: [src/mypkg/solver/] # the only paths an agent may change
roadmap: docs/roadmap.md # what the agents read for direction; never written
outerloop start # on a Slurm login node this submits the loop; without Slurm it runs in the foreground
The install guide walks through
every step, including the other model backends. The
contract guide explains the
decisions the contract asks you to make.
The loop
Propose. An agent picks a hypothesis and writes the code change.
Experiment. It runs the training on your cluster and reads the results.
Measure. Outerloop scores the change against the base tree at the same
seed. Noise does not count as an improvement.
Review. Judges read the change and the claim. If both hold up, a pull
request opens.
Record. Every attempt gets a short report: hypothesis, change,
outcome, next step. Negative results included.