AxCodeRuntime Generated TypeScript API reference. typescript api api/reference build/apidocs/Interface.AxCodeRuntime.md interface AxCodeRuntime

AxCodeRuntime

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/agent/rlm.ts#L352

A code runtime that can create persistent sessions. Implement this interface for your target runtime (Node.js, browser, WASM, etc.).

Properties

PropertyModifierTypeDescription
language?readonlystringHuman-readable language name for generated actor code. Defaults to JavaScript when omitted for backwards compatibility.

Methods

createSession()

TypeScript
createSession(globals?: Record<string, unknown>, options?: object): AxCodeSession;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/agent/rlm.ts#L358

Parameters

ParameterType
globals?Record<string, unknown>
options?{ shouldBubbleError?: (err: unknown) => boolean; }
options.shouldBubbleError?(err: unknown) => boolean

Returns

AxCodeSession


formatCallable()?

TypeScript
optional formatCallable(args: AxRuntimeCallableFormatArgs): string;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/agent/rlm.ts#L376

Optional language-native formatter for callable tools exposed in the runtime. Execution still happens inside the runtime session.

Parameters

ParameterType
argsAxRuntimeCallableFormatArgs

Returns

string


getPrimitiveOverrides()?

TypeScript
optional getPrimitiveOverrides(): 
  | undefined
  | AxRuntimePrimitiveOverrideMap;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/agent/rlm.ts#L371

Optional language-native prompt text for built-in actor primitives such as final, askClarification, discover, and recall.

Returns

| undefined | AxRuntimePrimitiveOverrideMap


getUsageInstructions()

TypeScript
getUsageInstructions(): string;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/agent/rlm.ts#L366

Optional runtime-specific usage guidance injected into the RLM system prompt. Use this for execution semantics that differ by runtime/language.

Returns

string

Docs