Skip to content

PipelineStage

NexusLabs.Needlr.AgentFramework.Workflows

NexusLabs.Needlr.AgentFramework.Workflows.Sequential

PipelineStage Class

Defines a single stage in a sequential pipeline, binding a name, executor, and optional execution policy.

public sealed record PipelineStage : System.IEquatable<NexusLabs.Needlr.AgentFramework.Workflows.Sequential.PipelineStage>

Inheritance System.Object 🡒 PipelineStage

Implements System.IEquatable<PipelineStage>

Example

var stage = new PipelineStage(
    "Writer",
    new AgentStageExecutor(writerAgent, ctx => "Write a draft."),
    new StageExecutionPolicy { MaxAttempts = 2 });

Constructors

PipelineStage(string, IStageExecutor, StageExecutionPolicy) Constructor

Defines a single stage in a sequential pipeline, binding a name, executor, and optional execution policy.

public PipelineStage(string Name, NexusLabs.Needlr.AgentFramework.Workflows.Sequential.IStageExecutor Executor, NexusLabs.Needlr.AgentFramework.Workflows.Sequential.StageExecutionPolicy? Policy=null);

Parameters

Name System.String

Human-readable name for the stage (used in diagnostics and progress events).

Executor IStageExecutor

The IStageExecutor that runs this stage's logic.

Policy StageExecutionPolicy

Optional StageExecutionPolicy controlling skip, retry, and budget behavior.

Example

var stage = new PipelineStage(
    "Writer",
    new AgentStageExecutor(writerAgent, ctx => "Write a draft."),
    new StageExecutionPolicy { MaxAttempts = 2 });

Properties

PipelineStage.Executor Property

The IStageExecutor that runs this stage's logic.

public NexusLabs.Needlr.AgentFramework.Workflows.Sequential.IStageExecutor Executor { get; init; }

Property Value

IStageExecutor

PipelineStage.Name Property

Human-readable name for the stage (used in diagnostics and progress events).

public string Name { get; init; }

Property Value

System.String

PipelineStage.Policy Property

Optional StageExecutionPolicy controlling skip, retry, and budget behavior.

public NexusLabs.Needlr.AgentFramework.Workflows.Sequential.StageExecutionPolicy? Policy { get; init; }

Property Value

StageExecutionPolicy