Autonomous single-metric optimization loop. Reads a program.md spec, creates a git branch, and loops: propose change → commit → run experiment → measure metric → keep improvements, revert regressions. Inspired by Andrej Karpathy's autoresearch concept.
bash
npm install -g zouroboros-autoloop
# Create a program.md (see template below), then:
autoloop --program ./program.md --executor "openclaw ask"
bash
autoloop --program <path/to/program.md> [--executor <command>] [--resume] [--dry-run]
--program — Path to your program.md specification (required)
--executor — Shell command that reads a prompt from stdin and outputs a response
"openclaw ask""claude --print"--resume — Resume from an existing autoloop branch
--dry-run — Validate program.md without running
Autoloop includes an MCP server for tool-based integration:
bash
autoloop-mcp --results-dir /path/to/projects
Tools exposed: autoloop_start, autoloop_status, autoloop_results, autoloop_stop, autoloop_list
markdown
# Program: my-optimization
## Objective
Optimize the trading strategy parameters for maximum Sharpe ratio.
## Metric
- **name**: sharpe_ratio
- **direction**: higher_is_better
- **extract**: `tail -1 results.csv | cut -d, -f3`
## Target File
`params.json`
## Run Command
```bash
node backtest.js --config params.json
bash
npm install
Focus on risk-adjusted returns. Avoid overfitting to recent data.
text
## Use Cases
- **Trading backtests** — Optimize strategy parameters against historical data
- **Prompt optimization** — Tune prompts to maximize a quality metric
- **Site performance** — Reduce load time, optimize bundle size
- **Model fine-tuning** — Iterate on hyperparameters with measurable output
## Part of the Zouroboros Ecosystem
Zouroboros is a self-improving AI orchestration framework. These standalone packages give you a taste of what's possible. For the full experience — persistent memory, swarm orchestration, scheduled agents, persona routing, and self-healing infrastructure — get a [Zo Computer](https://zo-computer.cello.so/IgX9SnGpKnR).
Built by [@Xmarlandoj](https://x.com/Xmarlandoj)