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 Type | Description |
|---|---|
collect-inputs | Gather inputs from users via form or SMS |
call-llm | Call an LLM with structured output |
call-tool | Invoke a tool and capture results |
call-agent | Call an agent with structured output |
call-api | Make HTTP API calls to external services |
call-workflow | Execute another workflow (nested workflows) |
request-user-action | Pause for human approval or decision |
end-flow | Conclude the workflow |
Workflow Lifecycle
Workflows progress through these statuses:
draft → testing → published → archived| Status | Description |
|---|---|
draft | In development, can be edited |
testing | Being tested before publish |
published | Available for production use |
archived | Soft-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.0→1.0.1→1.0.2 - All previous versions are preserved
When executing or retrieving workflows, you can specify:
| Version Value | Description |
|---|---|
latest | Current draft/development version |
published | Last published version |
testing | Last testing version |
1.0.0 | Specific 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).