
Open protocol and runtime for building GenAI workflows
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
StepFlow is an open protocol and runtime for building, executing, and scaling GenAI workflows across local and cloud environments. Its modular architecture ensures secure, isolated execution of components—whether running locally or deployed to production. With durability, fault-tolerance, and an open specification, StepFlow empowers anyone to create, share, and run AI workflows across platforms and tools.
- ⚙️ Reliable, Scalable Workflow Execution Run workflows locally with confidence they'll scale. StepFlow provides built-in durability and fault tolerance—ready for seamless transition to production-scale deployments.
- 🔐 Secure, Isolated Components Each workflow step runs in a sandboxed process or container with strict resource and environment controls. StepFlow's design prioritizes security, reproducibility, and platform independence.
- 🌐 Open, Portable Workflow Standard Build once, run anywhere. The StepFlow protocol is open and extensible, enabling workflow portability across different environments and platforms.
- Define AI workflows using YAML or JSON
- Execute workflows with built-in support for parallel execution
- Extend functionality through step services
- Handle errors at both flow and step levels
- Use as both a library and a service
This repository contains multiple components:
stepflow-rs/
- Main Rust-based execution engine and runtimestepflow-ui/
- Web-based frontend for workflow managementsdks/python/
(stepflow-py
) - Python SDK for building componentssdks/typescript/
(stepflow-ts
) - TypeScript SDK for building components
To get a local copy up and running quickly follow these simple steps.
- Rust 1.70+ (for building from source)
- Python 3.8+ (for Python SDK examples)
-
Clone the repository
git clone https://github.com/riptano/stepflow.git cd stepflow
-
Build the stepflow-rs project
cd stepflow-rs cargo build --release
-
Run a sample workflow
cargo run -- run --flow=examples/python/basic.yaml --input=examples/python/input1.json
Here's a simple workflow that demonstrates basic StepFlow usage:
workflow.yaml:
input_schema:
type: object
properties:
m:
type: integer
n:
type: integer
steps:
- id: add_numbers
component: python://add
args:
a: { $from: $input, path: m }
b: { $from: $input, path: n }
outputs:
result: { $from: add_numbers, path: result }
input.json:
{
"m": 8,
"n": 5
}
Run the workflow:
This assumes workflow.yaml
and input.json
are in the current directory.
cd stepflow-rs
cargo run -- run --flow=workflow.yaml --input=input.json
Create a stepflow-config.yaml
file to define available plugins:
plugins:
- name: builtin
type: builtin
- name: python
type: stdio
command: uv
args: ["--project", "../sdks/python", "run", "stepflow_sdk"]
For more examples, please refer to the Documentation
- Workflow execution and debugging
- JSON-RPC over stdio protocol for component servers
- Initial Stepflow UI
- SQL state store for durable execution
- MCP tools as components
- Container-based component servers
- JSON-RPC over http protocol for remote execution
- Improve Python SDK
- Enrich component libraries
- Distributed state stores for scalable execution
- Kubernetes and container based deployments
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'feat: Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
For detailed development instructions, see CONTRIBUTING.md.
Distributed under the Apache License. See LICENSE.txt
for more information.
Project Link: https://github.com/riptano/stepflow