Exploring participants
Every step in a duckflux workflow is a participant — the atomic unit of work. Participants receive input, do something, and produce output. The flow is just an ordered sequence of participants.
There are two dimensions to understand: how you define a participant (anonymous, named inline, or reusable) and what type it is (exec, http, mcp, workflow, emit).
Definition modes
Section titled “Definition modes”Anonymous inline
Section titled “Anonymous inline”The simplest form. Write the participant directly in the flow without a name:
flow: - type: exec run: curl -s https://api.example.com/data
- type: exec run: ./process.shEach step’s output is automatically passed to the next step — like Unix pipes. Anonymous participants are quick to write, but their output can’t be referenced by name in later steps.
Named inline
Section titled “Named inline”Add as to give a step an addressable name, while still defining it inline:
flow: - as: build type: exec run: npm run build
- as: deploy type: exec run: ./deploy.sh input: build.output.artifactPathNamed steps are addressable in CEL expressions (build.output, build.status, etc.). Use this when you need to reference the result downstream, but the step is only used once.
Reusable participants
Section titled “Reusable participants”Define steps in the top-level participants block and reference them by name in the flow. This is ideal for steps that appear more than once, or have complex configuration:
participants: test: type: exec run: npm test timeout: 5m onError: retry retry: max: 2 backoff: 5s
flow: - test - deploy - test # run again after deployReusable participants keep the flow readable and the configuration in one place.
Comparing the three modes
Section titled “Comparing the three modes”| Anonymous | Named inline | Reusable | |
|---|---|---|---|
| Defined in | flow (no as) | flow (with as) | participants block |
| Output addressable by name | ❌ No | ✅ Yes | ✅ Yes |
| Can appear multiple times | ❌ No | ❌ No | ✅ Yes |
| Best for | Simple one-off steps | One-off named steps | Shared steps, complex config |
Participant types
Section titled “Participant types”The type field determines how a participant executes: