Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Outerloop

Outerloop

ci PyPI Python License

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

  1. Propose. An agent picks a hypothesis and writes the code change.
  2. Experiment. It runs the training on your cluster and reads the results.
  3. Measure. Outerloop scores the change against the base tree at the same seed. Noise does not count as an improvement.
  4. Review. Reviewers read the change and the claim. If both hold up, a pull request opens.
  5. 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 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 or under an organization you name, and installing it on the repo: two browser pages and a code pasted back. It then checks that the App can write the repo and tells you if it cannot. Pick pat if you already have a token. It writes the config and the key files; nothing to edit by hand. 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

Apache License 2.0 — see LICENSE and NOTICE.

Metadata

Release files for outerloop-science 0.3.0rc1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for outerloop-science 0.3.0rc1
File Size Uploaded Provenance
outerloop_science-0.3.0rc1.tar.gz 1.3 MB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for outerloop-science 0.3.0rc1
File Interpreter ABI Platform
outerloop_science-0.3.0rc1-py3-none-any.whl Python 3 none any Details

Total release size: 1.9 MB

Release files / outerloop_science-0.3.0rc1.tar.gz

Download URL outerloop_science-0.3.0rc1.tar.gz
Size 1.3 MB
Tags Source
SHA-256 checksum
How to use checksums
4fa627221c570404e3e8a19795d20a6abc72c5cac9e477d7fb2cb9e47970da5a
BLAKE2b-256 checksum
How to use checksums
749c69f963dc8fa4ab6fa9eb0a6984cbc04f3126392729c65328b11db8ecdbd9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.

Transparency log

Release files / outerloop_science-0.3.0rc1-py3-none-any.whl

Download URL outerloop_science-0.3.0rc1-py3-none-any.whl
Size 579.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2b37d72c56dd0b0242705d91881041798cc2bebc22e87e07f39330e7e3847307
BLAKE2b-256 checksum
How to use checksums
8f3ea1e1c0afa296cfb5fa2347f35491a62a16e43d3718b8abcd34e9c105af0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.

Transparency log

Security for outerloop-science 0.3.0rc1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for outerloop_science-0.3.0rc1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page