parallel
parallel runs a fixed, pre-defined list of agents simultaneously. All workers receive the same input. Results are collected into a map before the next step.
When to use it
Section titled “When to use it”- Independent analyses of the same input (financial, reputational, technical)
- Voting or consensus between multiple specialized agents
- Running different models or prompting strategies simultaneously
- Any task where you want multiple independent perspectives
AGENT.md
Section titled “AGENT.md”---name: due-diligencedescription: Runs financial and reputational analysis in parallel.version: "1.0.0"pattern: parallelworkers: - finance-analyst - reputation-analyst - legal-analystcall: model: role: thinker---No body needed — the parallel pattern doesn’t make its own LLM call. It delegates to the listed workers.
Scaffold
Section titled “Scaffold”tama add parallel my-agentHow it works
Section titled “How it works”Input → all workers simultaneously: finance-analyst receives input reputation-analyst receives input legal-analyst receives input
All workers run concurrently.Runtime waits for all to complete.
Results collected:{ "finance-analyst": "Financial analysis...", "reputation-analyst": "Reputation analysis...", "legal-analyst": "Legal analysis..."}The result JSON is passed as the value to whatever comes next (the parallel node’s output key is "done").
Difference from scatter
Section titled “Difference from scatter”parallel | scatter | |
|---|---|---|
| Workers | Different agents, heterogeneous | Same agent, homogeneous |
| Input per worker | Same input for all | Different item for each |
| Worker list | Static, defined at design time | Dynamic, decided by map agent at runtime |
| Reduce step | None (just collects) | reduce.md synthesizes results |
Example: combining with fsm
Section titled “Example: combining with fsm”parallel by itself just collects results. To do something with them, nest it in an fsm:
---name: investment-analyzerdescription: Runs parallel analyses then synthesizes a recommendation.version: "1.0.0"pattern: fsminitial: analyzestates: analyze: synthesize # parallel step synthesize: # terminal---# agents/analyze/AGENT.md---name: analyzedescription: Runs parallel due diligence analyses.version: "1.0.0"pattern: parallelworkers: - finance-analyst - reputation-analyst---# agents/synthesize/AGENT.md---name: synthesizedescription: Synthesizes parallel analysis results into a recommendation.version: "1.0.0"pattern: oneshotcall: model: role: thinker---
You receive a JSON map of parallel analyses.Synthesize them into a single investment recommendation: BUY, HOLD, or SELL.Justify your recommendation with specific points from each analysis.