Expand description
LLM orchestrator with tool loop execution.
The orchestrator manages the complete lifecycle of an LLM interaction:
- Send user message to the LLM
- Stream the response, detecting tool calls
- Execute tool calls via MCP
- Feed tool results back to the LLM
- 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§
- Destination
Request Preparation - Exact host-reviewed preparation contract for one destination model.
- Destination
Request Preparations - Immutable destination contracts captured by the trusted run host.
- Orchestrator
- LLM orchestrator with tool loop execution.
- Protected
Continuity - 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§
- Tool
Approval Result - Result of a tool approval gate check.
Functions§
- build_
driver - Build the protocol driver for a resolved LLM configuration.
Type Aliases§
- Tool
Approval Gate - A callback invoked before each tool call execution to allow approval/rejection.
Returns an admitted outcome to proceed or
Rejectedto skip the tool call.