agent() API
Agent, RLM runtime, context, memory, skill, MCP, and delegation APIs.
Most Used
agent
Create an AxAgent from a signature and agent/runtime options.
| Field | Value |
|---|---|
| Kind | function |
| Ax concept | agent |
| API section | Agents And RLM |
| Form | agent(spec: &str) |
| Returns | AxResult |
Important Options
namedescriptionruntimemaxStepscontext fieldsdiscoveryrecallfunctions
Examples
let helper = agent("query:string -> answer:string")?;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 | AxAgent |
| 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 | AxMCPClient::new(transport, options) |
| Returns | MCP client |
Important Options
transportclient inforootstool overrides
Examples
let client = AxMCPClient::new(transport, json!({}));AxMCPStreamableHTTPTransport
Streamable HTTP transport with session headers, OAuth options, and SSRF protection.
| Field | Value |
|---|---|
| Kind | type |
| Ax concept | AxMCPStreamableHTTPTransport |
| API section | MCP |
| Form | AxMCPStreamableHTTPTransport |
| 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 | AxMCPStdioTransport |
| 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 | ProcessCodeRuntime::new(command) |
| Returns | AxCodeRuntime |
Important Options
commandenvcwdtimeout
Examples
let runtime = ProcessCodeRuntime::new(vec!["node".into(), "runtime-server.mjs".into()]);RuntimeCapabilities
Runtime capability envelope visible to the agent runtime policy.
| Field | Value |
|---|---|
| Kind | type |
| Ax concept | RuntimeCapabilities |
| API section | Runtime Profiles |
| Form | RuntimeCapabilities |
| 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 | RuntimeEnvelope |
| 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 rust --runtime-profiles javascript-quickjs |
| Returns | AxCodeRuntime-compatible actor execution profile |
Important Options
actor language: javascriptsupport mode: embeddeddependency mode: optional-featurefeature gate: runtime-quickjs
Full Reference
Open the full Rust reference. This page highlights the agent symbols most relevant to everyday use.