You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* docs: clarify graph edge execution logic (OR vs AND)
- Add note in 'How Graphs Work' explaining default OR behavior
- Add 'Waiting for All Dependencies' subsection in Conditional Edges
- Update parallel processing example to show AND logic pattern
- Update best practices to mention edge execution logic
* docs: revert parallel processing example to original
Keep the parallel processing example simple without conditional edges.
The AND logic pattern is already demonstrated in the Conditional Edges section.
* fix: revert the best practice change
Copy file name to clipboardExpand all lines: docs/user-guide/concepts/multi-agent/graph.md
+23-1Lines changed: 23 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,7 @@ The Graph pattern operates on the principle of structured, deterministic workflo
18
18
1. Nodes represent agents, custom nodes, or multi-agent systems
19
19
2. Edges define dependencies and information flow between nodes
20
20
3. Execution follows the graph structure, respecting dependencies
21
+
1. When multiple nodes have edges to a target node, the target executes as soon as **any one** dependency completes. To enable more complex traversal use cases, see the [Conditional Edges](#conditional-edges) section.
21
22
4. Output from one node becomes input for dependent nodes
22
23
5. Entry points receive the original task as input
23
24
6. Nodes can be revisited in cyclic patterns with proper exit conditions
When multiple conditional edges converge on a single node, the target node executes as soon as any one of the incoming conditional edges is satisfied. The node doesn't wait for all predecessor nodes to complete, just the first one whose condition evaluates to true.
141
+
### Waiting for All Dependencies
142
+
143
+
By default, when multiple nodes have edges to a target node, the target executes as soon as any one dependency completes. To wait for all dependencies to complete, use conditional edges that check all required nodes:
0 commit comments