Loop orchestration

From runxhq/runx · View interactive version

Loop orchestration is an AI agent skill from the GitHub repository runxhq/runx. A demo of the pattern the `loop-orchestration` package describes. The package

How to use this skill

Skill file

Loop Orchestration

A demo of the pattern the loop-orchestration package describes. The package

is in skill/. Beside it, loop-host.mjs is the outer loop host, an

application script that submits governed runs of that package, and run.sh

runs it. The host is not part of the package.

Run It

sh examples/loop-orchestration/run.sh

The script runs three demonstrations:

before another run is submitted;

the tools its allowance names, read from the turn's view that the paused

request points to: what a host or an agent harness would receive, without a

model key.

The output prints each iteration's run id, receipt id, decision, and the

reason for or against another iteration.

Check The Tests

For the package's repeatable tests, use a fresh receipt store, so its

receipts are not mixed with earlier runs'.

tmpdir="$(mktemp -d)"
"${RUNX_BIN:-crates/target/debug/runx}" test examples/loop-orchestration/skill \
  --receipt-dir "$tmpdir" \
  --json

Adapting The Example

Replace loop-host.mjs with your real orchestrator and keep the same

shape:

load projection -> submit runx run -> read receipt/result -> check stop policy

Do not move product-specific scheduling or state into the kernel. If a loop

needs to wake up later, persist the loop state in the host and submit another

runx run when policy allows.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.