This release is a pre-release and may not be stable for production use.
Outerloop
Autoresearch agents that improve your benchmark.
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 is written up, including the ones that failed.
You run it yourself: your keys, your compute, your repos. 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.
How it works
- 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. Reviewers 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.
Agents cannot touch the benchmark, the budgets, or your CI. Your branch protection and required checks apply to them as to any contributor. By default a pull request waits for a human; a repo can also let clean ones merge themselves.
Get started
Three commands and two files: your model key and the contract. You need a repo with a benchmark command, a model API key (Anthropic by default), and a Slurm cluster or one machine with a GPU.
pip install outerloop-science
outerloop init # where the loop runs, which repo, your GitHub bot; writes the config
Put your Anthropic API key in ~/.config/outerloop/harness_key: one line,
readable only by you (chmod 600). 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/] # 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
Step by step, other model backends included: docs/install.md. Everything the contract can say: docs/contract.md.
Only want pull request reviews?
The reviewer works on its own. One workflow file and an API key, about five minutes, no bot account and no cluster. It comments on pull requests with concrete findings and never approves, blocks, or fails your build. See docs/reviewer.md.
Where it runs
The first-class home is a Slurm cluster. There is no daemon: the loop is a chain of short jobs that resubmit themselves, so nothing listens and no inbound SSH is needed. Experiments and evaluations run inside your container image with no credentials, and GPU-hours are metered against the contract's budget. A single machine with a GPU works too, for cheap benchmarks. Details: docs/compute.md.
Safety by design
- Opt-in and contract-bound. A repo takes part by granting the bot access
and committing a contract. The contract, your roadmap, and
.github/are never writable by an agent. - Nothing on trust. Outerloop measures every claim itself, on committed trees, and re-verifies before a pull request exists.
- Untrusted input. Pull request text, diffs, issues, web pages, and job output are data, never instructions. Agents run without credentials.
- Budgets in code. Launches, GPU-hours, and runs per week are enforced by the kernel, not left to the agent.
- No model lock-in. Claude Code, Codex, and hermes-agent are wired today; backends are swappable.
Full design: docs/design/architecture.md · Roadmap: docs/roadmap.md
Developing
uv sync
uv run pre-commit install
uv run pytest
| Path | Purpose |
|---|---|
src/outerloop/ |
The kernel: contract, tick (the Slurm chain), attempt/orchestrator (the climb), measure/dispatch (evals as jobs), syscall (the author's tool), panel/verifier/review, github, harness backends |
tests/ |
Tiers: unit (default), slow, llm, slurm markers |
scripts/ |
Committed operational scripts (the tick chain, provisioning) |
docs/ |
Install guide, architecture and design notes, roadmap |
License
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file outerloop_science-0.1.0.dev0.tar.gz.
File metadata
- Download URL: outerloop_science-0.1.0.dev0.tar.gz
- Upload date:
- Size: 821.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cbd772112934f92a91e15055a26450cf8e6fca5860467f33a17df1c50b6049c5
|
|
| MD5 |
35ab4a2accfeaadd82b61ed14c3a9a58
|
|
| BLAKE2b-256 |
10f8123784df44be38b7ea9bc2b4493948fd13a6609fe487990b18560edbe549
|
Provenance
The following attestation bundles were made for outerloop_science-0.1.0.dev0.tar.gz:
Publisher:
release.yml on outerloop-science/outerloop
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
outerloop_science-0.1.0.dev0.tar.gz -
Subject digest:
cbd772112934f92a91e15055a26450cf8e6fca5860467f33a17df1c50b6049c5 - Sigstore transparency entry: 2729418617
- Sigstore integration time:
-
Permalink:
outerloop-science/outerloop@9b57c76aee2099d3a3f4b3b7790441c82ce4e8ba -
Branch / Tag:
refs/tags/v0.1.0.dev0 - Owner: https://github.com/outerloop-science
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9b57c76aee2099d3a3f4b3b7790441c82ce4e8ba -
Trigger Event:
push
-
Statement type:
File details
Details for the file outerloop_science-0.1.0.dev0-py3-none-any.whl.
File metadata
- Download URL: outerloop_science-0.1.0.dev0-py3-none-any.whl
- Upload date:
- Size: 375.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df0a01e61e13f1bfb9e932bee5749b76955163312b6f1e1f6fe5f70c7bcfa5b6
|
|
| MD5 |
87cde0004833c35a600b5e64d0b5984b
|
|
| BLAKE2b-256 |
ff248c961cb7266ed033d76201dbe4f7816b7c10e151e8b786a48d1224b7430a
|
Provenance
The following attestation bundles were made for outerloop_science-0.1.0.dev0-py3-none-any.whl:
Publisher:
release.yml on outerloop-science/outerloop
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
outerloop_science-0.1.0.dev0-py3-none-any.whl -
Subject digest:
df0a01e61e13f1bfb9e932bee5749b76955163312b6f1e1f6fe5f70c7bcfa5b6 - Sigstore transparency entry: 2729419021
- Sigstore integration time:
-
Permalink:
outerloop-science/outerloop@9b57c76aee2099d3a3f4b3b7790441c82ce4e8ba -
Branch / Tag:
refs/tags/v0.1.0.dev0 - Owner: https://github.com/outerloop-science
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9b57c76aee2099d3a3f4b3b7790441c82ce4e8ba -
Trigger Event:
push
-
Statement type: