Environment
.env loading
At startup, the CLI loads .env from the project root. Values already set in your shell win; .env supplies only missing values.
# .env
ANTHROPIC_API_KEY=sk-ant-...
AZURE_OPENAI_API_KEY=...
AZURE_OPENAI_ENDPOINT=https://example.services.ai.azure.com/openai/v1/
AZURE_OPENAI_API_VERSION=2024-10-21
TOGETHER_API_KEY=...
MORPH_API_KEY=...Don't commit .env — the project template adds it to .gitignore.
Provider credentials
Which variables are required depends on which models appear in your agent configs.
| Variable | Used by | Notes |
|---|---|---|
ANTHROPIC_API_KEY | Claude models | Required for any claude-* model |
AZURE_OPENAI_API_KEY | Azure-routed OpenAI | Required alongside endpoint |
AZURE_OPENAI_ENDPOINT | Azure OpenAI or Azure AI Foundry v1 | Use the resource endpoint, or the /openai/v1/ endpoint for Foundry deployments |
AZURE_OPENAI_API_VERSION | Azure OpenAI | Optional; defaults to 2024-10-21 where needed |
TOGETHER_API_KEY | Together AI | Use with together: model prefixes |
OPENAI_API_KEY | OpenAI direct | Fallback when Azure isn't configured |
AWS_REGION / AWS_DEFAULT_REGION | Bedrock through SDKs | Region selector |
AWS_BEARER_TOKEN / AWS_BEARER_TOKEN_BEDROCK | Bedrock script-style provider | Used by script-style Bedrock agent runners |
AWS_BEDROCK_ENDPOINT | Bedrock script-style provider | Optional explicit Bedrock endpoint |
Model routing depends on the harness path. See Providers.
Run-control paths
The run-control CLI and web status surface accept explicit paths for mutable operational state and persisted plans:
uv run aec-bench run status <run-id> \
--operational-store artefacts/operational.sqlite \
--plan-root artefacts/runsIn --dev mode, the launcher passes these paths to the reloadable FastAPI
process through environment variables:
| Variable | Purpose |
|---|---|
AEC_BENCH_OPERATIONAL_STORE | SQLite OperationalStore path for run progress |
AEC_BENCH_PLAN_ROOT | Root containing persisted run plans |
The web status route is GET /api/runs/{run_id}/status. The TUI run-progress
view reads the same two roots.
Agent runtime overrides
The container agent runtime reads a few environment variables, mostly for script-style and RLM adapters that pass arguments through the environment:
| Variable | Purpose | Default |
|---|---|---|
AGENT_MODEL | Model name override | — |
AGENT_INSTRUCTION | Task instruction for runtimes that receive it through the environment | — |
AGENT_MAX_TOKENS | Max output tokens | 16384 |
AGENT_MAX_TURNS | Max turns in a multi-turn loop | 10 |
AGENT_COMMAND_TIMEOUT | Per-command timeout (seconds) | 120 |
AGENT_TOOLS_JSON | JSON array of tool specs | — |
AGENT_API_VERSION | Azure API version | 2024-10-21 |
The harness usually sets these automatically. Custom adapter shells can override them.
Backend credentials
| Variable | Backend | Notes |
|---|---|---|
MODAL_TOKEN_ID, MODAL_TOKEN_SECRET | Modal | Set via modal token set |
MORPH_API_KEY | Morph Cloud through Harbor | Required when --backend morph is used |
| Prime CLI auth | Prime hosted eval/training | Managed by the prime CLI |
Keep these credentials in the shell, .env, or the provider's own auth store. Do not put secrets in experiment YAML.
File layout
A new project contains the files and directories that aec-bench init creates directly:
project_root/
├── aec-bench.toml # project config
├── suite.toml # example generated-suite config
├── .gitignore
├── .claude/
│ └── skills/
│ ├── add-task/
│ ├── configure-experiment/
│ ├── create-dataset/
│ ├── create-template/
│ ├── domain-check/
│ ├── hardening-pass/
│ └── meta-harness/
├── .agents/
│ └── skills/ # the same seven packaged skills
├── tasks/ # includes one example unless --no-example
├── seeds/
├── artefacts/
│ ├── ledger/
│ └── datasets/Create .env yourself when the project needs credentials; .gitignore already excludes it. Authoring and execution commands create or consume configured paths such as jobs/, templates/, and artefacts/feedback/ when needed.
Use aec-bench init --update-skills to refresh the seven packaged skills in .claude/skills/ and .agents/skills/ while preserving other skill directories.
Global user config
Per-user path defaults live at ~/.config/aec-bench/config.json:
{
"tasks_root": "tasks",
"ledger_root": "artefacts/ledger",
"feedback_root": "artefacts/feedback",
"jobs_root": "jobs",
"datasets_root": "artefacts/datasets"
}Managed via aec-bench config view|set|reset. Project-level settings take precedence over these path defaults. The project loader also has built-in defaults for source-only paths such as templates_root and seeds_root.
Precedence
Path settings resolve in this order (highest wins):
- CLI path flag such as
--tasks-root - Project config (
aec-bench.toml) - Global user config (
~/.config/aec-bench/config.json) - Built-in defaults
Compute selection is separate. A config-based run uses compute.backend from experiment.yaml. An inline run uses --backend and defaults to modal.
Environment variables bypass the path ladder. They are either credentials required by provider SDKs at call time or agent-runtime overrides read by a container entry script.
Treat source tasks, datasets, and evolution workspaces as the source of truth. Regenerate local Prime packages and swarm outputs when those sources change.