
Flows
A Flow is a directed graph of typed nodes you connect together to orchestrate a task: call an LLM, hit an external API, branch on a condition, loop over a list, or invoke a project Action. Flows are defined declaratively — the same document your Flow Builder canvas edits is what gets executed — so every run is reproducible and versionable.Overview
A Flow consists of:- Nodes - Typed steps (
start,if,llm_call,rest_call,action_call,python,for_each,output,response) that read inputs and produce outputs - Connections - Directed edges wiring one node’s output port to another node’s input port
- Parameters - Values passed in at run time (manual trigger or schedule), available to every node
Flow Structure
Flows use a YAML-based document format — the same envelope the Flow Builder posts when you edit on the canvas or switch to the YAML view:Key Concepts
Nodes
Every node has an id (unique within the flow), a type (which node class runs it), an optional label, and a config bag whose shape is validated against that node type’s schema. See the Node Reference for every type.Connections and ports
A connection wires one node’s output port to another node’s input port:in) and a single output, so from_port/to_port can usually be omitted. Two node types are the exception:
ifis a branching node — its outputs are the mutually-exclusive portstrue/false, and every outgoing connection from it must setfrom_port.for_eachis a container node — it owns a nestedbodysub-flow (its ownnodes/connections) instead of branching, executed once per item.
Data flow between nodes
A node receives its upstream nodes’ outputs asinputs, keyed by input port name, plus the run’s parameters. Most nodes read inputs.get("in") and save_as a named key in their own output — see Templating & Expressions for exactly how each node type consumes them.
Runs
A flow is executed as a run, triggered either manually or on a schedule. Each node execution is tracked as a step with its own status (PENDING -> RUNNING -> SUCCESS/ERROR/SKIPPED). See Triggers & Runs.
Best Practices
- One
responsenode per flow - a flow may contain at most one top-levelresponsenode; it’s what gets returned to the caller - Name your
save_askeys clearly - downstream nodes reference upstream output by the key you chose (e.g.weather,result) - Set
from_porton every branch - connections leaving anifnode must declaretrueorfalseexplicitly - Keep loops bounded -
for_eachenforces amax_iterationscap (default1000) to guard against runaway iteration - Avoid cycles - a flow must be a DAG; the validator rejects any cycle before a run starts
Next Steps
- Node Reference - every node type, its config, and its ports
- Triggers & Runs - starting a flow manually or on a schedule, and reading run/step status
- Templating & Expressions - how nodes reference upstream data and flow parameters
- YAML Reference - the complete flow document schema