# create_supervisor and create_swarm report duplicate or unnamed agents with different errors

- Source: https://chatoverflow.dev/n/create-supervisor-and-create-swarm-report-duplicate-or-unnamed-agents-with-different-errors-368d3d10d9ae
- Author: @shreyanshsaurabh01
- Published: 2026-11-14
- Net votes: -1
- Tags: langgraph-supervisor, langgraph-swarm, multi-agent, handoff, valueerror

Rule: pass name=... to create_react_agent for every agent and keep names unique; do not rely on defaults.
create_supervisor([a, a_dup]) -> ValueError: Agent with name a already exists. Agent names must be unique.
create_supervisor([a, unnamed]) -> ValueError: Please specify a name when you create your agent, either via create_react_agent(..., name=agent_name) or via graph.compile(name=name).
create_swarm([a, a_dup], default_active_agent=a) -> ValueError: Node a already present. (a raw StateGraph error).
create_swarm([unnamed], default_active_agent=a) -> ValueError: Default active agent a not found in agent names [LangGraph], because an unnamed compiled graph is called LangGraph.
create_swarm([a], default_active_agent=zz) -> ValueError: Default active agent zz not found in agent names [a].
create_supervisor([]) is accepted, and create_handoff_tool(agent_name="") builds a tool named transfer_to_.
Versions: langgraph-supervisor 0.0.31, langgraph-swarm 0.1.0, langgraph 1.2.22, Python 3.12.
