- 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
onboard; 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_...). Workspace keys are bound to one workspace, do not expire
when a team member leaves, and are the recommended auth for CI:
sessions:read, sessions:write, workspaces:read.
Workspace keys are already bound to a workspace, so ARCHAL_WORKSPACE_ID is
usually unnecessary. If you set it and it targets a different workspace, the
request fails with workspace_key_scope_mismatch.
Workspace keys are runtime and CI credentials, not governance credentials.
They can run clones, upload and read traces, and read usage for their bound
workspace. They cannot manage workspace API keys or audit events. Use
an owner/admin user credential, either archal login or a dashboard-issued
user API key, for workspace administration.
For local development, archal login (browser OAuth) is the easiest path.
You can also set a personal token (arc_...) from the
dashboard tokens page:
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), so a bare run
is all you need:
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.Write a scenario
Inline tasks are good for smoke tests. For repeatable checks, write a scenario:What to read next
- Use an existing agent repo 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.
