Quick start
For scored clone runs, run the harness in Docker or the sandbox:Saving a harness to the workspace
Saved harnesses and scenarios are workspace-scoped artifacts you reuse across projects. They are not auto-saved onarchal run - the run uses whichever
local file you pass via --harness or .archal.json.
To make a local harness reusable across projects, create it explicitly:
archal harness list and archal scenario list --source workspace. See archal scenario for the full subcommand reference.
Custom harness directory
Point--harness at any directory containing your agent code:
harness.json when you want command defaults, prompt files, or a default model.
Manifest (harness.json)
Drop harness.json in the harness directory:
| Field | Type | Required | Description |
|---|---|---|---|
version | 1 | Yes | Schema version. Must be 1. |
defaultModel | string | No | Fallback model ID when --agent-model is not provided. |
promptFiles | string[] | No | Markdown files loaded in order and prepended to the scenario task. Paths are relative to the harness directory. |
local.command | string | No | Command to spawn (e.g., node, python, npx). |
local.args | string[] | No | Arguments passed to the command. |
local.env | object | No | Extra environment variables injected into the harness process. |
Add prompt files
List markdown files inpromptFiles when you want shared instructions prepended
to every scenario task:
AGENT_TASK:
Environment variables
Archal injects these into every harness process.Task and model
| Variable | Description |
|---|---|
AGENT_TASK | The full task text (prompt files + scenario prompt). ## Expected Behavior is never included - it’s the evaluator holdout. |
AGENT_MODEL | Model identifier from --agent-model or manifest defaultModel. |
Service connectivity
| Variable | Description |
|---|---|
NODE_EXTRA_CA_CERTS / SSL_CERT_FILE / REQUESTS_CA_BUNDLE | Short-lived CA paths for clients that need to trust the controlled TLS intercept. |
https://api.github.com,
https://slack.com/api, or https://api.stripe.com. Clone URLs, MCP configs,
and run credentials are managed by Archal and are not part of the harness
contract.
When using archal clone start for manual integration instead of archal run,
the per-clone URLs are exported as ARCHAL_<CLONE>_REST_URL and
ARCHAL_<CLONE>_MCP_URL. See Clone sessions for the
full env-var naming convention.
API keys
Passed through from your environment or config:| Variable | Provider |
|---|---|
OPENAI_API_KEY | OpenAI |
ANTHROPIC_API_KEY | Anthropic |
GEMINI_API_KEY |
Tuning overrides
| Variable | Description | Default |
|---|---|---|
ARCHAL_MAX_TOKENS | Max completion tokens per LLM call | Model-specific |
ARCHAL_TEMPERATURE | Sampling temperature | 0.2 |
ARCHAL_REASONING_EFFORT | OpenAI reasoning models: low, medium, high | medium |
ARCHAL_THINKING_BUDGET | Extended thinking: adaptive, off, or token count | adaptive |
ARCHAL_LLM_TIMEOUT | Per-LLM-call timeout in seconds | 120 |
ARCHAL_LOG_LEVEL | Harness log verbosity | info |
Base URL overrides
For Azure OpenAI, API proxies, or self-hosted endpoints:| Variable | Default |
|---|---|
ARCHAL_OPENAI_BASE_URL | https://api.openai.com/v1 |
ARCHAL_ANTHROPIC_BASE_URL | https://api.anthropic.com |
ARCHAL_GEMINI_BASE_URL | https://generativelanguage.googleapis.com/v1beta |
Metrics and trace output
Archal sets these paths. Your harness may write JSON to them for richer reports:| Variable | Description |
|---|---|
AGENT_METRICS_FILE | Path to write metrics JSON (token counts, timing, exit reason) |
AGENT_TRACE_FILE | Path to write agent trace JSON (thinking, text, tool calls per step) |
Service transport
Use the same client code you would use outside Archal. For GitHub, that can begh, Octokit, or fetch("https://api.github.com/..."). The controlled runtime
routes supported service traffic to the scenario clones and applies run
credentials server-side.
