ancha.yaml configures ancha run and ancha doctor. ancha init writes one. The CLI reads ancha.yaml in the current directory, or the file passed with --config. Without a file, the defaults below apply. ancha schema ancha prints the JSON Schema.
ancha.yaml
scenes globs and agent.cwd, are relative to the directory you run the CLI from, even when --config points elsewhere.
Top-level fields
Unknown fields are errors. See Validation.
Command agents
A command agent is a process Ancha starts for each trial. It gets the task and tool variables in its environment and is done when it exits.
The agent process starts with a base set of variables from your shell (
PATH, HOME, USER, LOGNAME, SHELL, LANG, LC_*, TERM, TMPDIR, TZ, NODE_EXTRA_CA_CERTS, SSL_CERT_FILE, VIRTUAL_ENV, CONDA_PREFIX, PYTHONPATH), the names in agent.pass_env, the variables in Environment variables and agent.env. Entries in agent.env win. Nothing else from your shell reaches it, unless you run with --inherit-env. See ancha run.
Endpoint agents
An endpoint agent is an HTTP server that receives events. Settingagent.url selects this mode; it cannot be combined with agent.command.
parallel above 1 needs start and {{agent.port}} in both url and ready_url, so each trial gets its own server on a loopback address. Endpoint agents cannot use slack_transport: socket. To end a trial early, POST {} to ANCHA_DONE_URL with Authorization: Bearer <ANCHA_TRIAL_TOKEN>.
Templates
Values inagent.env and the endpoint URLs may contain {{name}} placeholders. An unknown name is an error whose hint lists the available ones.
Agent execution
agent.execution decides where the agent process runs.
In a container, the agent runs as a non-root user with a read-only root, no host folders and no Docker socket.
ANCHA_STATE_DIR is /state. For Node agents, install the dependencies at /opt/ancha/node_modules in the image; each trial links them into /workspace:
ancha execution), and do not support Slack Socket Mode or Google Ads.
The agent must use the base URLs it is given. For allowed providers, Ancha sets OPENROUTER_BASE_URL (and OPENAI_BASE_URL if unset) or the matching OpenAI and Anthropic base URLs to a local gateway, and ANCHA_MODEL_URLS maps each allowed domain for other clients.
Validation
Every problem is reported at once, with its path and a hint, and the command exits2:
Output
500ms, 10s, 1m30s.