--docker to archal run. Service simulation outside Docker or sandbox mode is low-fidelity debug only.
In Docker mode, Archal builds and runs your repo in Docker, injects env vars describing the scenario, and captures stdout as the agent response.
How it works
- Archal resolves the repo-local harness you passed to
--harness. - Archal builds your image from the repo-root
Dockerfile(or a generated one if none exists). - Archal starts a TLS intercept sidecar that transparently forwards clone API traffic to the hosted cloud clones and adds the session auth header.
- Archal runs the container, passing all env vars described below and mounting an output directory at
/agent-output/. - Your container exits. Archal reads stdout as the agent response, stderr is logged, and non-zero exit code marks the run as failed.
Environment variables
All values are strings.Required
The harness should call normal service domains and use normal SDK credentials.
Archal-owned clone URLs, MCP server configs, and bearer tokens stay outside the
container process.
Optional - present when set by the caller
AGENT_CLONE_URLS never contains hosted Archal clone URLs or Archal bearer
tokens in Docker mode. If a custom client reads it, it should still make
normal service-domain requests; the sidecar handles routing and run auth.
TLS trust vars
These are injected automatically for clients that do not use the container trust store. They do not route service traffic; Docker networking maps real service domains to the TLS intercept sidecar.
Node.js, Python
requests, and curl all respect these vars out of the box. Other runtimes may need explicit CA configuration pointing to /agent-output/ca.crt.
Mounted files
The directory/agent-output/ is bind-mounted into the container. It contains:
Service access
Call normal service domains with normal SDKs or REST clients. For example, GitHub harnesses can usegh, Octokit, or native fetch with
signal: AbortSignal.timeout(15000); Slack harnesses can use
https://slack.com/api/...; Stripe harnesses can use https://api.stripe.com/....
Archal routes supported service traffic to the scenario clones and applies the
run credential.
Output contract
Your harness should write its final answer to stdout exactly once, at the end of execution. Progress output, tool call logs, and error messages should go to stderr.
Metrics file (optional)
Write a JSON payload to$AGENT_METRICS_FILE before exiting to surface
user-agent token usage in the run report and dashboard:
not reported by harness instead of token counts. This does not fail the run.
Evaluator token usage is reported separately from agent token usage.
exitReason should be one of: completed, max_steps, no_tool_calls, consecutive_errors, llm_error.
