Flux.Orchestration 1.0.5

dotnet add package Flux.Orchestration --version 1.0.5
                    
NuGet\Install-Package Flux.Orchestration -Version 1.0.5
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Flux.Orchestration" Version="1.0.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Flux.Orchestration" Version="1.0.5" />
                    
Directory.Packages.props
<PackageReference Include="Flux.Orchestration" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Flux.Orchestration --version 1.0.5
                    
#r "nuget: Flux.Orchestration, 1.0.5"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Flux.Orchestration@1.0.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Flux.Orchestration&version=1.0.5
                    
Install as a Cake Addin
#tool nuget:?package=Flux.Orchestration&version=1.0.5
                    
Install as a Cake Tool

Flux 🎬

A deterministic, attribute-driven orchestration runtime for .NET β€” the substrate agentic & AI systems run their plans on. Declare work as scenes of phases; Flux plans them into a dependency DAG and runs them β€” in parallel where safe, in order where it matters β€” with resilience, durability, and replay built in.

Flux is deliberately not intelligent, and that is the point: it is the reliable hands, not the head. A planner β€” an agent, an LLM, a searched program, or a person β€” decides what to do; Flux executes that plan deterministically, durably, and replayably, so the same inputs always give the same run. That makes it a natural execution substrate for agentic and AI systems, which need their decisions carried out exactly, checkably, and the same way every time.

Flux turns imperative "call this, then that" glue into declarative orchestration. You annotate classes and methods with [Scene], [ScenePhase], and [SceneMethod]; Flux discovers them, builds an execution plan, and runs it. Ordering is data-driven β€” a phase declares what it DependsOn, Reads, and Writes, and the engine derives a correct, maximally-parallel DAG for you. No manual Task.WhenAll choreography, no hand-wired ordering.

Built on .NET 10, distributed as the Flux.Orchestration NuGet package.


Core concepts

Concept What it is
Scene A unit of orchestration β€” a class marked [Scene(Id = "…")], run to completion via the agent.
Phase A step within a scene β€” [ScenePhase(SceneId, PhaseId, …)]. Phases are the nodes of the DAG.
Target ([SceneMethod]) The actual work β€” a method bound to a phase with [SceneMethod(SceneId, PhaseId)]. Flexible method binding resolves the signature.
SceneContext Per-run state: a CorrelationId, a thread-safe Parameters bag, and a typed, versioned, tear-free Resources store for race-free inter-phase data.
Agent (IAgent) The faΓ§ade β€” register components, execute scenes and signals.
Planner Β· Engine Β· Scheduler The planner builds and walks the DAG (recursion-safe, dryRun-capable); the engine invokes the bound delegates (sync / Task / ValueTask); the scheduler orders execution levels.

The DAG model

A phase declares its edges; Flux computes the order:

  • DependsOn β€” explicit ordering: the phase starts only after every listed phase completes.
  • Reads / Writes β€” named resources. Flux inserts a write-before-read edge automatically, and orders concurrent writers of the same resource deterministically by (Priority, PhaseId).

Phases with no ordering relationship run in parallel; everything else is serialized exactly as the data demands. Because the order falls out of declared reads/writes, a correct plan is computed rather than hand-maintained. (The older Parallel flag is deprecated in favour of this model.)

Quick start

dotnet add package Flux.Orchestration
using Flux.Orchestration;              // IAgent, SceneContext
using Flux.Orchestration.Attributes;   // [Scene], [ScenePhase], [SceneMethod]
using Microsoft.Extensions.DependencyInjection;

[Scene(Id = "build")]
[ScenePhase(SceneId = "build", PhaseId = "restore")]
[ScenePhase(SceneId = "build", PhaseId = "compile", DependsOn = new[] { "restore" })]
[ScenePhase(SceneId = "build", PhaseId = "test",    DependsOn = new[] { "compile" })]
public sealed class BuildScene
{
    [SceneMethod(SceneId = "build", PhaseId = "restore")]
    public async Task Restore(SceneContext ctx, CancellationToken ct) { /* … */ }

    [SceneMethod(SceneId = "build", PhaseId = "compile")]
    public async Task Compile(SceneContext ctx, CancellationToken ct) { /* … */ }

    [SceneMethod(SceneId = "build", PhaseId = "test")]
    public async Task Test(SceneContext ctx, CancellationToken ct) { /* … */ }
}

var services = new ServiceCollection();
services.AddFluxOrchestration();
var provider = services.BuildServiceProvider();

var agent = provider.GetRequiredService<IAgent>();
agent.RegisterComponent(new BuildScene());   // discovers [Scene] / [ScenePhase] / [SceneMethod]
await agent.ExecuteSceneAsync("build", new SceneContext());

ExecuteSceneAsync runs the whole scene to completion via a recursion-safe direct walk of the plan. The planner also supports a side-effect-free dryRun β€” compute the plan and see what would run without invoking anything (handy for lookahead and "what-if" foresight).

Method signatures are resolved flexibly (MethodResolutionMode.Flexible by default), so a [SceneMethod] can take the SceneContext and/or a CancellationToken and return void, Task, or ValueTask.

What's in the box

  • Execution β€” the DAG planner, an execution engine (sync / Task / ValueTask delegate invocation), a scheduler for execution levels, and per-phase resilience (Timeout, MaxRetries).
  • Durability β€” an orchestration journal, a scene-state store, a JSON state serializer, and an OrchestrationReplayer, so a scene's progress can be persisted and resumed or replayed. In-memory, file-based, and null implementations ship out of the box.
  • Resources β€” the typed, versioned IResourceStore for race-free inter-phase data (reads never tear; ordering is enforced by the DAG via Reads/Writes).
  • Diagnostics β€” orchestration diagnostics hooks for tracing what ran and when.
  • Signals β€” a scene declares Triggers and is raised by name: IAgent.PlanSignalAsync queues its scenes for the tick loop (fire-and-forget), while IAgent.ExecuteSignalAsync runs them to completion highest-priority-first β€” so several scenes can answer one signal and priority arbitrates which reacts first.
  • DI β€” services.AddFluxOrchestration() wires the agent, planner, engine, registries, and defaults.

Project layout

Project What it is
Flux.Orchestration the engine β€” attributes, model, execution (engine Β· planner Β· scheduler Β· resilience), durability, diagnostics, resources, DI
Flux.Orchestration.Tests the test suite

Status

  • .NET 10; package version 1.0.5.
  • Used as the orchestration kernel by SpareAi, where recursive plan cycles run as Flux scenes (each node a plan.node scene executed via the recursion-safe ExecuteSceneAsync), and by The Seed 2, whose synthesized programs execute as chained Flux phases and whose non-monotonic world repairs run as priority-arbitrated world.delta signals β€” both cases the same shape: the intelligence decides, Flux deterministically carries it out.
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.5 129 7/21/2026
1.0.0 110 7/19/2026