Skip to main content

Module agent_runtime

Module agent_runtime 

Source
Expand description

Agent runtime: wraps oxi-sdk’s Agent for Seed execution.

The AgentRuntime uses OxiosEngine.oxi().agent() (AgentBuilder pattern) to construct agents with full middleware, observability, and security integration from oxi-sdk 0.24.0.

§Architecture

All tool access goes through KernelHandle — the single syscall-table-like path for agent OS control. The runtime:

  1. Resolves the agent’s CSpace from persona/role/hint
  2. Registers tools via register_tools_from_cspace()
  3. Optionally queries ToolRetriever for semantic capability hints
  4. Builds an Agent via AgentBuilder with middleware pipeline
  5. Runs via Agent::run_streaming() for real-time event processing

§oxi-sdk 0.23.0 Integration

Uses AgentBuilder for agent construction with:

  • .with_rate_limit() — tool call rate limiting
  • .with_token_budget() — per-execution token caps
  • .tracer() / .cost_tracker() — observability hooks

§Routing integration (RFC-011)

Model usage events (AgentEvent::Usage) are recorded to the shared RoutingStats so the Web dashboard can display per-model call counts and estimated costs.

Structs§

AgentRuntime
Runtime that wraps an oxi-sdk Agent for executing Seeds.
AgentRuntimeConfig
Configuration for creating AgentRuntime instances.