Search documentation

Search the Fumadocs-backed documentation index.

Experiment YAML

Lookup reference for the AX experiment YAML schema: fields, object shapes, shorthand forms, constraints, and validation rules.

Experiment YAML is the file format passed to ax experiment run and ax experiment run --local.

The current parser accepts schema_version: 2 and rejects unknown fields at every level. For the canonical machine-readable schema, use experiment.v2.schema.yaml.

Schema URL

Use the version-pinned schema URL for editor validation:

# yaml-language-server: $schema=https://docs.514.ax/schema/experiment.v2.schema.yaml

Published schema URLs:

URLUse
https://docs.514.ax/schema/experiment.schema.yamlLatest supported schema
https://docs.514.ax/schema/experiment.v2.schema.yamlVersion-pinned v2 schema
https://docs.514.ax/schema/experiment.v1.schema.yamlLegacy v1 schema. v1 experiments no longer run; this remains available so older files that pin it still validate in-editor while migrating to v2.

ax experiment schema prints the latest supported schema to stdout.

Field index

ObjectFields
Top-level experimentschema_version, id, name, description, agents, models, prompts, agent_mode, environments, products, extensions, environment_variables, files, tests, limits
Agentname
Modelname, lab, effort, context_window_size, thinking, fast
Promptid, prompt, description, tags
Environmentname, setup, description, tags, commit
Productname, type, setup, version, commit, description, tags
Setupname, script, description, tags, files, environment_variables, mcp_servers, setup_checks
Extensionid, description, tags, agents, models, prompts, agent_mode, environments, products, extensions
Environment variablename, value
File entryname, source, sha256, dest
Testname, script
Setup checkname, script
MCP servername, type, command, args, url, env, headers
MCP stdio env entryname, from
MCP HTTP and SSE headername, value
Limitsmax_time_seconds

Minimal example

# yaml-language-server: $schema=https://docs.514.ax/schema/experiment.v2.schema.yaml
schema_version: 2
id: cli-install
name: "CLI install"

agents: [claude]
models: [claude-sonnet-4-6]

prompts:
  - id: install
    prompt: |
      Install the CLI and write its version to /workspace/version.txt.

products:
  - name: cli
    type: CLI
    setup: npm pack

tests:
  - name: version-file-exists
    script: test -f /workspace/version.txt

limits:
  max_time_seconds: 300

Top-level experiment

An experiment defines what you want to learn about agents using a product surface. It names the agents, prompts, products, environments, and tests AX uses to compute and run variants.

FieldRequiredType / shapeNotes
schema_versionYesIntegerMust be 2.
idYesKebab-case stringStable experiment id. Should match the YAML file name without .yaml.
nameYesStringHuman-readable experiment name.
descriptionNoStringOptional context used when analyzing outcomes.
agentsNoAgent axisOptional at the top level only if an extension supplies agents. Every resolved variant must have an agent.
modelsNoModel axisOptional. Cross-multiplied with agents; incompatible pairs are pruned. Absent ⇒ each agent runs its provider-default model.
promptsNoPrompt axisOptional at the top level only if an extension supplies prompts. Every resolved variant must have a non-empty prompt.
agent_modeNoAgent-mode axisOptional. build (default) or plan. Accepts a single value or list. plan runs the agent read-only (no mutations). Defaults to build.
environmentsNoEnvironment axisOptional.
productsNoProduct axisOptional.
extensionsNoExtension listOptional. If present, only extension-derived variants are created.
environment_variablesNoEnvironment variable list{name, value} entries injected into every variant. Values can be literals or ax://secrets/<slug> references resolved from your org secret store.
filesNoFile entry listHost files staged into every variant before setup runs.
testsYesTests listMust contain at least one test.
limitsYesLimits objectWall-clock timeout.

Top-level environment_variables and files apply to every variant. MCP servers and setup checks are setup-owned fields.

Variant axes

Variant axes are the experiment inputs AX combines into runnable variants. This lets you define the dimensions you care about once, then compare results by agent, prompt, environment, and product.

variants = agents × models × prompts × agent_mode × environments × products

Only agents and prompts must be specified: every resolved variant carries an agent and a prompt (each can also be supplied by an extension). The rest are optional. Omit models and each agent runs its provider-default model; omit agent_mode, environments, or products and that axis is left out of the cross product and of the variant coordinate.

Limits

limits sets the wall-clock timeout for each variant execution.

Limits object

FieldRequiredType / valuesNotes
max_time_secondsYesInteger greater than 0Wall-clock timeout in seconds enforced by the harness.

limits.max_turns and limits.max_cost_usd are removed authoring fields. ax experiment validate and platform submit reject both keys; remove them from new YAML. Only max_time_seconds remains.

Older runtime artifacts may still record a historical max_turns or cost_cap exit reason when a legacy run was stopped on a turn or spend cap; that is compatibility for past runs, not a current authoring field.

Secrets removed

The top-level (and setup) secrets: field is rejected by ax experiment validate and platform submit, including an empty secrets: []. Use environment_variables with literals or ax://secrets/<slug> references. MCP secret-forwarding fields reference declared environment_variables names, not store slugs.

Validation rules

An experiment is invalid if:

  • the YAML contains a field not defined by the schema
  • schema_version is not 2
  • any required field is missing
  • an id that must be kebab-case is not kebab-case
  • a model id contains ::
  • a declared axis is empty
  • duplicate ids or names appear where uniqueness is required
  • the resolved variant set is empty
  • a resolved variant has an empty prompt
  • two resolved variants collide on variant_id
  • no tests are defined
  • test names are duplicated
  • an env var name is invalid or reserved
  • a file entry has an invalid name, source, sha256, or dest
  • an MCP server mixes transport-specific fields
  • an MCP server references an env var name not visible to the variant
  • any secrets: key is present (removed; use environment_variables)
  • any limit is not greater than zero

YAML syntax boundaries

The experiment data model is JSON-compatible even though the authoring file is YAML.

  • YAML comments are allowed.
  • YAML anchors and aliases are allowed when the resolved value is JSON-compatible.
  • Custom YAML tags are unsupported.
  • Non-string mapping keys are unsupported.