Skip to content
Docs/Get started

Flows, tasks, and runs

A flow is a workflow definition. A run is one execution of that definition with a particular set of inputs.

On this pageThe building blocksDefine dependencies through valuesLocal and hosted executionVersions, names, and promotionNext steps

The building blocks

ConceptWhat it meansExample
TaskA unit of Python work with its own name and retry policyRead orders, validate records, update a warehouse
FlowA collection of task calls and their dependenciesA daily revenue pipeline
Graph / DAGTasks connected in dependency order, with no cyclesRead → validate → aggregate → write
NodeA configurable building block with input/output ports in the visual builderHTTP ingestion or a data quality check
Flow versionA registered definition and associated code versionThe version returned by a deployment upload
DeploymentA named selection of a flow version for an environmentdaily-revenue-develop
RunAn execution with inputs, state, timestamps, and task resultsYesterday's revenue calculation
EnvironmentA workspace's configuration and deployment targetdevelop and a separately created production
Organization / workspaceThe account boundary for members and resourcesYour engineering team's Dagy workspace

Define dependencies through values

Python
from dagy import flow, task

@task
def read_orders():
    return [{"amount": 25}, {"amount": 40}]

@task
def total(orders):
    return sum(order["amount"] for order in orders)

@flow
def revenue():
    return total(read_orders())

A real flow uses a task's returned value as the argument to the next task. See the complete, executable quickstart. While Dagy builds the graph, task calls describe future work. Keep network calls and other side effects inside tasks: the flow body itself executes during graph construction.

Independent tasks can execute concurrently in supported runtimes. A task that needs another task's output waits for it. A failed dependency can cause downstream tasks to be skipped. Retry and cancellation do not reverse data already written to another service.

Local and hosted execution

Use my_flow.run_local() to explicitly execute a graph on your machine, including after you have configured a hosted account. Calling my_flow() directly executes the Python body and returns its value; this does not provide the same graph scheduling and persisted local history.

For hosted execution, package and deploy the code, then submit a run against the returned deployment name. A successful submission means Dagy accepted the run; poll its status to determine the final outcome. Connect to Dagy covers the complete path.

Versions, names, and promotion

Treat the server's returned flow version and deployment name as authoritative. The packaging and upload workflow can assign a version; do not assume a label in a source file is always the final deployed identifier. Reusing a deployment name can update which version it points to.

Namespaces help organize flows, and tags are a string-to-string map for metadata. They are separate from environment selection and do not create an authorization boundary. Environments belong to a workspace; workspace membership and permissions control access.

Promotion selects an existing flow version in another environment. It does not copy secrets or variables, and currently requires checking runtime and dependency-package settings separately. Follow deployment and promotion before promoting a flow.

Next steps

Start with the Python quickstart, then learn about runtime selection and run operations.