The building blocks of every Flyte program: TaskEnvironments, tasks, runs, actions, and apps.
Core concepts
The Quickstart ran a workflow without stopping to explain it. This section explains it, one concept at a time, each with an example you can run yourself.
How a Flyte program fits together
Four pieces do most of the work:
- A TaskEnvironment declares the container image, the resources, and the secrets that a group of tasks share.
- A task is a Python function you decorate with
@env.task. It runs remotely, in that environment. - Calling a task creates a run, which tracks the whole execution from start to finish.
- Every task execution inside that run is an action, recorded on its own so it can be retried, cached, and inspected separately.
Two more ideas sit on top. An app is a long-running service rather than a job that finishes, and projects and domains decide where a run lives and what it is allowed to reach.
The pages below build on each other, so read them in order if you are new. The last one puts every piece together in a project you can deploy.
TaskEnvironmentThe container image, resources, and secrets a group of tasks runs with.TasksThe Python function that runs remotely in a container, and how it replaces the Flyte 1 task and workflow split.Runs and actionsThe run that tracks an execution, and the actions that make it up.Where your data livesA developer’s map of what Flyte stores in the control plane database versus the data plane object store, and what “metadata,” “literals,” and “raw data” actually mean.AppsLong-lived services, and how they differ from the tasks you have already met.Projects and domainsHow organizations, projects, and domains partition your work and its resources.Key capabilitiesAn overview of what Flyte can do, once the core concepts are in place.SettingsSet defaults at each level of the org, domain, and project hierarchy.Basic projectA worked two-stage RAG project: an offline embedding pipeline and the app that queries it.LeasesHow Union.ai tracks work across clusters, why you occasionally see
lease expired, and how the system protects you from runaway compute.