High-Level Structure
Every Workflow Definition adheres to the following core JSON schema:Top-Level Properties
Components Array
Thecomponents array contains objects detailing the individual processing units. Each component has an ID, a type definition, and configurations for its specific behavior and positional placement if rendered visually in the UI.
Connections Array
Theconnections array defines how control passes between components upon execution. Connections are directional edges between a specific output “route” of a source component and a specific input “route” of a target component.
Connection Properties
id: The connection’s own identifier, unique within the definition. Required — a definition whose connections omit it, or reuse one, fails validation and will not execute. Visual editors key their edges by this value, so connections without one collapse into a single edge when the workflow is drawn.source_id: The ID of the component yielding control.target_id: The ID of the component receiving control.source_port: The physical output port the connection originates from.target_port: The physical input port the connection arrives at.route: The semantic logic path dictating when this edge fires (e.g.,"success","failure","next").
Connector Placement
Every component exposes its connectors at fixed positions on the node. Knowing where each one sits lets you place components (via theirposition) so edges stay short and non-crossing — clean, readable flows. The diagram below shows
all connector types on a single component (logic.code) and the components they connect to:

Data and provider components expose the matching reference ports (
data_reference, provider_reference) so the edges
land on their facing side.
Laying out clean flows
Because the connectors are fixed, a few conventions produce tidy definitions:- Flow runs top → bottom.
flow_inputis on the top edge andflow_outputon the bottom, so stack sequential steps vertically — samex, increasingy. - Data sits to the right.
data_inputanddata_outputexit the right side, so place the message / list / data components a step reads or produces to its right. - Providers sit to the left.
provider_inputis on the left edge, so place provider components to the left.
position field ({ "x", "y" }) on each component is what the editor renders from; following these conventions
keeps the graph legible.
