Skip to main content

Flows Overview

Flows are the core abstraction in Stepflow, defining the workflow executed by the orchestrator. Some of the most important parts of a flow are:

  • Input - The schema for the input to the flow
  • Steps - The steps to perform for the flow
  • Output - The output the flow should produce

The steps and output are able to reference the input and the results of previous steps. This creates data dependencies between steps, determining which steps must run in sequence and which can run in parallel.

Flows are typically defined in YAML files and executed by the Stepflow orchestrator, which coordinates component execution, manages data flow, and handles state persistence.

note

Flows conform to a JSON schema that defines the structure and requirements for flow definitions.

Input and Output

A flow defines an input schema that describes the expected structure of input data and an output describing how to create the output. There is also an optional output schema that describes the structure of the output data.

Like steps, the output description uses Expressions to reference input data and step outputs.

Learn more about Input and Output.

Steps

A flow consists of a sequence of steps, each with:

  • A unique identifier
  • A component that provides the execution logic
  • Input data consisting of flow inputs, previous steps, or literal values
  • Optional error handling and skip conditions

Learn more about Steps.

Components

Components provide the actual logic executed by steps. They can be:

  • Built-in components - Provided by Stepflow for common operations
  • External components - Implemented using the Stepflow protocol
  • MCP tools - Model Context Protocol server tools

Learn more about Components.

Expressions

Stepflow's expression system enables dynamic data references and transformations:

  • Reference flow inputs, step outputs, and variables
  • Extract specific fields from complex data
  • Handle missing data with defaults
  • Support conditional logic

Learn more about Expressions

Variables

Variables provide runtime parameters that can be supplied when executing workflows, enabling the same workflow definition to work across different environments (development, staging, production) without modification. Variables are ideal for:

  • Environment-specific configuration (API endpoints, credentials)
  • Feature flags and settings
  • Resource limits and timeouts

Learn more about Variables.

Control Flow

Control flow is determined by dependencies between steps. By default, if a step is skipped or fails to execute, subsequent steps that depend on it will also be skipped. However, you can define custom error handling and fallback logic to control how failures are managed.

Learn more about Control Flow.

Batch Execution

Stepflow supports high-performance batch execution, allowing you to process multiple inputs in parallel with a single workflow definition. This is ideal for:

  • Data processing pipelines: Process large datasets efficiently
  • Bulk operations: Apply the same workflow to many items
  • Parallel testing: Run the same workflow with different test inputs
  • High-throughput scenarios: Maximize resource utilization

Batch execution can be performed locally or on remote Stepflow servers with configurable concurrency limits.

Learn more about Batch Execution.

Metadata

Flows and steps may contain additional metadata that is used in Stepflow or by external tools. Currently, this includes:

  • name: A human-readable name for the flow
  • description: A description of the flow's purpose
  • version: The version of the flow definition

These will likely be extended in the future to allow an arbitrary metadata dictionary on the flow, steps, or both.

Next Steps