ax() API Structured generation APIs. cpp api api/ax packages/cpp/axir-api.json api ax() API

ax() API

Structured generation APIs for typed programs.

Most Used

axllm::ax

Create an AxGen program from a string or parsed signature.

FieldValue
Kindfunction
Ax conceptax
API sectionAxGen
Formaxllm::ax(signature, options)
ReturnsAxGen

Important Options

  • functions
  • examples
  • demos
  • modelConfig
  • maxRetries
  • streaming assertions
  • field processors

Examples

C++
auto qa = axllm::ax("question:string -> answer:string");

Full reference

axllm::AxGen

Structured generation program with forward, streaming, optimization, trace, usage, and tool-call behavior.

FieldValue
Kindtype
Ax conceptAxGen
API sectionAxGen
Formaxllm::AxGen(signature, options)
Returnsprogram object

Important Options

  • signature
  • functions
  • examples
  • demos
  • memory
  • prompt template

Full reference

axllm::Tool

Build a typed function tool. Rust uses tool because fn is reserved.

FieldValue
Kindfunction
Ax conceptfn
API sectionTools
Formaxllm::Tool(name, description, parameters, handler)
Returnstool builder or Tool

Important Options

  • name
  • description
  • args
  • returns
  • handler

Examples

C++
axllm::Tool search("search", "Search docs", axllm::object({}), handler);

Full reference

Advanced / internals / full reference

axllm::Tool

Callable tool descriptor with JSON-schema-compatible parameters and a host handler.

FieldValue
Kindtype
Ax conceptTool
API sectionTools
Formaxllm::Tool
Returnstool descriptor

Important Options

  • parameters
  • returns
  • handler

Full reference

Full Reference

Open the full C++ reference. This page highlights the ax symbols most relevant to everyday use.

Docs