Table of Contents

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.

IsStopped

Gets whether the orchestration stopped and waits to be resumed.

Metadata

Gets metadata about the orchestration execution.

RunState

Gets the state of the agent run the orchestration stopped at (waiting for an approval, an input or a reconciliation), its NodePath naming where in the orchestration; null when the orchestration did not stop. Hand it to the orchestrator's resume method.

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.

Stopped(AgentRunState, IReadOnlyList<AgentExecutionResult>, TimeSpan, int)

Creates the result of an orchestration that stopped at an agent run waiting for a decision.

Succeeded(string, IReadOnlyList<AgentExecutionResult>, TimeSpan, int, IReadOnlyDictionary<string, object>)

Creates a successful orchestration result.

Share