name and id in a Flow: input names, node ids and the flow’s own id. Later calls reference node outputs by id, and the compile response keys its records by id too: outputs entries (<nodeId>.<port>), settlements, and the nodeId on fundEscrow actions. Short names like amountIn, swap and zap work well.
Top-level shape
chainId is the EVM chain the Flow executes on: where the user’s transaction runs and where every input must live. An input whose resource is on another chain is rejected with a validation_error.
A Flow can still deliver to another chain through a bridge, a LI.FI Intents order or a continuation; see Future resources and Cross-chain flows. For every wire-format field, see Flow Schema.
Inputs
Each input is either a resource input, which carries a token balance, or a handle input, which carries a typed scalar such as auint256 or an address. See Resource Model for how each one may be consumed.
Calls (nodes)
ACall is a single op invocation. Each call has:
- a user-defined
id, which later calls reference as<id>.<port>; - an
opname from the manifest; - a
bindmap that wires its input ports to refs or literal values; - op-specific
config; - optional
guards.
preparation_order warning; move independent quoted ops earlier to shorten the compile.
Ops declare typed input and output ports; see Ports. See References for the ref grammar and Guards for what guards do.
Epilogue
The optionalepilogue runs after the last call and moves balances off the execution proxy: forwards sends the whole balance of named tokens to an address, and remainder sends everything else the flow left there. run.sweepTo on the compile request is shorthand for the remainder. See The flow epilogue for exactly what it moves.
Example
Flow Schema: Complete request shows the wire-format Flow that the Swap and deposit recipe builds: alifi.swap from WETH to USDC, then a lifi.zap into Aave with a slippage guard. Call builder.build() to see the Flow your own SDK code produces.
See also
- Resource Model: how resources and handles behave at runtime.
- References: how
input.*,context.*and<nodeId>.<port>refs resolve. - Execution Model: how a Flow becomes calldata.
- Cross-chain flows: a
continuation.settlenode embeds a second Flow (the destination flow) that runs later from an escrow.

