Flyte 2 SDK: Python-Native Orchestration with Async Tasks and a Rust Controller in the Wings
Type-safe, distributed orchestration of agents, ML pipelines, and real-time inference — in pure Python with async/await.
At a glance
- What is it?
- Flyte 2 SDK brings type-safe, async-first orchestration for ML pipelines and agents to pure Python. The core is simple, but the experimental Rust controller and local dev tooling point to a project still in motion.
- Who is it for?
- Adopt Flyte 2 SDK if you are a Python team building ML pipelines or agent workflows and want a type-safe, async-native orchestration layer that runs locally and in the cloud. Skip it if you need a mature, battle-tested controller: the Rust controller is experimental, missing abort and graceful stop, and the default Python controller may not match your scale.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository received new commits within the last day.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 14, 2026, and from our analysis. They are not legal advice.
Star history
- flyteorg/flyte-sdk129 ★ · +3
| Repository | 2026-08-23 | 2026-11-14 |
|---|---|---|
| flyteorg/flyte-sdk | 126 | 129 |
3 Stars in the last 83 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
What Flyte 2 SDK Actually Solves
Flyte 2 SDK targets a specific pain: orchestrating ML pipelines, models, and agents in Python without leaving the language. Most orchestration systems force you into YAML, DSLs, or a separate runtime. Flyte 2 lets you write plain Python functions decorated with @env.task, then run them locally or on a cluster. The README emphasizes type safety: tasks declare input and output types, and the framework uses those types for validation and serialization. It is for Python teams that want to keep their code in Python, add retries and caching with a decorator, and scale from a laptop to a shared environment. The async/await model is the core differentiator: you write concurrent tasks with asyncio.gather, not with a separate workflow engine. This is a real departure from older orchestration tools that treat workflows as static graphs.
The Async Task Model and Its Mechanics
The mechanism is visible in the README's example. You create a TaskEnvironment with a name and an image. Tasks are async functions decorated with @env.task. The main task calls asyncio.gather to run multiple predict tasks concurrently. The framework handles the orchestration: it schedules tasks, manages retries (set via retries=3), and applies caching (cache='auto'). The result is a data flow where Python's native concurrency drives parallelism. For synchronous code, Flyte 2 provides flyte.map, but the README recommends async for more control. This design means the developer writes ordinary Python, and the framework infers the execution graph from the calls. The type annotations (list[int], float) are not just documentation; they are part of the contract that the SDK uses to serialize data between tasks. This is a fundamental shift: instead of defining a DAG separately, you define it implicitly through function calls.
Getting It Running: Commands and Config
Installation is straightforward: pip install flyte. The README shows a minimal file flyte_intro.py with two tasks. You run it with python flyte_intro.py or flyte run flyte_intro.py main --data '[1,2,3]'. The CLI takes the file, the entrypoint task, and arguments. For model serving, you create a FastAPI app and wrap it in FastAPIAppEnvironment, then run flyte serve serving.py env. Local development gets a TUI: pip install flyte[tui], then flyte run --tui --local. For a more complete local environment, flyte start devbox sets up a Docker and k3s-based Devbox. You then create a config with flyte create config --endpoint localhost:30080 --project flytesnacks --domain development --builder local --insecure. After that, flyte run uses the Devbox. The config file (likely .flyte/config.yaml) controls the image builder, as shown in the Rust controller section. These commands are concrete and testable, which is a strength for adoption.
The Rust Controller: Experimental and Gated
A notable part of the repository is the experimental Rust controller. It is an alternative implementation of the remote controller written in Rust and exposed to Python via maturin/pyo3. It ships as a separate wheel flyte_controller_base, so the main SDK does not need a Rust toolchain. It is optional: pip install flyte does not pull it in. You install it with pip install flyte[rust-controller]. To enable it, set the environment variable _F_USE_RUST_CONTROLLER=1. The driver propagates this to all sub-task pods. The README lists specific gaps: abort RPC on cancel, Code.ABORTED fast-fail, tunable retries/QPS, and graceful stop(). This is honest: the controller is not production-ready. The development workflow requires a local image builder, because the remote builder cannot resolve the wheel from a sibling layer. This is a real constraint for anyone who wants to test the Rust path. The presence of this experimental component suggests the project is investing in performance, but it is not a reason to adopt today.
Limitations and Failure Modes
The most obvious limitation is the experimental Rust controller's missing features. If you rely on cancellation or graceful shutdown, the Rust path will not work. The README also notes that the default task image bundles the Rust controller, but if you bring your own image, you must manually install flyte[rust-controller] and set the env var. This is a footgun: a custom image that omits the wheel will fail at runtime. Another limitation is the async-first design. Teams with synchronous codebases can use flyte.map, but the README says async is recommended for concurrency control. If your code is not async, you lose some of the benefits. The Devbox setup is Docker and k3s based, which adds operational overhead for local development. The README does not document the Python controller's performance characteristics, so it is unclear whether the default controller scales to large workloads. The project is under active development (multiple releases in August 2026), so APIs may change.
Alternatives: Prefect and Temporal
The most direct alternative is Prefect, which also offers Python-native orchestration with decorators and local execution. Prefect uses a hybrid execution model with a server and agents, and it supports both sync and async tasks. The key difference is that Prefect's task graph is built from function calls and can be run locally or against a Prefect server, but it does not have the same type-safety emphasis or the Rust controller experiment. Another alternative is Temporal, which is language-agnostic and uses a separate workflow runtime with a strong durability guarantee. Temporal requires you to write workflows in a specific way (using its SDK, with activities and workflows), and it is not Python-only. Flyte 2's approach is more integrated into Python's async model, but Temporal offers more mature fault tolerance and a battle-tested server. If you need a durable, long-running workflow engine, Temporal is a safer bet. If you want to stay in Python with minimal infrastructure, Prefect or Flyte 2 are closer, but Flyte 2's async-native design is unique.
Maintenance and Upgrade Cost
The repository shows active maintenance: the latest release v2.6.10 was pushed on 2026-08-27, with v2.6.9 and v2.6.8 the day before. This suggests frequent releases, which means you need to track changes. The README warns about keeping dependencies in lockstep: for the Rust controller, you must keep flyteidl2 in sync between pyproject.toml, rs_controller/pyproject.toml, and rs_controller/Cargo.toml. This is a maintenance burden for anyone building custom images or contributing to the controller. The license is Apache-2.0, which is permissive and allows commercial use with attribution. There are no obvious legal restrictions, but you should check the license text for specifics. The TUI and Devbox are additional components that may require updates. The documentation points to external sites (union.ai), which may change. Overall, the upgrade cost is moderate: frequent releases, but the core API seems stable enough for the examples to remain valid.
Who Should Adopt It, and What to Verify First
Flyte 2 SDK is a good fit for Python teams that want to orchestrate ML pipelines or agents with minimal infrastructure and maximum Pythonicity. The async model is a strong fit for I/O-bound tasks like model inference or API calls. You should adopt it if you are comfortable with async Python and want retries and caching as decorators. You should not adopt it if you need a production-grade controller today, especially with cancellation or graceful shutdown. Before committing, verify the following: run the Devbox locally and test your own task images with the Rust controller (if you plan to use it). Check whether the async model integrates with your existing codebase or if you need to convert to async. Review the release notes for any breaking changes between v2.6.x versions. Finally, confirm that the type system handles your data types, especially for complex objects like dataframes or custom classes. The project is promising, but it is not a drop-in replacement for a mature orchestrator.
Editorial conclusion
Adopt Flyte 2 SDK if you are a Python team building ML pipelines or agent workflows and want a type-safe, async-native orchestration layer that runs locally and in the cloud. Skip it if you need a mature, battle-tested controller: the Rust controller is experimental, missing abort and graceful stop, and the default Python controller may not match your scale. Before adopting, verify that the async task model fits your existing code, test the local Devbox workflow, and check whether the Rust controller gaps (abort, retries, QPS) are acceptable for your production failure handling. Also confirm that your custom task images include the required controller wheel, or be ready to install flyte[rust-controller].
Frequently asked questions
What is flyte software?
This repository is the Flyte 2 SDK, a Python library for orchestrating machine learning pipelines, models and agents at scale, described as a durable runtime for model training and batch and online inference. Tasks are declared as Python functions on a task environment that carries the image, retries and caching, and the same file can be run directly or through the command line.
Is Flyte open source?
Yes. The repository is licensed under Apache-2.0, the package is published on the Python package index under the name flyte, and the readme describes Flyte 2 as generally available. The examples, tests and developer tooling are all in the same tree, with roughly two dozen example directories covering agents, caching, checkpointing, connectors and generative AI.
How do I run a Flyte 2 workflow locally?
The readme points at a devbox, a local environment built on docker and a Kubernetes distribution, started with flyte start devbox and configured with flyte create config, which takes an endpoint, project, domain, builder and an insecure flag. There is also a terminal interface extra for inspecting runs locally, and hosted alternatives in the form of a Codespaces link and a notebook.
What is the experimental Rust controller in flyte-sdk?
It is an alternative implementation of the remote controller, written in Rust and exposed to Python, distributed as a separate wheel so the main SDK keeps its Python build toolchain. It is an optional extra, it is bundled in the default task image, and it is enabled per run with an environment variable that the driver propagates to sub-task pods.
What is missing from the Flyte Rust controller today?
Four capabilities are named as gaps: abort over RPC on cancel, a fast-fail path on the aborted status code, tunable retries and queries per second, and a graceful stop. Working on it also requires the local image builder, because the controller wheel is not on the package index until release and the remote builder installs all wheels in one layer.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/flyteorg-flyte-sdk)Star history chart for your README
[](https://hysenlabs.com/projects/flyteorg-flyte-sdk)Was this useful?