
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/stepflow-ai/stepflow.git cd stepflow
-
Build the stepflow-rs project
cd stepflow-rs cargo build --release
-
Run a sample workflow
cargo run -- run --flow=examples/basic/workflow.yaml --input=examples/basic/input1.json --config=examples/basic/stepflow-config.yml
Before contributing to StepFlow, you must sign our Individual Contributor License Agreement (ICLA):
python scripts/sign_icla.py
This is a one-time legal requirement that ensures clear licensing and intellectual property rights. The ICLA signature will be automatically verified when you submit pull requests.
For detailed development instructions, see CONTRIBUTING.md.
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 and routes:
plugins:
builtin:
type: builtin
python:
type: stepflow
transport: stdio
command: uv
args: ["--project", "../sdks/python", "run", "stepflow_py"]
routes:
"/python/{*component}":
- plugin: python
"/{*component}":
- plugin: builtin
For more examples, please refer to the Documentation
- Serverless component execution: Run components in environments like AWS Fargate and Beam.cloud
- Flow-generating agent loops: Agent generates flows rather than single tool invocations.
- Integration with AI tools: Provide a runtime for popular frameworks like Langflow, Flowise, and n8n
- Richer component library: Pre-built components for common tasks
- Tracing and debugging: Enhanced tools for tracing workflow execution and debugging issues
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/stepflow-ai/stepflow