Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Agent Configuration

Each agent is defined as an [[agents]] entry in runtime.toml.

Full example

[[agents]]
name = "log-monitor"
wasm_path = "agents/log_monitor.wasm"
tick_interval_secs = 60
fuel_limit = 1_000_000
max_restarts = 5
restart_backoff_secs = 10

[agents.capabilities]
inference = true
journal = true
database = true
http_fetch = false
a2a = true

[agents.endpoints]
allowed = ["api.example.com"]

[agents.approval]
http_fetch = true

[agents.spend]
daily_budget_usd = 1.00
per_inference_max_usd = 0.05

[[agents.mcp_servers]]
name = "search"
argv = ["npx", "-y", "@anthropic/mcp-server-web-search"]

Field reference

FieldTypeDefaultDescription
namestringrequiredUnique agent identifier
wasm_pathstringrequiredPath to the WASM component
tick_interval_secsinteger60Seconds between tick invocations
fuel_limitinteger1_000_000Max WASM fuel per tick (null = unlimited)
max_restartsinteger10Max automatic restarts before giving up
restart_backoff_secsinteger5Backoff between restarts

Capabilities

See Host Capabilities for the full list and fail-closed semantics.

Endpoint allowlist

When http_fetch is enabled, the endpoints.allowed list restricts outbound domains. An empty list blocks all HTTP requests even with the capability enabled.

Spend policy

The optional [agents.spend] section sets economic guardrails:

  • daily_budget_usd — Maximum daily spend across all inference calls.
  • per_inference_max_usd — Maximum cost for a single inference request.

When the budget is exhausted the agent receives a budget_exceeded error.

MCP servers

Each [[agents.mcp_servers]] entry defines an MCP tool server. See MCP Integration for details.