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(signature, config=None) |
| Returns | AxAgent |
Important Options
namedescriptionruntimemaxStepscontext fieldsdiscoveryrecallfunctions
Examples
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(signature, config=None) |
| 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(transport, options=None) |
| Returns | MCP client |
Important Options
transportclient inforootstool overrides
Examples
client = 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 | AxMCPStreamableHTTPTransport(endpoint, options=None) |
| 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(command, options=None) |
| 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(command, env=None) |
| Returns | AxCodeRuntime |
Important Options
commandenvcwdtimeout
Examples
runtime = ProcessCodeRuntime(["node", "runtime-server.mjs"])RuntimeCapabilities
Runtime capability envelope visible to the agent runtime policy.
| Field | Value |
|---|---|
| Kind | type |
| Ax concept | RuntimeCapabilities |
| API section | Runtime Profiles |
| Form | RuntimeCapabilities(...).to_dict() |
| 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.from_result(...) |
| 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 python --runtime-profiles javascript-quickjs |
| Returns | AxCodeRuntime-compatible actor execution profile |
Important Options
actor language: javascriptsupport mode: process-adapterdependency mode: optional-envenvironment 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 python --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 Python reference. This page highlights the agent symbols most relevant to everyday use.