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 have these statuses:

draft | testing | published | archived
StatusDescription
draftIn development, can be edited
testingReserved for testing workflows
publishedAvailable for production use
archivedSoft-deleted, hidden from lists

The current API creates workflows as draft, can mark a workflow as published, and can archive or unarchive workflows. Archived workflows can be restored with the unarchive endpoint. Permanent deletion is only available for archived workflows.

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