Edges
Edge Structure
Section titled “Edge Structure”Edges connect nodes in the flow graph. Each edge has a source and target node.
{ "id": "edge-1", "source": "start-1", "target": "agent-1", "sourceHandle": null, "targetHandle": null}| Field | Type | Description |
|---|---|---|
id | string | Unique edge identifier |
source | string | Source node ID |
target | string | Target node ID |
sourceHandle | string | Source output handle (for branching nodes) |
targetHandle | string | Target input handle |
Conditional Edges
Section titled “Conditional Edges”Edges can carry conditions and labels:
{ "id": "edge-2", "source": "if-1", "target": "agent-positive", "sourceHandle": "true", "data": { "condition": "sentiment === 'positive'", "label": "Positive" }}Source Handles
Section titled “Source Handles”Branching nodes use source handles to route edges:
| Node Type | Handles |
|---|---|
if_else | true, false |
classify | One handle per category ID |
user_approval | approved, rejected |
guardrail | pass, block |
while | loop (back to body), done (exit) |
Edge Styling
Section titled “Edge Styling”{ "style": { "stroke": "#00CAFF", "strokeWidth": 2, "animated": true }}- Every flow must have a path from
startto at least oneendnode - Nodes can have multiple incoming and outgoing edges
- Circular edges are allowed only through
whilenodes - Edges without a
sourceHandleconnect from the default output