This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.1.0 instead.
Reason given by maintainers: Pre-release placeholder
Put an AI agent in a verified improvement loop.
Set constraints and metrics; the agent proposes changes in a loop.
Only changes that pass checks get merged. Improvements compound across iterations.
works with Claude Code · Codex · OpenCode
How it works · Quick start · Examples · Configuration · Other features · FAQ
AutoHelix is a lightweight harness that lets you point an agent at a goal and leave it looping unattended. It provides the isolation, validation, scope, and budget control to make that safe, and it's general enough for any measurable goal, from optimizing code to training models.
Looping an agent can be far more effective than a single prompt, because later iterations fix and build on what came before, and because it gives you a knob for controlling how much effort (time or cost) to put toward the goal rather than letting the agent decide when it's done. AutoHelix makes this pattern easy to run and customize, so you can let the agent climb for as long as you want.
How it works
You define a goal, the constraints that must hold, and the metrics to track. The agent proposes changes and the harness decides if they land.
Core features:
- Isolation. Each iteration runs in a fresh git worktree. A rejected attempt's code is cleanly discarded.
- Scope enforcement. Only files marked
editablecan be changed; everything else is frozen. - Constraints gate changes. Tests, type-checks, or any command that must exit 0. Break a constraint and the iteration is discarded.
- Metrics track progress. Metrics are captured and shown to the next iteration. Optionally gate on them to reject regressions. Logs and artifacts can be saved too.
- Persistent memory. Each iteration is a fresh session, but the agent reads and writes notes that survive across all iterations, including rejected ones.
- Budget control. Cap the run by iterations, time, or cost.
Quick start
Install from source:
git clone https://github.com/awslabs/AutoHelix.git
cd AutoHelix
python -m venv .venv && source .venv/bin/activate
pip install -e .
AutoHelix uses Claude Code by default (looks for claude on your PATH). Codex and
OpenCode are also supported — see agent setup.
cd my-project
autohelix init # initialize config and state
autohelix run # start the loop
init creates a commented autohelix.yaml to fill in — see the configuration section
below. Other commands are described in the CLI reference.
Examples
The examples/ directory has ready-to-run tasks across different domains, from
a 2-minute sorting function example to algorithm optimization and model training. To list what's available:
python examples/setup_example.py --list
Code optimization. AlgoTune is a benchmark for optimizing widely used
algorithms in math, physics, and CS. AutoHelix can scaffold any of them via
examples/algotune (we measure speedup with our own eval setup, not identical
to AlgoTune's official harness). The plot below shows a run with Claude Opus 4.8: across 154 tasks,
the median speedup climbs each iteration, reaching ~8.5× by iteration 5.
Model training. The same loop works when each iteration is a training run rather than a
code edit: the agent writes the training code and trains a model, and AutoHelix scores the
result with a frozen eval the agent can't modify. In
examples/posttrain
(inspired by PostTrainBench), the agent is asked to post-train
Qwen3-4B-Base on GSM8K. Given an open-ended goal (no method prescribed), the agent
worked its way up from supervised fine-tuning through rejection sampling to reinforcement
learning (GRPO) — reaching 93% accuracy over 8 iterations on one H200. See the
ML Experiments Guide for setup tips.
In the wild. Beyond the bundled examples, we've used AutoHelix on real projects. In Hybrid Model Factory — an open-source toolkit for training hybrid architectures (Attention + SSMs) from our team — the agent autonomously developed a faster sequence-parallelism implementation. Over multiple runs (with some algorithmic hints in the goal), it arrived at a state-passing approach that propagates recurrent state between GPUs instead of redistributing the full sequence, reaching ~5× faster per layer and 1.6× faster end-to-end training at 128K sequence length on a 27B model.
Configuration
A run is defined by a single autohelix.yaml. Every field is documented in
docs/config.md.
Project layout
my-project/
├── autohelix.yaml # your config
└── .autohelix/ # runtime state (gitignored)
├── prompt.md # the prompt the agent gets each iteration (editable)
├── history.jsonl # per-iteration results
├── notes/ # agent's persistent notes (the only agent-owned state)
├── observations/ # per-iteration captured metrics output and artifacts
├── reviews/ # reviewer feedback per iteration (if a reviewer is set)
├── hints.md # messages from `autohelix hint`
├── logs/ # per-iteration prompts and agent output
├── output/ # dashboard.html and reports
└── worktrees/ # temp iteration dirs (recreated each time)
Other features
Report
autohelix report runs a one-shot agent over the run's history, notes, and git log and
writes a summary to .autohelix/output/report.md. See CLI → report.
Reviewer
Beyond quantitative metrics, you can add a reviewer: block with a custom prompt to get qualitative feedback from an LLM. Each review is archived to .autohelix/reviews/iter-N.md,
and the latest one guides the next iteration. See Concepts → Reviewer.
Dashboard
After every iteration, AutoHelix regenerates a self-contained HTML dashboard at
.autohelix/output/dashboard.html. You can open it in a browser
to watch metrics, outcomes, and per-iteration changes as the run progresses. See
Concepts → Dashboard.
Time limits
Two time controls:
budget.time— caps total wall-clock for the whole run. Checked before each iteration starts; doesn't interrupt one in progress.budget.iteration_time— per-iteration deadline. A hook injects a countdown into the agent's context after each tool call, so it can wrap up and write notes before the deadline hits.
See Config → budget.
Docker sandbox
Optionally run AutoHelix inside Docker for filesystem isolation. The agent can't reach
your home directory, SSH keys, or other projects. Build the image with docker/build.sh
and run via docker/run.sh. See Docker sandbox.
Hints
autohelix hint "..." (run in a second terminal) drops a note the running agent picks up
at the start of its next iteration. Useful to steer a run without stopping it. See
CLI → hint.
Parallel runs (alpha)
autohelix parallel executes multiple AutoHelix runs concurrently, each with its own config and
worktree, sharing notes at a configurable frequency so each agent can see what the others
have tried. See CLI → parallel.
FAQ
How does AutoHelix differ from other "agent in a loop" tools?
Running AI agents iteratively is becoming a popular strategy — a kind of test-time scaling
for agents, where more iterations buy more quality. Tools like
autoresearch,
Ralph, and Claude Code's
/goal and /loop commands each implement variations of this pattern.
Compared to other tools, AutoHelix adds a minimal amount of structure to ensure that long-running autonomous loops don't go off track, so you can let your agent work while keeping control over the direction.
| AutoHelix | autoresearch | Ralph | /goal |
/loop |
|
|---|---|---|---|---|---|
| Goal-directed | ✓ any metric(s) | ✓ val loss | ✓ task list | ✓ boolean | ✗ |
| Validation gates | ✓ | ~ self-checks | ✗ | ✗ | ✗ |
| Isolation on failure | ✓ worktree | ~ self-resets | ✗ | ✗ | ✗ |
| Fresh context each iteration | ✓ | ✗ | ✓ | ✗ | ✗ |
| Memory across iterations | ✓ notes, metrics, artifacts | session | progress file | session | session |
| Scope enforcement | ✓ | ~ by instruction | ✗ | ✗ | ✗ |
| Budget control | ✓ iters, time, cost | ✗ | iters only | iters only | ✗ |
| Time-aware agent | ✓ | ✗ | ✗ | ✗ | ✗ |
| Parallel exploration | ✓ | ✗ | ✗ | ✗ | ✗ |
| Agent-agnostic | ✓ | ✓ | ✓ | ✗ | ✗ |
What about reward hacking?
The agent optimizes what you measure: if your benchmark has loopholes, the agent may find and exploit them, and more iterations apply more pressure to do so. Autonomous loops shift the burden from "write perfect code" to "write strong checks."
You can look out for gaming by reading autohelix report, the agent's notes, or a
reviewer's feedback. Then close the loophole with a new
constraint and re-run.
Is it safe to run unattended?
AutoHelix isolates the agent at two levels:
- Git worktree (default) — each iteration runs in a separate working copy. Rejected iterations are deleted entirely; accepted ones merge back cleanly.
- Docker sandbox (optional) — filesystem isolation: the agent can't access your home directory, SSH keys, or other projects. (Network is not isolated, since the agent needs it to reach the model API.)
Worktree isolation protects your codebase from bad iterations, but it is not a security sandbox — the agent still runs on your host and could in principle access the filesystem or network. For focused optimization tasks (the typical use case), the agent works toward a narrow goal, not exploring adversarially, so running without a sandbox is usually a reasonable tradeoff. For stronger guarantees, or on sensitive machines, use the Docker mode.
Citation
@software{autohelix2026,
title = {AutoHelix: Verified Iteration for AI Agents},
author = {Trager, Matthew and Mansimov, Elman and Zhang, Yi and Xia, Wei and Soatto, Stefano},
year = {2026},
version = {0.1.0},
url = {https://github.com/awslabs/AutoHelix}
}
License
AutoHelix is licensed under the Apache License 2.0.
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 autohelix-0.0.1.tar.gz.
File metadata
- Download URL: autohelix-0.0.1.tar.gz
- Upload date:
- Size: 74.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
129b3a12eaf9b0aaefd8a7d3614261ccf3a0e6afc1e049a1f1377199395c488c
|
|
| MD5 |
6d6ad8f0858c73e105e5ea233698c90a
|
|
| BLAKE2b-256 |
95e99444f5c22c88a4d5c3e19d677d3cf7a7541d694974cdb65f8b688604f634
|
Provenance
The following attestation bundles were made for autohelix-0.0.1.tar.gz:
Publisher:
publish.yml on awslabs/AutoHelix
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
autohelix-0.0.1.tar.gz -
Subject digest:
129b3a12eaf9b0aaefd8a7d3614261ccf3a0e6afc1e049a1f1377199395c488c - Sigstore transparency entry: 2257839406
- Sigstore integration time:
-
Permalink:
awslabs/AutoHelix@c586b8c9bdccf90f874e43062375e2e53ac251a2 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/awslabs
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c586b8c9bdccf90f874e43062375e2e53ac251a2 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file autohelix-0.0.1-py3-none-any.whl.
File metadata
- Download URL: autohelix-0.0.1-py3-none-any.whl
- Upload date:
- Size: 91.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6cf14bdca43ef347e35abc59fd4fb17632c19d0fb2d78baef3ed52378a363c54
|
|
| MD5 |
7dea188b6d7a6d232a85a8f5e7c9bd0a
|
|
| BLAKE2b-256 |
e6823379157486941d87b5563298180ff59dfbd19cf14a74ba1f2d623f241cb8
|
Provenance
The following attestation bundles were made for autohelix-0.0.1-py3-none-any.whl:
Publisher:
publish.yml on awslabs/AutoHelix
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
autohelix-0.0.1-py3-none-any.whl -
Subject digest:
6cf14bdca43ef347e35abc59fd4fb17632c19d0fb2d78baef3ed52378a363c54 - Sigstore transparency entry: 2257839935
- Sigstore integration time:
-
Permalink:
awslabs/AutoHelix@c586b8c9bdccf90f874e43062375e2e53ac251a2 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/awslabs
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c586b8c9bdccf90f874e43062375e2e53ac251a2 -
Trigger Event:
workflow_dispatch
-
Statement type: