Skip to content

NexusLabs.Needlr.AgentFramework.Workflows.Sequential

NexusLabs.Needlr.AgentFramework.Workflows

NexusLabs.Needlr.AgentFramework.Workflows.Sequential Namespace

Classes
AgentStageExecutor Executes a pipeline stage by running an Microsoft.Agents.AI.AIAgent with a dynamically constructed prompt.
ContinueOnFailureExecutor Wraps an inner executor, catching exceptions and returning a failed result instead of throwing. This enables "advisory" stage behavior where a failure does not halt the pipeline.
CritiqueAndReviseExecutor Implements an evaluate→revise→retry loop. A critic agent evaluates the current state, a programmatic check determines pass/fail, and if it fails a reviser agent applies feedback. The loop repeats up to the configured maximum number of additional attempts.
DelegateStageExecutor Executes a pipeline stage by invoking a caller-provided delegate. Use for programmatic stages that do not involve an AI agent.
FallbackExecutor Tries a primary executor and, on failure, falls back to a secondary executor. User cancellation is never swallowed.
IterativeLoopStageExecutor Executes a pipeline stage by running an NexusLabs.Needlr.AgentFramework.Iterative.IIterativeAgentLoop with dynamically constructed options and context.
PhaseContext Provides typed access to pipeline state during phase lifecycle hooks (OnEnterAsync and OnExitAsync).
PipelinePhase Defines a named group of sequential stages that share runtime configuration. The SequentialPipelineRunner applies the phase's policy (lifecycle hooks, token budget) before executing any stage within it.
PipelinePhasePolicy Configures runtime behavior for a PipelinePhase, including async lifecycle hooks and an optional phase-level token budget.
PipelineStage Defines a single stage in a sequential pipeline, binding a name, executor, and optional execution policy.
SequentialPipelineOptions Configuration options for a SequentialPipelineRunner execution, including an optional completion gate and overall token budget.
SequentialPipelineRunner Executes a linear sequence of PipelineStage instances, evaluating policies (skip, retry, budget) and producing an NexusLabs.Needlr.AgentFramework.Diagnostics.IPipelineRunResult with per-stage diagnostics.
StageExecutionContext Provides typed access to the pipeline's shared state during stage execution.
StageExecutionPolicy Configures runtime behavior for a single pipeline stage, including conditional skipping, post-execution validation with retries, and per-stage token budgets.
StageExecutionResult Describes the outcome of executing a single pipeline stage, including diagnostics, response text, and success/failure state.
StageValidationException Thrown when a pipeline stage exhausts all retry attempts and still fails post-validation.
TimeoutExecutor Wraps an executor with a maximum execution duration. If the inner executor does not complete within the specified timeout, the linked cancellation token is triggered.
Interfaces
IStageExecutor Defines the execution strategy for a single pipeline stage. Implementations include agent-driven stages, programmatic/delegate stages, and critique-and-revise loops.
Enums
FailureDisposition Controls how the pipeline runner handles a failed stage result.