Framework · Agent SDKs

Ax (AxACE optimizer)

Ax is a DSPy port that compiles typed declarative signatures into LLM calls and optimizes the resulting prompts and demonstrations against an evaluation metric.

Description

Ax is a framework for building LLM applications around declarative signatures rather than hand-written prompts. A signature declares the typed inputs and outputs of a step, and Ax turns it into the prompt, the output parser, the validators, and the retry loop, returning typed data. Ax includes optimizers, among them AxACE, which mirrors the Agentic Context Engineering paper's Generator-Reflector-Curator loop and a Genetic-Pareto optimizer that tunes prompts and demonstrations against evals. It is released under Apache 2.0.

Solution

A developer declares a signature stating what goes in and what comes out. Ax compiles the signature into a prompt, schema, parser, validators, and retry loop, runs it against the model, and returns typed output. Given example input/output pairs and a metric, an optimizer such as GEPA or AxACE searches for better prompts and demonstrations; AxACE additionally maintains a structured bullet playbook updated through add/update/remove deltas at inference time.

Primary use cases

  • building LLM pipelines from typed signatures
  • automatic prompt and few-shot optimization
  • agentic context engineering with an evolving playbook
  • type-safe structured outputs from LLMs

Open the full interactive page

Diagram, neighbourhood map, code examples, related patterns and full provenance.