Expand description
Flow definition types and programmatic builder API.
Types are re-exported from stepflow_flow — the canonical definitions shared
with the orchestrator. The FlowBuilder provides a convenient API for
constructing flows programmatically.
§Quick start
use stepflow_client::{FlowBuilder, ValueExpr};
use stepflow_flow::values::JsonPath;
let mut builder = FlowBuilder::new();
builder.add_step(
"say_hello",
"/builtin/eval",
ValueExpr::object(vec![("message".to_string(), ValueExpr::workflow_input(JsonPath::parse("$.name").unwrap()))]),
);
let flow = builder
.output(ValueExpr::step_output("say_hello"))
.build()
.unwrap();
let json = serde_json::to_value(&flow).unwrap();Structs§
- Component
- Identifies a specific plugin and atomic functionality to execute.
- Example
Input - An example input for a workflow that can be used in UI dropdowns.
- Flow
- A workflow consisting of a sequence of steps and their outputs.
- Flow
Builder - Programmatically build a
Flowdefinition. - FlowRef
- A wrapper around
Arc<Flow>to support poem-openapi traits. - Flow
Schema - Consolidated schema information for a flow.
- Json
Path - A JSON path represented as a sequence of path parts. This type serializes and deserializes as a string but internally maintains a structured representation for efficient processing.
- Step
- A step in a workflow that executes a component with specific arguments.
- Test
Case - A single test case for a workflow.
- Test
Config - Configuration for testing a workflow.
- Value
Ref - A literal value which may be passed to a component.
Enums§
- Error
Action - Error action determines what happens when a step fails.
- Value
Expr - A value expression that can contain literal data or references to other values.