Environment variables
Literal config and ax://secrets references injected into every variant.
environment_variables injects environment variables into variants at runtime. Use it for non-secret runtime configuration and supported secret references.
environment_variables:
- name: LOG_LEVEL
value: debug
- name: GITHUB_TOKEN
value: ax://secrets/prod-gh
- name: DATABASE_URL
value: ax://secrets/staging-dbEnvironment variable object
| Field | Required | Type / values | Notes |
|---|---|---|---|
name | Yes | Env-var name | Must match ^[A-Z_][A-Z0-9_]*$. Harness-reserved names and prefixes are rejected. |
value | Yes | String | Literal value or ax://secrets/<slug> reference (legacy axp://secrets/<slug> is also accepted). Other values beginning with ax:// or axp:// are rejected. |
Store secret values once with ax secret set <slug>, then reference them with ax://secrets/<slug>. Both platform and local ax experiment run invocations resolve these references before injecting env vars into the sandbox.
A referenced slug that does not exist in your org fails at preflight.
Reserved names:
ANTHROPIC_API_KEYANTHROPIC_BASE_URLOPENAI_API_KEYOPENAI_BASE_URLCURSOR_API_KEYMODELMAX_TURNSIS_SANDBOXTRACEPARENT- any name beginning with
AX_,AXP_,CLAUDE_CODE_,CODEX_,CURSOR_, orOTEL_