Repository navigation
Regular vs Swarm vs Workflow vs Graph Agents #540
|
I sort of understood what and when to use these type of agents but after looking at the https://github.com/strands-agents/samples/blob/main/02-samples/09-finance-assistant-swarm-agent/finance_assistant_swarm.py, I kind of lost my way of understanding Swarm. Can someone explain difference between Swarm vs Workflow vs Graph and when to use each? |
Replies: 2 comments
|
following |
|
Hi @rmadabusiml, thanks for the question, and sorry it took us this long to get you a proper answer. The good news is the docs now have exactly the comparison you were asking for: https://strandsagents.com/docs/user-guide/concepts/multi-agent/multi-agent-patterns/ The short decision guide: the key question is who decides the path of execution. A single On history and memory: each agent always keeps its own conversation history. Across agents, a Swarm shares a working context (the original request, handoff history, and knowledge earlier agents contributed) with every agent; a Graph passes each node's output along its edges; a Workflow task only receives the results of the tasks it depends on. Graph and Swarm additionally accept an On the finance assistant sample that threw you off: fair, the version you read was written before the built-in @flowconic, the pages above should cover what you were following for too. Hope this clears it up! |
Hi @rmadabusiml, thanks for the question, and sorry it took us this long to get you a proper answer. The good news is the docs now have exactly the comparison you were asking for: https://strandsagents.com/docs/user-guide/concepts/multi-agent/multi-agent-patterns/
The short decision guide: the key question is who decides the path of execution. A single
Agentwhen one agent with the right tools can do the job, always start here. AGraphwhen you the developer define the structure up front (nodes, edges, conditions, loops) and want controlled, predictable routing, like intent-based support flows or validation with error paths. ASwarmwhen the agents themselves decide, handing off to whiche…