ax-llm/ax
The pretty much "official" DSPy framework for Typescript
What it solves
Ax provides a unified, language-agnostic programming model for building LLM applications. It eliminates the need for manual prompt engineering and allows developers to define typed, structured generation across multiple languages (TypeScript, Python, Java, C++, Go, and Rust) using a single semantic core.
How it works
Ax uses "Signatures" to define inputs and outputs as typed structured data. These signatures can be defined via a string DSL, a fluent builder, or Standard Schema v1 validators (like Zod). The system compiles these definitions into native libraries for various languages. It features a three-stage agent pipeline (Distiller $\rightarrow$ Executor $\rightarrow$ Responder) and a recursive runtime (RLM) that manages long contexts by running JS in a sandboxed session and using checkpointed replay to prevent prompt bloat.
Who it’s for
Software engineers who need to build robust, type-safe LLM agents and workflows that must run across different runtime stacks or integrate into existing polyglot environments.
Highlights
- Multi-language support: Single core compiled into TypeScript, Python, Java, C++, Go, and Rust.
- Typed Structured Generation: End-to-end type safety using Zod, Valibot, or a custom string DSL.
- Advanced Agent Architecture: Includes context budgets, memory (vector/BM25), skills (runbooks), and a sandboxed JS runtime for tool execution.
- Provider Agnostic: Easily switch between providers (OpenAI, Anthropic, Gemini, etc.) via deployment profiles without changing code.
- AxFlow: A typed, chainable workflow runner that optimizes execution as a safe DAG.
- Multi-modal & Audio: Built-in support for image, audio, and realtime voice streams.
Related
- Project
- Dispatch
- Dispatch
- Project
- Dispatch