Search documentation

Search the Fumadocs-backed documentation index.

Extensions

Refine the variant matrix beyond the full cross product.

extensions refine the variant set when the base axes do not express the combinations you need. Use extensions to narrow an axis, swap products or environments for a subtree, or append prompt guidance to a slice of variants.

If an experiment declares any extensions, AX creates only extension-derived variants.

Extension object

An extension object is one node in the refinement tree. Nested extensions are recursively cross-multiplied with their parents.

FieldRequiredType / valuesNotes
idYesKebab-case stringMust be unique among sibling extensions.
descriptionNoStringHuman-readable notes.
tagsNoString listAdded to resolved variant tags.
agentsNoAgent listReplaces inherited agents for this extension subtree.
modelsNoModel axisReplaces inherited models for this extension subtree.
agent_modeNoAgent-mode axisReplaces inherited agent modes for this extension subtree.
promptsNoPrompt listAn axis: each entry forks its own variant branch, and that entry's text is appended to inherited prompt text. Does not replace the prompt axis.
environmentsNoEnvironment listReplaces inherited environments for this extension subtree.
productsNoProduct listReplaces inherited products for this extension subtree.
extensionsNoExtension listNested extensions.
prompts:
  - id: analyze
    prompt: "Read /workspace/task.md and write /workspace/report.json."

extensions:
  - id: with-cli
    products:
      - name: cli
        type: CLI
        setup: "curl -fsSL https://clickhouse.com/ | sh"
    prompts: ["Use the ClickHouse CLI for the analysis."]
  - id: without-cli
    products:
      - name: no-cli
        setup: "true"
    prompts: ["Do not use the ClickHouse CLI; use another local method."]

Prompt forking

An extension's prompts list is an axis, exactly like the top-level prompt list: each entry creates an independent variant branch, multiplied against the other axes the extension accumulates. Only the chosen entry's text is appended (after a blank line) to every inherited base prompt. The base prompt id is preserved; in a multi-entry list each entry's id follows the extension id in the variant id (bare strings get positional ids p0, p1, …). A single-entry list appends its suffix without adding an id coordinate. Like the extension's chosen environment and product, the entry id is a variant coordinate only — resolved_extend_id stays the extension id path that both arms share.

prompts:
  - id: base
    prompt: BASE
extensions:
  - id: scenario
    environments: [{ name: h, setup: "true" }]
    prompts:
      - id: global-only
        prompt: "Experiment: foo"
      - id: global-plus-scenario
        prompt: |
          Experiment: foo
          Investigate the gap.

This resolves to two variants: …::base::h::scenario::global-only (prompt BASE + Experiment: foo) and …::base::h::scenario::global-plus-scenario (prompt BASE + the two-line entry).