360 Secure SkillHub
360 安全技能中心

Zouroboros Autoloop

读取 program.md 规范后创建 git 分支并循环执行:提出改动→提交→运行实验命令→提取数值指标→保留提升、回滚退化;可用 --executor 指定任意从 stdin 读取提示的 LLM CLI,并附带 MCP 服务器暴露启动、状态、结果、停止与列表工具。

marlandoj
marlandoj
热度 38.41
最近更新 2026-05-18 11:43:35
分类:自动化依赖:代码执行 / 读写文件 / 内部调用大模型应用场景:自动化脚本 / 工作流 / 数据处理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add zouroboros-autoloop
Metadata
name
zouroboros-autoloop
description
Autonomous optimization loop inspired by Andrej Karpathy's autoresearch: edit, experiment, measure, keep or revert. Best for any task with a numeric metric.
version
1.0.0
compatibility
OpenClaw, Claude Code, Codex CLI, any Node.js 22+ environment
metadata
{"author":"marlandoj.zo.computer","openclaw":{"emoji":"🔄","requires":{"bins":["node","git"]},"install":[{"id":"node-zouroboros-autoloop","kind":"node","package":"zouroboros-autoloop","bins":["autoloop","autoloop-mcp"],"label":"Install Zouroboros Autoloop (npm)"}],"homepage":"https://github.com/AlaricHQ/zouroboros-openclaw"}}

Zouroboros Autoloop

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.

Quick Start

npm install -g zouroboros-autoloop

# Create a program.md (see template below), then:
autoloop --program ./program.md --executor "openclaw ask"

Usage

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: "openclaw ask"
    • Claude Code: "claude --print"
    • Any LLM CLI that reads stdin
  • --resume — Resume from an existing autoloop branch
  • --dry-run — Validate program.md without running

MCP Server

Autoloop includes an MCP server for tool-based integration:

autoloop-mcp --results-dir /path/to/projects

Tools exposed: autoloop_start, autoloop_status, autoloop_results, autoloop_stop, autoloop_list

program.md Template

# 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

Constraints

  • Time budget per run: 60
  • Max experiments: 50
  • Max duration: 4
  • Max cost: 5

Stagnation

  • Threshold: 8
  • Double threshold: 15
  • Triple threshold: 25

Read-Only Files

  • backtest.js
  • historical-data.csv

Setup

npm install

Notes

Focus on risk-adjusted returns. Avoid overfitting to recent data.


## 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)