agent() API
Agent, RLM runtime, context, memory, skill, MCP, and delegation APIs.
Most Used
Ax.agent
Create an AxAgent from a signature and agent/runtime options.
| Field | Value |
|---|---|
| Kind | function |
| Ax concept | agent |
| API section | Agents And RLM |
| Form | Ax.agent(signature, options) |
| Returns | AxAgent |
Important Options
namedescriptionruntimemaxStepscontext fieldsdiscoveryrecallfunctions
Examples
AxAgent helper = Ax.agent("query:string -> answer:string", Map.of());AxAgent
RLM agent with Core-owned envelopes, state, traces, discovery, recall, delegation, and final typed responses.
| Field | Value |
|---|---|
| Kind | type |
| Ax concept | AxAgent |
| API section | Agents And RLM |
| Form | new AxAgent(signature, options) |
| Returns | agent program |
Important Options
executor modelruntimepolicycontextoptimizer metadata
AxMCPClient
MCP client that lists tools/prompts/resources and converts MCP tools to Ax functions.
| Field | Value |
|---|---|
| Kind | type |
| Ax concept | AxMCPClient |
| API section | MCP |
| Form | new AxMCPClient(transport, options) |
| Returns | MCP client |
Important Options
transportclient inforootstool overrides
Examples
AxMCPClient client = new AxMCPClient(transport);AxMCPStreamableHTTPTransport
Streamable HTTP transport with session headers, OAuth options, and SSRF protection.
| Field | Value |
|---|---|
| Kind | type |
| Ax concept | AxMCPStreamableHTTPTransport |
| API section | MCP |
| Form | new AxMCPStreamableHTTPTransport(endpoint, options) |
| Returns | MCP transport |
Important Options
endpointheadersOAuthSSRF protection
AxMCPStdioTransport
Stdio transport with JSON-RPC framing for local MCP servers.
| Field | Value |
|---|---|
| Kind | type |
| Ax concept | AxMCPStdioTransport |
| API section | MCP |
| Form | new AxMCPStdioTransport(command, options) |
| Returns | MCP transport |
Important Options
commandargsenv
Advanced / internals / full reference
ProcessCodeRuntime
Process/JSONL runtime adapter for actor-code sessions and runtime protocol tests.
| Field | Value |
|---|---|
| Kind | type |
| Ax concept | ProcessCodeRuntime |
| API section | Runtime Profiles |
| Form | new AxProcessCodeRuntime(command, env) |
| Returns | AxCodeRuntime |
Important Options
commandenvcwdtimeout
Examples
AxCodeRuntime runtime = new AxProcessCodeRuntime(List.of("node", "runtime-server.mjs"), Map.of());RuntimeCapabilities
Runtime capability envelope visible to the agent runtime policy.
| Field | Value |
|---|---|
| Kind | type |
| Ax concept | RuntimeCapabilities |
| API section | Runtime Profiles |
| Form | new AxRuntimeCapabilities() |
| Returns | capability record |
Important Options
languagesnapshotpatchabortusage instructions
RuntimeEnvelope
Actor primitive envelope for final, clarification, discovery, recall, used, guidance, and runtime results.
| Field | Value |
|---|---|
| Kind | type |
| Ax concept | RuntimeEnvelope |
| API section | Runtime Profiles |
| Form | AxRuntimeEnvelope |
| Returns | runtime envelope |
Important Options
typeargsresulterror
javascript-quickjs
Optional runtime profile for javascript actor code.
| Field | Value |
|---|---|
| Kind | runtime-profile |
| Ax concept | runtime-profile:javascript-quickjs |
| API section | Runtime Profiles |
| Form | tools/axir verify --targets java --runtime-profiles javascript-quickjs |
| Returns | AxCodeRuntime-compatible actor execution profile |
Important Options
actor language: javascriptsupport mode: embeddeddependency mode: optional-classpathenvironment gate: AXIR_QUICKJS4J_CPenvironment gate: AXIR_QUICKJS4J_CP_FILEenvironment gate: AXIR_QUICKJS4J_RESOLVE
python-pyodide
Optional runtime profile for python actor code.
| Field | Value |
|---|---|
| Kind | runtime-profile |
| Ax concept | runtime-profile:python-pyodide |
| API section | Runtime Profiles |
| Form | tools/axir verify --targets java --runtime-profiles python-pyodide |
| Returns | AxCodeRuntime-compatible actor execution profile |
Important Options
actor language: pythonsupport mode: process-adapterdependency mode: optional-envenvironment gate: AXIR_PYODIDE_RUNTIME_SERVERenvironment gate: AXIR_PYODIDE_RESOLVE
Full Reference
Open the full Java reference. This page highlights the agent symbols most relevant to everyday use.