Archal runs in any CI environment. Set the auth token, pick an output format, set a pass threshold. The build fails if satisfaction drops below it. This guide assumes you’ve already runDocumentation Index
Fetch the complete documentation index at: https://docs.archal.ai/llms.txt
Use this file to discover all available pages before exploring further.
npx archal init locally so .archal.json, ./.archal/harness.ts, and archal as a devDependency are committed to the repo. The CI job only needs the CLI binary and an ARCHAL_TOKEN.
Secrets
The only required secret is your Archal token:GitHub Actions
GitLab CI
Useful flags
| Flag | What it does |
|---|---|
--pass-threshold <score> | Exit 1 if satisfaction is below this (0-100) |
-o json | Machine-readable JSON output |
-q | Suppress non-error output |
-n, --runs <count> | Run the scenario multiple times for a real satisfaction score |
--tag <tag> | Only run scenarios with a matching tag (exits 0 if no match) |
--preflight-only | Validate config and exit without running |
Exit codes
| Code | Meaning |
|---|---|
0 | Score met the threshold (or scenario skipped by --tag) |
1 | Score below threshold or runtime error |
2 | Validation error (bad flags, missing scenario, invalid config) |
Running multiple scenarios
If you have multiple scenario files, run them in a loop or use a suite in.archal.json:
Tips
- Start with
--pass-threshold 60and tighten as the agent improves. - Use
--runs 3or higher — single runs are noisy. -o jsonfor parseable output or CI artifacts.
