BUILD WITH WORKFLOWS

Workflows

Coordinate agent steps in C# with explicit success and failure transitions.

Use a workflow when the application needs a defined sequence of agent executions. Each step selects an agent type and declares where execution goes next.

Workflows are optional. An agent can use tools or RAG without belonging to a workflow.

Define the path in code

The definition type is Flow. Register it with AddRuniqWorkflows(...) and execute it through IFlowRunner.

.NET CLI
dotnet add package Runiq.AI.Workflows

Define your first workflow →

Understand execution

PartResponsibility
FlowName the process and hold its steps.
Step<TAgent>Select a registered agent by CLR type.
Success transitionSelect the next step after success.
Failure transitionStop or select a continuation or fallback.
RunResultReport overall and individual step outcomes.

Steps run sequentially. Successful output becomes the next input. Explicit routing does not make model responses deterministic.

Follow the guides

GuideOutcome
Defining workflowsCreate and register a two-step flow.
Host applicationPlace registration and application responsibilities.
Running workflowsExecute a flow and interpret results.
Failure handlingChoose recovery behavior.
Studio testingInspect definition and execution.
PatternsDesign explicit handoffs.

On this page