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

AxAgentConfig

Defined in: https://github.com/ax-llm/ax/blob/9a5a7060a48f9eef46efc680b0cdf6b42bff5df2/src/ax/prompts/agent.ts#L623

Configuration options for creating an agent using the agent() factory function.

Extends

Type Parameters

Type Parameter
IN extends AxGenIn
OUT extends AxGenOut

Properties

PropertyTypeDescriptionOverridesInherited from
abortSignal?AbortSignal--AxAgentOptions.abortSignal
agents?AxAgentic<IN, OUT>[]---
ai?AxAIService<unknown, unknown, string>-AxAgentOptions.ai-
asserts?AxAssertion[]--AxAgentOptions.asserts
corsProxy?string--AxAgentOptions.corsProxy
debug?boolean--AxAgentOptions.debug
debugHideSystemPrompt?boolean--AxAgentOptions.debugHideSystemPrompt
definition?string---
descriptionstring-AxAgentOptions.description-
disableSmartModelRouting?boolean--AxAgentOptions.disableSmartModelRouting
excludeContentFromTrace?boolean--AxAgentOptions.excludeContentFromTrace
excludeFieldsFromPassthrough?string[]List of field names that should not be automatically passed from parent to child agents-AxAgentOptions.excludeFieldsFromPassthrough
fastFail?boolean--AxAgentOptions.fastFail
fetch?{ (input: URL | RequestInfo, init?: RequestInit): Promise<Response>; (input: string | URL | Request, init?: RequestInit): Promise<Response>; }--AxAgentOptions.fetch
functionCall?| "auto" | "required" | "none" | { function: { name: string; }; type: "function"; }--AxAgentOptions.functionCall
functionResultFormatter?(result: unknown) => string--AxAgentOptions.functionResultFormatter
functions?AxInputFunctionType---
logger?AxLoggerFunction--AxAgentOptions.logger
maxRetries?number--AxAgentOptions.maxRetries
maxSteps?number--AxAgentOptions.maxSteps
mem?AxAIMemory--AxAgentOptions.mem
meter?Meter--AxAgentOptions.meter
model?string--AxAgentOptions.model
modelConfig?AxModelConfig--AxAgentOptions.modelConfig
namestring---
promptTemplate?typeof AxPromptTemplate--AxAgentOptions.promptTemplate
rateLimiter?AxRateLimiterFunction--AxAgentOptions.rateLimiter
resultPicker?AxResultPickerFunction<AxGenOut>--AxAgentOptions.resultPicker
sampleCount?number--AxAgentOptions.sampleCount
sessionId?string--AxAgentOptions.sessionId
showThoughts?boolean--AxAgentOptions.showThoughts
stepIndex?number--AxAgentOptions.stepIndex
stopFunction?string--AxAgentOptions.stopFunction
stream?boolean--AxAgentOptions.stream
streamingAsserts?AxStreamingAssertion[]--AxAgentOptions.streamingAsserts
strictMode?boolean--AxAgentOptions.strictMode
thinkingTokenBudget?"high" | "low" | "none" | "minimal" | "medium" | "highest"--AxAgentOptions.thinkingTokenBudget
thoughtFieldName?string--AxAgentOptions.thoughtFieldName
timeout?number--AxAgentOptions.timeout
traceContext?Context--AxAgentOptions.traceContext
traceLabel?string--AxAgentOptions.traceLabel
tracer?Tracer--AxAgentOptions.tracer
useExpensiveModel?"yes"--AxAgentOptions.useExpensiveModel