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

AxExamples

type AxExamples<T> = T extends AxSignature<infer IN, infer OUT> ? OUT & Partial<IN> : T extends AxSignatureBuilder<infer IN2, infer OUT2> ? OUT2 & Partial<IN2> : T extends AxGen<infer IN4, infer OUT4> ? OUT4 & Partial<IN4> : T extends string ? ParseSignature<T> extends object ? OUT3 & Partial<IN3> : never : never;

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

Type Parameters

Type Parameter
T