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

f

const f: () => AxSignatureBuilder & object;

Defined in: https://github.com/ax-llm/ax/blob/9a5a7060a48f9eef46efc680b0cdf6b42bff5df2/src/ax/dsp/sig.ts#L179

Type declaration

NameType
array()<T>(baseType: T) => AxFluentFieldInfo<T["type"], true, T["options"], T["isOptional"]>
audio()(desc?: string) => AxFluentFieldType
boolean()(desc?: string) => AxFluentFieldType
class()<TOptions>(options: TOptions, desc?: string) => AxFluentFieldType
code()(language?: string, desc?: string) => AxFluentFieldType
date()(desc?: string) => AxFluentFieldType
datetime()(desc?: string) => AxFluentFieldType
file()(desc?: string) => AxFluentFieldType
image()(desc?: string) => AxFluentFieldType
internal()<T>(baseType: T) => T & object
json()(desc?: string) => AxFluentFieldType
legacyArray()<T>(baseType: T) => T & object
legacyInternal()<T>(baseType: T) => T & object
legacyOptional()<T>(baseType: T) => T & object
number()(desc?: string) => AxFluentFieldType
optional()<T>(baseType: T) => AxFluentFieldInfo<T["type"], T["isArray"], T["options"], true>
string()(desc?: string) => AxFluentFieldType
url()(desc?: string) => AxFluentFieldType