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

AxRLMConfig

Defined in: https://github.com/ax-llm/ax/blob/71ea5064d766efdc031d375243a8e525911833e7/src/ax/prompts/rlm.ts#L43

RLM configuration for AxAgent.

Properties

PropertyTypeDescription
actorCallback?(result: Record<string, unknown>) => void | Promise<void>Called after each Actor turn with the full actor result.
actorFields?string[]Output field names the Actor should produce (in addition to javascriptCode).
compressLog?booleanIf true, the Actor must return actionDescription and action logs will store short action descriptions instead of full code blocks.
contextFieldsstring[]Input fields holding long context (will be removed from the LLM prompt).
maxBatchedLlmQueryConcurrency?numberMaximum parallel llmQuery calls in batched mode (default: 8).
maxLlmCalls?numberCap on recursive sub-LM calls (default: 50).
maxRuntimeChars?numberMaximum characters for RLM runtime payloads (default: 5000). Applies to llmQuery context and code execution output.
maxTurns?numberMaximum Actor turns before forcing Responder (default: 10).
mode?"simple" | "advanced"Sub-query execution mode (default: ‘simple’). - ‘simple’: llmQuery delegates to a plain AxGen (direct LLM call, no code runtime). - ‘advanced’: llmQuery delegates to a full AxAgent (Actor/Responder + code runtime).
runtime?AxCodeRuntimeCode runtime for the REPL loop (default: AxJSRuntime).