- Install the CLI in your agent repo.
- Add a tiny harness that calls your real agent.
- Run one task against a clone.
What you’ll prove
Your first run asks your agent to inspect a seeded GitHub clone and summarize its open issues - read-only, so production GitHub is untouched. Archal starts the clone, runs your agent, collects the trace, and prints a satisfaction score. This matches thescenarios/first-run.md that archal init scaffolds; once it
passes, swap in write tasks like creating or closing issues.
Install
Run this inside your agent’s repository:init detects your agent platform, adds archal as a dev dependency, copies
helper skills into the repo, and creates .archal.json, .archal/harness.mjs,
and scenarios/first-run.md. Requires Node.js 20.20 or later (the version
archal declares in engines). If your agent supports skills, start with
archal-agent; it can help wire the starter harness to your agent.
Run
init inside a folder with a package.json. With no package.json, it
installs the skills and config but skips adding the archal dev dependency
and tells you to install it globally (npm i -g archal) or run npm init first.Log in
archal whoami to confirm your workspace and skip this step.
For CI, SSH, or any headless environment, set a workspace API key
(archal_ws_...) as ARCHAL_TOKEN:
archal workspace api-key create ci-runner from a logged-in
owner/admin session, or from the dashboard under Settings > API Keys. Copy
it once and store it as a secret. See archal workspace for
list/revoke commands.
A workspace API key is already bound to one workspace. If you use a user token
and belong to more than one workspace, set ARCHAL_WORKSPACE_ID to target a
specific one:
archal login (browser OAuth) is the easiest path.
Add a harness
Archal needs a command it can run without opening your app UI.archal init
creates ./.archal/harness.mjs for you. Edit it so runAgent() calls your
real agent:
./.archal/harness.mjs
api.github.com. Archal routes supported service traffic to clones
during the run.
Add .archal.json so Archal knows how to start it:
Run your first scored task
init already wrote .archal.json (clone + scenario + harness). If your
harness calls normal service domains like api.github.com, use Docker or
sandbox mode so Archal can route DNS/TLS to clones:
When
.archal.json lists a scenario, that scenario runs. To try an ad-hoc
inline task instead, run in a folder without a configured scenario:
npx archal run --task "List recent issues" --harness ./.archal/harness.mjs --clone github.npx archal run is only appropriate when the harness calls explicit clone
URLs, such as the minimal clone-calling harness linked above.
Write a scenario
Inline tasks are good for smoke tests. For repeatable checks, write a scenario:What to read next
- Run scenarios against your agent to adapt a real app or agent repo.
- Writing scenarios to turn one-off tasks into repeatable tests.
- Clone sessions to inspect stable clone endpoints manually.
