Examples

Annotated, runnable Flux examples — from "hello world" through scheduled workflows to full multi-step pipelines. Every example is from the Flux repository, regenerated against the current source.

Every example here lives in the Flux source tree under examples/. Each page renders the current source verbatim, plus a one-line context note and the command to run it. If the source changes upstream, the page changes with the next regen.

Top-level examples

Twenty-one single-file examples cover the core surface — one feature each, kept small enough to read in a sitting. Start with these if you are new to Flux:

The full set also covers cancellation, sleep, graph composition, task progress, resource requests, dataframe-with-pause, multiple pause points, and a couple of AI samples. Browse the sidebar for the complete list.

Full pipelines

Longer tutorials that build production-shaped systems end-to-end. Each one walks through five to eight stages with prose explaining why the boundaries fall where they do.

AI agent examples

Flux ships dozens of AI agent examples under examples/ai/ in the source repository — conversational agents, tool use, planning, RAG, streaming, sub-agents, and more. Each script is its own page in the AI / Agents sub-group; browse the sidebar for the full set. For the canonical recipes, read Agents → Patterns.