agent() API
Agent, RLM runtime, context, memory, skill, MCP, and delegation APIs.
Most Used
axllm.NewAgent
Create an AxAgent from a signature and agent/runtime options.
| Field | Value |
|---|---|
| Kind | function |
| Ax concept | agent |
| API section | Agents And RLM |
| Form | axllm.NewAgent(signature, options) |
| Returns | *AxAgent |
Important Options
namedescriptionruntimemaxStepscontext fieldsdiscoveryrecallfunctions
Examples
helper := axllm.NewAgent("query:string -> answer:string", nil)axllm.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 | axllm.NewAgent(signature, options) |
| Returns | agent program |
Important Options
executor modelruntimepolicycontextoptimizer metadata
axllm.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 | axllm.NewAxMCPClient(transport, options) |
| Returns | MCP client |
Important Options
transportclient inforootstool overrides
Examples
client := axllm.NewAxMCPClient(transport, nil)axllm.AxMCPStreamableHTTPTransport
Streamable HTTP transport with session headers, OAuth options, and SSRF protection.
| Field | Value |
|---|---|
| Kind | type |
| Ax concept | AxMCPStreamableHTTPTransport |
| API section | MCP |
| Form | axllm.NewAxMCPStreamableHTTPTransport(endpoint, options) |
| Returns | MCP transport |
Important Options
endpointheadersOAuthSSRF protection
axllm.AxMCPStdioTransport
Stdio transport with JSON-RPC framing for local MCP servers.
| Field | Value |
|---|---|
| Kind | type |
| Ax concept | AxMCPStdioTransport |
| API section | MCP |
| Form | axllm.NewAxMCPStdioTransport(command, options) |
| Returns | MCP transport |
Important Options
commandargsenv
Advanced / internals / full reference
axllm.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 | axllm.NewProcessCodeRuntime(command, env) |
| Returns | AxCodeRuntime |
Important Options
commandenvcwdtimeout
Examples
runtime := axllm.NewProcessCodeRuntime([]string{"node", "runtime-server.mjs"}, nil)axllm.RuntimeCapabilities
Runtime capability envelope visible to the agent runtime policy.
| Field | Value |
|---|---|
| Kind | type |
| Ax concept | RuntimeCapabilities |
| API section | Runtime Profiles |
| Form | axllm.RuntimeCapabilities |
| Returns | capability record |
Important Options
languagesnapshotpatchabortusage instructions
axllm.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 | runtime envelope map |
| Returns | runtime envelope |
Important Options
typeargsresulterror
javascript-goja
Optional runtime profile for javascript actor code.
| Field | Value |
|---|---|
| Kind | runtime-profile |
| Ax concept | runtime-profile:javascript-goja |
| API section | Runtime Profiles |
| Form | tools/axir verify --targets go --runtime-profiles javascript-goja |
| Returns | AxCodeRuntime-compatible actor execution profile |
Important Options
actor language: javascriptsupport mode: embeddeddependency mode: optional-import
Full Reference
Open the full Go reference. This page highlights the agent symbols most relevant to everyday use.