Class OrchestrationResult
- Namespace
- LMKit.Agents.Orchestration
- Assembly
- LM-Kit.NET.dll
Represents the result of an orchestrated multi-agent execution.
public sealed class OrchestrationResult
- Inheritance
-
OrchestrationResult
- Inherited Members
Examples
Inspecting per-agent results, total duration, and inference count:
using LMKit.Agents.Orchestration;
OrchestrationResult result = await orchestrator.ExecuteAsync("Topic: edge AI");
if (result.Success)
{
Console.WriteLine($"Final answer ({result.AgentResults.Count} agents in {result.Duration.TotalSeconds:F1}s):");
Console.WriteLine(result.Content);
foreach (var step in result.AgentResults)
{
Console.WriteLine($" - {step.AgentName}: {step.Status}");
}
}
else
{
Console.Error.WriteLine($"Failed: {result.Error}");
}
Properties
- AgentResults
Gets the individual results from each agent that participated.
- Content
Gets the final output content from the orchestration.
- Duration
Gets the total duration of the orchestration.
- Error
Gets the error message if the orchestration failed.
- Exception
Gets the exception that caused failure, if any.
- Metadata
Gets metadata about the orchestration execution.
- Success
Gets a value indicating whether the orchestration completed successfully.
- TotalInferenceCount
Gets the total number of inference calls across all agents.
Methods
- Cancelled(IReadOnlyList<AgentExecutionResult>, TimeSpan, int)
Creates a cancelled orchestration result.
- Failed(string, Exception, IReadOnlyList<AgentExecutionResult>, TimeSpan, int)
Creates a failed orchestration result.
- Succeeded(string, IReadOnlyList<AgentExecutionResult>, TimeSpan, int, IReadOnlyDictionary<string, object>)
Creates a successful orchestration result.