Install the SDK and run your first workflow locally in a few minutes.

Quickstart

Try it in your browser

Prefer not to install anything? Follow along with this quickstart in Google Colab.

Open In Colab

Let’s get you up and running with your first workflow on your local machine.

What you’ll need

  • Python 3.10+ in a virtual environment

Install the SDK

Install the flyte package:

pip install 'flyte[tui]'
We also install the tui extra to enable the terminal user interface.

Verify it worked:

flyte --version

Output:

Flyte SDK version: 2.*.*
Run the CLI without installing

If you have uv installed, you can run the flyte CLI directly with uvx, without installing the package into your environment:

uvx flyte --version
uvx flyte get run

Run something straight away

Before writing anything of your own, you can run a built-in example. It needs no files and no configuration:

flyte run --local hello

Flyte writes the example to a scratch directory, runs it, and prints the path to the source:

Using the built-in example from /tmp/flyte-hello-<user>/task/hello.py
Copy it into your own project to start editing.
Completed Local Run   Outputs: ActionOutputs(o0=14.0)

The example fans a small computation over a list of inputs with flyte.map and averages the results. That is enough to see a workflow run. Next, write one of your own.

Watch it in the console

Once you have configured an endpoint below, swap --local for --tracked. The run still executes on your machine, but reports its progress to Union.ai and appears under Tracked Runs:

flyte run --tracked hello

See Track local runs in the console.

Configure

Create a config file for local execution. Runs will be persisted locally in a SQLite database.

flyte create config --local-persistence

This creates .flyte/config.yaml in your current directory.

See Setting up a configuration file for more options.

Run flyte get config to check which configuration is currently active.

Write your first workflow

Author workflows with an AI assistant

flyte-agent-plugins — a portable agent harness plugin for Claude Code, Codex, OpenCode, and other harnesses — adds skills that scaffold projects and generate tasks, workflows, apps, and tests for you, plus MCP servers that ground the agent in the Flyte SDK and docs. See Flyte agent plugins to get started.

This one converts a list of temperature readings and returns the hottest. Create temperatures.py:

temperatures.py
# temperatures.py

import flyte

# A TaskEnvironment groups configuration for the tasks defined within it:
# the container image, resources, and so on. This one keeps the defaults.
env = flyte.TaskEnvironment(name="temperatures")

# The @env.task decorator turns a Python function into a task.
# Type annotations on the inputs and output are required.
@env.task
def to_fahrenheit(celsius: float) -> float:
    return celsius * 9 / 5 + 32

# This is the entrypoint task of the workflow. It calls to_fahrenheit
# once per reading using flyte.map, which is like Python's map but runs
# the calls in parallel, then returns the highest result.
@env.task
def hottest(readings: list[float] = [21.5, 19.0, 24.3, 22.8]) -> float:
    return round(max(flyte.map(to_fahrenheit, readings)), 1)

Here’s what’s happening:

  • TaskEnvironment specifies configuration for your tasks (container image, resources, etc.)
  • @env.task turns Python functions into tasks that can run on a cluster
  • flyte.map calls to_fahrenheit once per reading, in parallel when running on a cluster
  • Both tasks share the same env, so they’ll have identical configurations

Run it

Create a project directory and place your files there:

.
├── temperatures.py
└── .flyte
    └── config.yaml

Do not run flyte run from your home directory. Flyte packages the current directory when running on a cluster, so running from $HOME would attempt to bundle your entire home folder. Always work from a dedicated project directory.

Run the workflow, naming the file and the entrypoint task:

flyte run --local temperatures.py hottest

This executes the workflow locally on your machine:

Completed Local Run
Outputs: ActionOutputs(o0=75.7)

See the results

You can see the run in the TUI by running:

flyte start tui

The TUI will open into the explorer view

Explorer View

To navigate to the run details, double-click it or press Enter to view the run details.

Run Details View

Next steps

Now that you’ve run your first workflow:

  • Core concepts: Understand the core concepts of Flyte programming
  • Run locally: Learn about the TUI, caching, and other features that work locally
  • Run on the devbox: Learn about the devbox cluster and how to run workflows on it
  • Run on a remote cluster: Configure your environment to run on a cluster that is not on your machine