# ax | Ax | Knowledge Base | Instagit

The pretty much "official" DSPy framework for Typescript

GitHub Stars: 2.4k

Repository: https://github.com/ax-llm/ax

---

## Articles

### [How Ax Generates JSON Schema from Signatures for Structured Output](/ax-llm/ax/how-ax-generates-json-schema-from-signatures)

Ax generates JSON Schema from signatures for structured LLM output using declarative field definitions and validation constraints. Learn how Ax delivers precise structured data.

- Tags: how-to-guide
- Published: 2026-02-25

### [How to Leverage Thinking or Reasoning Tokens within Ax: A Complete Guide to Chain-of-Thought AI](/ax-llm/ax/how-to-leverage-thinking-reasoning-tokens-within-ax)

Unlock chain-of-thought reasoning in Ax LLM. Configure thinking token budgets for enhanced AI responses. Supports OpenAI, Gemini, and Anthropic.

- Tags: how-to-guide
- Published: 2026-02-25

### [How Context Caching Works with Different LLM Providers in Ax](/ax-llm/ax/how-context-caching-works-with-llm-providers-ax)

Learn how Ax enables provider-agnostic context caching for LLMs. Discover how to use the .cache() modifier to serialize reusable prompt segments for efficient LLM interactions.

- Tags: deep-dive
- Published: 2026-02-25

### [How to Configure Rate Limiting for API Calls Made by Ax](/ax-llm/ax/how-to-configure-rate-limiting-for-ax-api-calls)

Easily configure rate limiting for API calls made by Ax. Ax's token-based rate limiter tracks usage and delays requests to manage your token budget effectively.

- Tags: how-to-guide
- Published: 2026-02-25

### [Migration Strategies for Updating Ax Projects: From v13 Factory Functions to v15](/ax-llm/ax/migration-strategies-for-updating-ax-projects)

Update Ax projects from v13 to v15 seamlessly. Learn strategies to replace factory functions, adopt new classes, and ensure type safety for future compatibility.

- Tags: migration-guide
- Published: 2026-02-25

### [How to Debug Ax Applications and Trace Operations with OpenTelemetry](/ax-llm/ax/how-to-debug-ax-applications-opentelemetry)

Debug Ax applications and trace AI operations with OpenTelemetry. Configure the Node SDK to monitor prompts to responses and control payload visibility for effective troubleshooting.

- Tags: how-to-guide
- Published: 2026-02-25

### [How to Write Unit and Integration Tests for Ax Code: Vitest Patterns and Examples](/ax-llm/ax/how-to-write-tests-for-ax-code)

Learn to write unit and integration tests for Ax code using Vitest patterns. Discover deterministic LLM mocks with AxMockAIService for efficient testing, reducing API dependencies.

- Tags: how-to-guide
- Published: 2026-02-25

### [How to Configure the AxJSRuntime for Secure JavaScript Sandboxing in Ax](/ax-llm/ax/how-to-configure-javascript-runtime-for-sandboxing)

Secure your Ax applications by configuring AxJSRuntime for robust JavaScript sandboxing. Block dangerous globals and grant selective permissions to enhance security.

- Tags: how-to-guide
- Published: 2026-02-25

### [How to Add a Custom LLM Provider to Ax: A Complete Implementation Guide](/ax-llm/ax/how-to-add-custom-llm-provider-to-ax)

Implement a custom LLM provider for Ax by extending AxAIService and wrapping it with AxAIProvider. Integrate any language model seamlessly with the Ax SDK for full compatibility. Get the complete guide.

- Tags: how-to-guide
- Published: 2026-02-25

### [How to Use the Memory System in Ax for Context Management](/ax-llm/ax/how-to-use-memory-system-for-context-management)

Master Ax memory for context management. Learn to track interactions, rewind with tags, and integrate persistence using AxMemory and MCP servers.

- Tags: how-to-guide
- Published: 2026-02-25

### [How to Handle Multi-Modal Inputs (Images, Audio) in Ax Applications](/ax-llm/ax/how-to-handle-multimodal-inputs-in-ax)

Learn to handle multi-modal inputs like images and audio in Ax applications. Discover how AxChatRequest processes various media or uses fallback strategies for seamless integration.

- Tags: how-to-guide
- Published: 2026-02-25

### [How Streaming Output Works in Ax: Implementation and Handling Guide](/ax-llm/ax/how-streaming-output-works-in-ax)

Learn how Ax implements streaming output with an asynchronous generator for real-time LLM response consumption. Explore the streamingForward() method and handle incremental deltas efficiently.

- Tags: how-to-guide
- Published: 2026-02-25

### [How to Set Up Retrieval-Augmented Generation (RAG) in Ax: A Complete Guide](/ax-llm/ax/how-to-set-up-rag-in-ax)

Learn how to set up Retrieval-Augmented Generation (RAG) in Ax. This guide shows you how Ax provides a production-ready RAG implementation using a vector database and configuration.

- Tags: how-to-guide
- Published: 2026-02-25

### [Ax Optimizer Options Explained: How to Use MiPRO, ACE, and GEPA](/ax-llm/ax/ax-optimizer-options-mipro-ace-gepa-usage)

Explore Ax optimizer options MiPRO, ACE, and GEPA for Bayesian search, playbook refinement, and multi-objective evolution. Learn to configure and use these powerful Ax tools.

- Tags: deep-dive
- Published: 2026-02-25

### [How to Use AxFlow for Building and Managing AI Workflows in TypeScript](/ax-llm/ax/how-to-use-axflow-for-workflows)

Learn to build and manage AI workflows in TypeScript with AxFlow. This fluent orchestration engine offers parallel execution, type-safe state, and observability for production-grade AI applications.

- Tags: how-to-guide
- Published: 2026-02-25

### [How to Create Agents with Tools Using the ReAct Pattern in Ax](/ax-llm/ax/how-to-create-agents-with-tools-react-pattern)

Learn to create agents with tools using the ReAct pattern in Ax. Integrate LLMs with custom functions for intelligent decision-making and efficient tool execution.

- Tags: tutorial
- Published: 2026-02-25

### [How to Set Up RLM for Long Context Document Processing in Ax](/ax-llm/ax/how-to-set-up-rlm-for-long-context-processing)

Master RLM setup for extensive document processing in Ax LLM. Leverage its semantic context manager and iterative actor-responder architecture for superior long-context handling. Get started today.

- Tags: how-to-guide
- Published: 2026-02-25

### [How Validation and Constraint Handling Works in Ax Signatures: A Complete Technical Guide](/ax-llm/ax/how-validation-constraints-work-in-ax-signatures)

Learn how Ax signatures ensure data integrity with construction time validation and runtime constraint handling. Explore the technical guide for deep insights.

- Tags: deep-dive
- Published: 2026-02-25

### [How to Use the Fluent API for Complex Signatures in Ax: A Complete Guide](/ax-llm/ax/how-to-use-fluent-api-for-complex-signatures)

Learn to use Ax's type-safe fluent API to programmatically build complex signatures. Explore chainable validation modifiers and nested object support in this comprehensive guide.

- Tags: tutorial
- Published: 2026-02-25

### [How to Switch Between LLM Providers in Ax: A Complete Guide](/ax-llm/ax/how-to-switch-llm-providers-in-ax)

Easily switch between LLM providers in Ax by modifying the ai factory function's name property. Our guide shows you how to update this setting for seamless provider changes.

- Tags: how-to-guide
- Published: 2026-02-25

