AxCodeRuntime
Defined in: https://github.com/ax-llm/ax/blob/f60ce12a5a7a0de6d7bf420400ca77934ea61504/src/ax/agent/rlm.ts#L361
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/f60ce12a5a7a0de6d7bf420400ca77934ea61504/src/ax/agent/rlm.ts#L367
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/f60ce12a5a7a0de6d7bf420400ca77934ea61504/src/ax/agent/rlm.ts#L385
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():
| AxRuntimePrimitiveOverrideMap
| undefined;Defined in: https://github.com/ax-llm/ax/blob/f60ce12a5a7a0de6d7bf420400ca77934ea61504/src/ax/agent/rlm.ts#L380
Optional language-native prompt text for built-in actor primitives such as final, askClarification, discover, and recall.
Returns
| AxRuntimePrimitiveOverrideMap
| undefined
getUsageInstructions()
getUsageInstructions(): string;Defined in: https://github.com/ax-llm/ax/blob/f60ce12a5a7a0de6d7bf420400ca77934ea61504/src/ax/agent/rlm.ts#L375
Optional runtime-specific usage guidance injected into the RLM system prompt. Use this for execution semantics that differ by runtime/language.
Returns
string