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
| Property | Modifier | Type | Description |
|---|---|---|---|
language? | readonly | string | Human-readable language name for generated actor code. Defaults to JavaScript when omitted for backwards compatibility. |
Methods
createSession()
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
| Parameter | Type |
|---|---|
globals? | Record<string, unknown> |
options? | { shouldBubbleError?: (err: unknown) => boolean; } |
options.shouldBubbleError? | (err: unknown) => boolean |
Returns
formatCallable()?
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
| Parameter | Type |
|---|---|
args | AxRuntimeCallableFormatArgs |
Returns
string
getPrimitiveOverrides()?
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()
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