Interface IOrchestrator
- Namespace
- LMKit.Agents.Orchestration
- Assembly
- LM-Kit.NET.dll
Defines the contract for multi-agent orchestration strategies.
An orchestrator coordinates the execution of multiple agents to accomplish a task, managing how agents are selected, sequenced, and how their outputs are combined.
public interface IOrchestrator
- Extension Methods
Examples
Running any orchestrator through the common contract:
using LMKit.Model;
using LMKit.Agents;
using LMKit.Agents.Orchestration;
using var model = LM.LoadFromModelID("qwen3:8b");
var researcher = Agent.CreateBuilder(model).WithPersona("Researcher").Build();
var writer = Agent.CreateBuilder(model).WithPersona("Writer").Build();
IOrchestrator orchestrator = new PipelineOrchestrator()
.AddStage("research", researcher)
.AddStage("write", writer);
OrchestrationResult result = await orchestrator.ExecuteAsync("Topic: edge AI");
Console.WriteLine(result.Content);
Properties
- Name
Gets the name of this orchestrator.
Methods
- ExecuteAsync(string, OrchestrationOptions, CancellationToken)
Executes the orchestration with the given input and options.
- ExecuteAsync(string, CancellationToken)
Executes the orchestration with the given input.