
Fan-Out and Fan-In Patterns
The Map-Reduce of Agents.
Fan-Out and Fan-In Patterns
Fan-Out (Map)
The Fan-Out node generates multiple sub-tasks.
- Input: "Research physics, chemistry, and biology."
- Action: Create 3 separate state branches.
- Routing: Send each branch to a
ResearcherNode.
Fan-In (Reduce)
The Fan-In node waits. It is a "Synchronization Point". It does not execute until all upstream edges have delivered their result.
- Input:
[Result Physics, Result Chemistry, Result Biology] - Action: Summarize into one report.
graph TD
Manager --> WorkerA
Manager --> WorkerB
Manager --> WorkerC
WorkerA --> Supervisor
WorkerB --> Supervisor
WorkerC --> Supervisor