Skip to main content
ancha run exits 0 only when every scene meets its pass rate and no check regressed, so it works as a CI gate as is. You can run it two ways. In both modes the agent runs inside the CI job, so its own dependencies must be installed there. The agent does not see the job’s environment: it gets a base set, Ancha’s variables and the tools’ variables. Name the keys it needs, such as a model key, in agent.pass_env in ancha.yaml or with --pass-env. ANCHA_API_KEY stays with the CLI.

GitHub Actions

.github/workflows/ancha.yml
Pin the CLI version so a new release cannot change your results unannounced. Get ANCHA_SERVER_URL and a key from Settings; see Login and API keys. The first line of the run’s output says where its worlds ran, and the last line where the results went. A failed upload is a warning; add --upload-required to fail the job without its results, or run ancha runs upload latest as a later step. A job step that can time out can pass --idempotency-key with a value unique to the commit; a retry with the same key returns the original run instead of starting another. See ancha run.

Gating

Agents that use a model are not deterministic. Run several trials and set a pass-rate floor instead of demanding every trial pass:
ancha.yaml

Judge checks in CI

Judge checks need OPENROUTER_API_KEY in the job’s environment. ancha run reads it itself; the agent only gets it through --pass-env or agent.pass_env. Without the key, judge checks are skipped, and a required skipped check fails its trial. Keep rubrics you are still tuning out of pass. See Checks.