Table of Contents

Interface IOrchestrationNode

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

Unit of composition for the graph-based orchestration API.

Each node represents a transformation from one NodeContext to a NodeResult. Nodes compose into arbitrary graphs (sequential pipelines, parallel fan-out, conditional routing, nested sub-graphs) without requiring a distinct orchestrator class per pattern. Existing orchestrators (PipelineOrchestrator, ParallelOrchestrator, RouterOrchestrator, SupervisorOrchestrator) remain available as familiar facades; this interface is the SOTA composable layer for callers who need patterns the prebuilt orchestrators don't express (e.g., a parallel block of pipelines feeding into a router).

public interface IOrchestrationNode

Examples

// Sequential pipeline composed of agent nodes:
IOrchestrationNode graph = new SequentialNode(
    "research-then-write",
    new AgentNode("research", researcher),
    new AgentNode("write", writer));

var ctx = new NodeContext("topic", new OrchestrationContext("topic"), options);
NodeResult result = await graph.InvokeAsync(ctx, ct);

Properties

Name

Stable name for tracing / observability. Two nodes in the same graph should not share a name.

Methods

InvokeAsync(NodeContext, CancellationToken)

Executes this node with the supplied context and returns its result. Implementations must:

  • Honor cancellationToken — surface cancellation rather than spinning silently.
  • Record results into Orchestration via AddResult / AddTrace for observability.
  • Avoid mutating the input context's scalar properties beyond what is documented.
Share