SequentialNode
Run children in order. Output of one feeds the next.
Pipelines and parallel fan-outs cover the easy cases. Real workflows
have branches, loops, conditional retries, fan-outs that converge,
and stages that delegate. GraphOrchestrator ships in
LM-Kit.NET 2026.5.2 with composable IOrchestrationNode
primitives so you can build arbitrary shapes without writing your
own scheduler.
SequentialNodeRun children in order. Output of one feeds the next.
ParallelNodeRun children concurrently. Aggregate results.
ConditionalNodeBranch on a predicate. Skip, retry, or route.
AgentNode + customWrap an agent, or implement IOrchestrationNode for arbitrary logic.
A document review workflow runs three reviewers in parallel, branches if compliance flags severity above a threshold, retries the writer with different instructions, then pipes the result to a publisher. Express that as a hand-written orchestration and you reinvent a scheduler. Express it as a graph and the SDK runs it for you.
Sequential, parallel, conditional, and custom nodes nest freely. Pipeline within parallel within conditional, no problem.
OrchestrationContext is now thread-safe (2026.5.2). ParallelNode children read and write shared state without races.
Tokens flow through a non-blocking channel. Consumers see output as it is produced, not after the whole graph completes.
OrchestrationOptions.ReasoningLevel propagates to every agent in the graph, including delegated workers.
Each node emits OpenTelemetry spans with parent/child relationships. Trace the whole graph in one view.
Pipeline, Parallel, Router, Supervisor, Map-Reduce, Retry-on-Failure all expressible as graphs. The shape is yours.
A common content workflow: one writer drafts, three reviewers analyse concurrently, a conditional reviser steps in if any reviewer flags severity above a threshold. The graph below builds it from primitives.
using LMKit.Agents.Orchestration; using LMKit.Agents.Orchestration.Nodes; using LMKit.Agents.Templates; // Cast: one writer, three reviewers, one reviser, one publisher. var writer = AgentTemplates.Creative(model).Build(); var tech = AgentTemplates.Reviewer(model).WithReviewType(ReviewType.Technical).Build(); var business = AgentTemplates.Reviewer(model).WithReviewType(ReviewType.Business).Build(); var compliant = AgentTemplates.Reviewer(model).WithReviewType(ReviewType.Compliance).Build(); var reviser = AgentTemplates.Editor(model).WithIntensity(EditIntensity.Heavy).Build(); var publisher = AgentTemplates.Assistant(model).Build(); // Build the graph: write, then 3-way parallel review, then conditional revise, then publish. var graph = new SequentialNode( new AgentNode(writer), new ParallelNode( new AgentNode(tech), new AgentNode(business), new AgentNode(compliant) ), new ConditionalNode( predicate: ctx => ctx.AnyOutputContains("severity:high"), ifTrue: new AgentNode(reviser), ifFalse: IOrchestrationNode.NoOp ), new AgentNode(publisher) ); var orchestrator = new GraphOrchestrator(graph); // Streaming, thread-safe across the parallel branch. await foreach (var token in orchestrator.StreamAsync("Q3 product launch announcement")) { Console.Write(token.Text); }
Python-only. Strong graph model, but tied to the LangChain ecosystem and cloud LLMs. State management is bring-your-own.
High-level abstractions over agents and crews. Fewer primitives for arbitrary shapes; loops and conditionals require workarounds.
Native .NET, composable nodes, thread-safe context, channel-based streaming, OpenTelemetry spans. Local models out of the box.
Pipeline, Parallel, Router, Supervisor orchestrators for the common shapes.
Channel-based token streaming with thinking and delegation tokens.
OpenTelemetry spans for every node, GenAI semantic conventions.
Wrap any node in retry, timeout, or fallback policies.
Working console demos on GitHub, step-by-step how-to guides on the docs site, and the API reference for the classes used on this page.
Agent demo: compose any workflow from Sequential, Parallel, Conditional nodes.
Open on GitHub → How-to guideBuild complex multi-step agent workflows with type-safe nodes.
Read the guide → How-to guideCoordinate multiple agents through one orchestration graph.
Read the guide →