Ensemble Docs

Overview

Learn how workflows orchestrate multi-step processes with agents, tools, and human actions.

Workflows are automated sequences that connect multiple steps into a cohesive process. Unlike single agent calls, workflows can branch, loop, pause for human input, and coordinate complex multi-step operations.

When to Use Workflows

Use workflows when you need to:

  • Orchestrate multiple agents or tools in sequence
  • Include human approval or input steps
  • Branch logic based on conditions
  • Handle long-running processes that may span hours or days
  • Track execution progress step-by-step

Use agents directly when you need:

  • Single-turn question/answer interactions
  • Simple tool calls without orchestration
  • Real-time streaming responses

Workflow Steps

Workflows consist of steps connected by edges. Each step performs a specific action:

Step TypeDescription
collect-inputsGather inputs from users via form or SMS
call-llmCall an LLM with structured output
call-toolInvoke a tool and capture results
call-agentCall an agent with structured output
call-apiMake HTTP API calls to external services
call-workflowExecute another workflow (nested workflows)
request-user-actionPause for human approval or decision
end-flowConclude the workflow

Workflow Lifecycle

Workflows progress through these statuses:

draft → testing → published → archived
StatusDescription
draftIn development, can be edited
testingBeing tested before publish
publishedAvailable for production use
archivedSoft-deleted, hidden from lists

Archived workflows can be restored with the unarchive endpoint. Permanent deletion is only available for archived workflows.

Versioning

Every workflow update creates a new semantic version automatically:

  • Initial version: 1.0.0
  • Updates increment patch: 1.0.01.0.11.0.2
  • All previous versions are preserved

When executing or retrieving workflows, you can specify:

Version ValueDescription
latestCurrent draft/development version
publishedLast published version
testingLast testing version
1.0.0Specific semantic version

See Versioning for more details.

Execution Model

Workflows execute on a Temporal backend, providing:

  • Durability - Workflows survive server restarts
  • Pause/Resume - Wait for human input indefinitely
  • Step Tracking - Monitor progress in real-time
  • Error Handling - Automatic retries and failure recovery

Workflows can be executed synchronously (blocking until complete) or asynchronously (return immediately, poll for status).

On this page