ax-llm/ax
A TypeScript library that brings DSPy's automatic prompt optimization model to JavaScript runtimes with a single API across 15+ LLM providers.

Ax implements DSPy’s signature-based prompt compilation, converting typed signatures into prompts at runtime that deliver validated, fully-typed outputs. The framework supports a wide range of LLM providers including OpenAI, Anthropic, Google Gemini, Mistral, and Ollama through a unified API. It includes built-in optimizers (Gepa/ACE) for automatic prompt tuning, agents and workflow support, sandboxed JavaScript runtime execution, streaming output parsing, and observability tooling for tracing and memory management.