Workflows

July 28, 2026 · View on GitHub

A workflow is a definition registered on the server. ConductorWorkflow builds one in code.

Authoring

using Conductor.Client;
using Conductor.Definition;
using Conductor.Definition.TaskType;
using Conductor.Executor;

var workflow = new ConductorWorkflow()
    .WithName("my_first_workflow")
    .WithVersion(1)
    .WithOwner("developers@orkes.io")
    .WithTask(new SimpleTask("simple_task_1", "ref_1"))
    .WithTask(new SimpleTask("simple_task_2", "ref_2"));

var configuration = new Configuration();
var workflowExecutor = new WorkflowExecutor(configuration);

workflowExecutor.RegisterWorkflow(workflow, overwrite: true);
var workflowId = workflowExecutor.StartWorkflow(workflow);

SimpleTask(taskType, referenceName) — the first argument is the task type a worker registers for, the second is the reference name unique within this workflow. Two tasks of the same type in one workflow need distinct reference names.

Wiring inputs

Reference the workflow's own input, or a prior task's output:

var task = new SimpleTask("greet", "greet_ref")
    .WithInput("name", workflow.Input("name"))          // from workflow input
    .WithInput("upstream", "${ref_1.output.result}");   // from another task

Task types

namespace Conductor.Definition.TaskType:

BuilderPurpose
SimpleTaskA task executed by your worker.
HttpTaskServer makes an HTTP call.
SwitchTaskBranch on a value.
ForkJoinTask / JoinTaskStatic parallel branches and their join.
DynamicFork (with DynamicForkInput)Fan out over a runtime-computed list.
DoWhileTaskLoop while a condition holds.
SubWorkflowTaskRun another workflow as a task.
DynamicTaskTask type resolved at run time.
EventTaskPublish an event.
WaitTaskPause for a duration or until a timestamp.
WaitForWebhookTaskPause until a webhook arrives.
HumanTaskPause for human input.
JavascriptTaskInline JS evaluated server-side.
JQTaskJQ expression over the workflow state.
SetVariableTaskSet a workflow variable.
TerminateTaskEnd the workflow early with a status.

LLM tasks

Conductor.Definition.TaskType.LlmTasks: LlmTextComplete, LlmChatComplete, LlmGenerateEmbeddings, LlmQueryEmbeddings, LlmIndexText, LlmIndexDocuments, LlmSearchIndex.

For agentic orchestration rather than individual LLM calls, use the agent layer — agents/README.md.

Known gaps

Some server task types have no builder in this SDK yet. Track:

  • #160NOOP, EXCLUSIVE_JOIN, START_WORKFLOW builders
  • #161AGENT, GET_AGENT_CARD, CANCEL_AGENT, PULL_WORKFLOW_MESSAGES enum values
  • #158, #159DynamicFork join and field-name defects

Where a builder is missing you can still register the raw definition through MetadataResourceApi.

Registration and versioning

RegisterWorkflow(workflow, overwrite: true) replaces the definition at that version. Definitions are versioned, so bumping WithVersion leaves running executions on the old version untouched — this is the safe way to change a workflow that has executions in flight.

Starting executions

var workflowId = workflowExecutor.StartWorkflow(new StartWorkflowRequest
{
    Name = "greetings",
    Version = 1,
    Input = new Dictionary<string, object> { ["name"] = "Conductor" }
});

See workflow-lifecycle.md for pause, resume, retry, and terminate.

Next