The question: you can draw the flow before the input arrives. Start with the skeleton — gather data in parallel, bundle it, hand it to one agent.
The shape:
START ──► fetch_weather ──┐
START ──► analyze_course ─┼─► JoinNode ─► strategy (1 agent)
START ──► pull_fitness ───┘ (bundles)
python -m L2a_parallel_join.workflow # HOT
python -m L2a_parallel_join.workflow COLDSlow the fetches to watch the parallelism: MARATHON_SLOW_MO=3 python -m L2a_parallel_join.workflow.
Each fetch prints when it starts and finishes:
[t= 0.0s] fetch_weather started
[t= 0.0s] analyze_course started
[t= 0.0s] pull_fitness started
[t= 1.0s] pull_fitness finished
[t= 1.5s] fetch_weather finished
[t= 2.0s] analyze_course finished
All three start at 0.0s and the fan-out is done at 2.0s — the slowest fetch, not the 4.5s their durations would add up to. That overlap is the parallelism.
Then the strategy cites real numbers from the bundle. The total wall time printed at the end is larger (~8s) because it also contains the strategy agent's LLM call — read the fetch timestamps, not the total, for the parallel claim.
- Parallel edges: three
(START, fetch_*, join_inputs)edges fan out fromSTART. JoinNodewaits for all three and bundles them into one payload (BundledRunData), keyed by function name.- One
strategyagent (input_schema=BundledRunData,output_schema=RaceStrategy) reads the bundle.
→ Next: L2b adds the deterministic router that picks a specialized agent per condition.