Data Flow
Data enters a run as parameters and environment values, moves between steps as outputs and files, and leaves as artifacts or persistent state. This page shows each path with one short example. To pick a value source, see Data and Variables.
Small values travel as references such as ${params.date}, which Dagu resolves before a step starts. Large data travels as files, and only its path is passed along.
Parameters
Inputs chosen when the run starts:
params:
- name: date
default: "2026-12-01"
steps:
- id: extract
run: echo "extracting orders for ${params.date}"dagu start orders.yaml -- date=2026-12-02See Parameters.
Environment Values
Settings every step shares, also passed to each process as environment variables:
env:
- DATA_DIR: /var/data/orders
steps:
- id: list
run: ls "${env.DATA_DIR}"See Environment Values.
Step Outputs
Small values one step computes for later steps:
steps:
- id: count
run: printf 'rows=%s\n' 120 >> "$DAGU_OUTPUT_FILE"
outputs:
- name: rows
- id: report
run: echo "loaded ${steps.count.outputs.rows} rows"The reference also makes report wait for count. See Outputs.
Files
Without a working_dir, every step of a run starts in the same per-run work directory (DAG_RUN_WORK_DIR). A relative path written by one step is readable by the next, and two runs never share it.
steps:
- id: download
run: curl -fsS -o orders.json https://api.example.com/orders
- id: count
depends: download
run: jq length orders.jsonA file path creates no dependency, so count needs depends. To run a script stored next to the DAG, set working_dir or declare the script as a file dependency. To reuse a file-producing step when its inputs have not changed, use a build workflow.
Standard Input
stdin names a file whose contents Dagu pipes to the step's command. ${<id>.stdout} is the path of a step's captured stdout, so it feeds one step's output into the next:
steps:
- id: fetch
run: curl -fsS https://api.example.com/orders.csv
- id: count_lines
depends: fetch
stdin: ${fetch.stdout}
run: wc -lA step without stdin receives empty standard input.
- The path resolves before the command starts. A leading
~expands to the home directory, and a relative path resolves against the step working directory. $NAMEin the path reads only the step environment, not the host process environment.- Each command of an array-form
runreads the file from its start. - Only
runsteps acceptstdin, anddagu validatereports it on any other step type, includingsshand steps that inherit a root-levelcontainer:. Harness steps take inline text throughwith.stdin. - The step fails, rather than running with empty input, when the file cannot be opened, or the path is empty or still contains an unresolved reference.
Artifacts
Files kept with the run for people to preview or download:
steps:
- id: summary
run: |
echo "# Orders"
echo "Loaded 120 rows"
stdout:
artifact: reports/summary.mdSee Artifacts.
Persistent State
Small JSON values the next run reads, such as a cursor:
steps:
- id: save_cursor
action: state.set
with:
key: cursors/orders
value:
last_id: 1042See Persistent State.
Runtime Metadata
Values about the run itself, such as its ID and log file:
steps:
- id: archive_log
run: cp "${context.paths.log_file}" "/backup/${context.run.id}.log"See Runtime Variables.
Output Size
max_output_size limits both the stdout a step captures and the file it writes to $DAGU_OUTPUT_FILE; the default is 1 MiB. See Output Size Limit.

