Table of Contents

Class ParallelNode

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

Composite node that runs its children concurrently and aggregates their outputs. Equivalent in semantics to ParallelOrchestrator but composable inside any larger graph.

Each child receives the same input via a WithInput(string) snapshot of the parent context. The shared OrchestrationContext flows to every child; its mutators are lock-protected so concurrent AddResult/AddTrace/SetState calls from multiple branches are safe.

public sealed class ParallelNode : IOrchestrationNode
Inheritance
ParallelNode
Implements
Inherited Members

Constructors

ParallelNode(string, IEnumerable<IOrchestrationNode>, Func<IReadOnlyList<NodeResult>, string>, int?)

Initializes a new ParallelNode.

Properties

Children

Gets the children executed concurrently.

Name

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

Methods

DefaultAggregator(IReadOnlyList<NodeResult>)

Default aggregator: newline-separated, success-only outputs.

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