Documentation

Build LLM-powered agents
with production-ready TypeScript

DSPy for TypeScript. Working with LLMs is complex—they don't always do what you want. DSPy makes it easier to build amazing things with LLMs. Just define your inputs and outputs (signature) and an efficient prompt is auto-generated and used. Connect together various signatures to build complex systems and workflows using LLMs.

15+ LLM Providers
End-to-end Streaming
Auto Prompt Tuning

AxCompileOptions

Defined in: https://github.com/ax-llm/ax/blob/be56d0cb4027af0a3a23d397cd01a57261e362d4/src/ax/dsp/common_types.ts#L159

Properties

PropertyType
auto?"light" | "medium" | "heavy"
earlyStoppingPatience?number
gepaAdapter?AxGEPAAdapter<any, any, any>
maxDemos?number
maxIterations?number
maxMetricCalls?number
overrideCheckpointInterval?number
overrideCheckpointLoad?AxCheckpointLoadFn
overrideCheckpointSave?AxCheckpointSaveFn
overrideCostTracker?AxCostTracker
overrideOnEarlyStop?(reason: string, stats: Readonly<AxOptimizationStats>) => void
overrideOnProgress?(progress: Readonly<AxOptimizationProgress>) => void
overrideTargetScore?number
overrideTeacherAI?AxAIService<unknown, unknown, string>
perfectScore?number
saveCheckpointOnComplete?boolean
skipPerfectScore?boolean
verbose?boolean