← 返回 Skills 市场
lanyasheng

Autoloop Controller

作者 _silhouette · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
106
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install auto-autoloop-controller
功能描述
When continuous automated improvement of a Skill is needed. Wraps improvement-orchestrator in a persistent loop with convergence detection (plateau/oscillati...
使用说明 (SKILL.md)

Autoloop Controller

Wraps improvement-orchestrator in a persistent loop with convergence detection and cost control.

When to Use

  • Continuously improve a skill over multiple iterations (overnight runs)
  • Schedule periodic improvement cycles via cron
  • Run a fixed number of improvement iterations with automatic plateau detection

When NOT to Use

  • Single-shot improvement → use improvement-orchestrator
  • Only want scores → use improvement-learner
  • Only want baseline data → use benchmark-store

CLI

python3 scripts/autoloop.py \
  --target /path/to/skill \        # REQUIRED: skill directory to improve
  --state-root /path/to/state \    # REQUIRED: persistent state directory
  --max-iterations 5 \             # default 5: total iterations before stop
  --max-cost 50.0 \                # default 50.0: cost cap in USD
  --plateau-window 3 \             # default 3: consecutive no-improvement rounds → stop
  --cooldown-minutes 30 \          # default 30: delay between iterations in continuous mode
  --mode single-run \              # single-run | continuous | scheduled
  --dry-run                        # simulate without calling orchestrator
Param Default When to change
--max-iterations 5 Raise to 20 for overnight runs; lower to 2 for quick tests
--max-cost $50.0 Lower to $5 for testing; raise for production overnight runs
--plateau-window 3 Raise to 5 if improvements are slow but steady
--cooldown-minutes 30 Lower to 5 for rapid iteration; raise to 60 for rate-limited APIs
--dry-run false Use to test loop logic without running real orchestrator

3 Modes

Mode Behavior Exit Condition
single-run Loop through iterations, exit when termination hit max_iterations / cost_cap / plateau / oscillation
continuous Loop with cooldown_minutes sleep between iterations Same + Ctrl+C saves state gracefully
scheduled Run exactly 1 iteration then exit Cron triggers next run; state persists in autoloop_state.json

Termination (4 conditions, OR logic)

  1. max_iterations reached
  2. cost_cap exceeded (rough estimate: ~$0.10/min of LLM time)
  3. Score plateau: weighted_score no improvement for plateau_window consecutive rounds
  4. Oscillation: keep-reject alternating pattern detected over 4-round window

Cross-Session State

State persists in {state-root}/autoloop_state.json (dataclass → JSON):

{"schema_version": "1.0", "target": "/path/to/skill",
 "iterations_completed": 3, "max_iterations": 5,
 "total_cost_usd": 1.23, "max_cost_usd": 50.0,
 "score_history": [{"iteration": 1, "weighted_score": 0.72, "decision": "keep"}, ...],
 "plateau_counter": 1, "status": "running"}

Resume a stopped run: just re-run the same command — AutoloopState.load() picks up from where it left off.

Output Artifacts

  • handoffs/iteration-N.md — per-iteration handoff with Decided/Rejected/Scores/Remaining sections for cross-iteration context survival
  • iteration_log.jsonl — one JSON line per iteration: {"iteration": 1, "decision": "keep", "weighted_score": 0.72, "cost_usd": 0.15, "candidate_id": "cand-01-docs"}
  • autoloop_state.json — full serialized state for cross-session resume

\x3Cexample> Run 5 iterations with cost cap: $ python3 scripts/autoloop.py --target /path/to/skill --state-root ./state --max-iterations 5 --max-cost 10.0 → --- Iteration 1/5 --- → Decision: keep Weighted score: 0.7200 Cumulative cost: $0.1500 → --- Iteration 2/5 --- → Decision: keep Weighted score: 0.7800 Cumulative cost: $0.3100 → --- Iteration 3/5 --- → Decision: keep Weighted score: 0.7800 Cumulative cost: $0.4600 → Stopped: plateau detected (no improvement in last 3 iterations) → State saved: ./state/autoloop_state.json \x3C/example>

\x3Canti-example> Running continuous mode without checking cost cap: $ python3 scripts/autoloop.py --target /path/to/skill --state-root ./state --mode continuous --max-cost 50.0 → Default $50 cap applies. For overnight runs, explicitly set --max-cost. → Always verify cost cap BEFORE launching continuous mode. \x3C/anti-example>

Error Handling

  • Orchestrator subprocess failure: state.status = "error", stderr saved to last_failure_trace, loop exits
  • KeyboardInterrupt (Ctrl+C): state saved as status=completed, graceful exit
  • Unhandled exceptions: traceback saved to last_failure_trace, status=error, exit code 1

Related Skills

  • improvement-orchestrator: Single pipeline run (called as subprocess each iteration)
  • improvement-learner: Provides dimension scores consumed by _load_latest_scores() for weighted_score computation
  • benchmark-store: Pareto front data for convergence tracking
安全使用建议
This skill appears to do what it claims: repeatedly run the improvement-orchestrator, persist state, and stop on convergence/cost limits. Before installing or running: 1) Verify the improvement-orchestrator and improvement-learner skills (invoked by this loop) and any LLM/evaluator they call — those components may require API keys or network access. 2) Provide a dedicated state-root (not a sensitive system directory) because autoloop writes logs, JSONL iteration logs, handoffs, and a persistent autoloop_state.json. 3) Use --dry-run to test loop logic and verify outputs, and set conservative --max-cost before running continuous/overnight jobs. 4) If you will schedule this via cron, ensure the cron user's environment has necessary credentials and that you accept the cost implications of automated runs.
功能分析
Type: OpenClaw Skill Name: auto-autoloop-controller Version: 1.0.0 The auto-autoloop-controller skill is a legitimate orchestration tool designed to automate the iterative improvement of other skills within the OpenClaw ecosystem. The core logic in scripts/autoloop.py manages a persistent loop that executes an improvement orchestrator via subprocess, tracks LLM costs, detects performance plateaus/oscillations to prevent infinite loops, and maintains state in a local JSON file. The code follows safe practices, such as using structured arguments for subprocess calls and providing clear cost-control mechanisms, with no evidence of data exfiltration, malicious instructions, or unauthorized access.
能力评估
Purpose & Capability
Name/description match the implementation: autoloop.py runs repeated improvement-orchestrator subprocesses, persists state, detects plateau/oscillation, and enforces cost/iteration caps. No unrelated binaries or secrets are requested.
Instruction Scope
SKILL.md and autoloop.py limit actions to launching the orchestrator as a subprocess, reading/writing local state/log files, computing scores, and writing handoff artifacts. There are no instructions to read unrelated system paths or to transmit state to external endpoints. The code does modify sys.path to locate sibling modules and expects a repo layout that includes lib.common and the improvement-orchestrator skill.
Install Mechanism
No install spec provided (instruction-only). Files are included in the skill bundle; nothing is downloaded from external URLs and no archive extraction/install steps are present.
Credentials
The skill itself declares no required environment variables or credentials, which is appropriate. Note: it invokes improvement-orchestrator (a separate skill) as a subprocess — that orchestrator or the LLM/evaluator it runs may require API keys or other credentials outside this bundle. Users should review the orchestrator/learner skills for any credential needs and ensure autoloop is run with a non-sensitive state-root path.
Persistence & Privilege
No always:true privilege; the skill writes state and logs to the user-provided state-root (expected behavior). It does not modify other skills' configs or global agent settings beyond creating files under the specified state directory.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install auto-autoloop-controller
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /auto-autoloop-controller 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: closed-loop skill improvement pipeline
元数据
Slug auto-autoloop-controller
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Autoloop Controller 是什么?

When continuous automated improvement of a Skill is needed. Wraps improvement-orchestrator in a persistent loop with convergence detection (plateau/oscillati... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 106 次。

如何安装 Autoloop Controller?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install auto-autoloop-controller」即可一键安装,无需额外配置。

Autoloop Controller 是免费的吗?

是的,Autoloop Controller 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Autoloop Controller 支持哪些平台?

Autoloop Controller 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Autoloop Controller?

由 _silhouette(@lanyasheng)开发并维护,当前版本 v1.0.0。

💬 留言讨论