Table of Contents

Class OrchestrationContext

Namespace
LMKit.Agents.Orchestration
Assembly
LM-Kit.NET.dll

Provides shared context and state during orchestrated execution.

The context is passed between agents in a workflow and can be used to share data, accumulate results, and coordinate execution.

public sealed class OrchestrationContext
Inheritance
OrchestrationContext
Inherited Members

Constructors

OrchestrationContext(string)

Initializes a new instance of the OrchestrationContext class.

Properties

AccumulatedOutput

Gets or sets the accumulated output from agents.

CurrentInput

Gets or sets the current working input being passed between agents.

CurrentStep

Gets the current step number in the orchestration (1-based).

OriginalInput

Gets the original input that started the orchestration.

Results

Gets the results from agents that have executed.

ShouldStop

Gets or sets a value indicating whether the orchestration should stop.

StopReason

Gets or sets the reason for stopping, if applicable.

Trace

Gets the execution trace for debugging.

Methods

AddResult(AgentExecutionResult, string)

Records an agent execution result.

AddTrace(string)

Adds a trace entry for debugging.

GetState<T>(string, T)

Retrieves a value from the shared state.

GetTotalInferenceCount()

Gets the total inference count across all recorded results.

HasState(string)

Checks if a state key exists.

SetState(string, object)

Stores a value in the shared state.

Stop(string)

Signals that the orchestration should stop.