Skip to main content

Module orchestrator

Module orchestrator 

Source
Expand description

LLM orchestrator with tool loop execution.

The orchestrator manages the complete lifecycle of an LLM interaction:

  1. Send user message to the LLM
  2. Stream the response, detecting tool calls
  3. Execute tool calls via MCP
  4. Feed tool results back to the LLM
  5. Repeat until the model produces a final response

§Example

ⓘ
use universal_agent_runtime::config::LlmConfig;
use universal_agent_runtime::llm::Orchestrator;
use universal_agent_runtime::mcp::registry::McpRegistry;
use universal_agent_runtime::uar::runtime::native_skill::NativeSkillRegistry;

let llm_config = LlmConfig::default();
let mcp = McpRegistry::load_from_file("mcp.json").await?;
let native_skills = Arc::new(NativeSkillRegistry::new());
let orchestrator = Orchestrator::new(llm_config, mcp, native_skills)?;

let stream = orchestrator.chat("Hello, what time is it?").await?;

Structs§

DestinationRequestPreparation
Exact host-reviewed preparation contract for one destination model.
DestinationRequestPreparations
Immutable destination contracts captured by the trusted run host.
Orchestrator
LLM orchestrator with tool loop execution.
ProtectedContinuity
Opaque provider state that must survive only through an explicitly compatible destination. The body remains in canonical host storage; this identity prevents transparent failover from rewriting or inventing it.

Enums§

ToolApprovalResult
Result of a tool approval gate check.

Functions§

build_driver
Build the protocol driver for a resolved LLM configuration.

Type Aliases§

ToolApprovalGate
A callback invoked before each tool call execution to allow approval/rejection. Returns an admitted outcome to proceed or Rejected to skip the tool call.