From a8677286c90ea88b779d5371e7cdde5ad0d9c102 Mon Sep 17 00:00:00 2001 From: Kye Gomez Date: Mon, 1 Dec 2025 14:48:03 -0800 Subject: [PATCH] improvement -> fix swarm router integrations and heavy swarm integration --- ...uter_example.py => swarm_router_example.py | 0 swarms/structs/swarm_router.py | 20 +------------------ 2 files changed, 1 insertion(+), 19 deletions(-) rename examples/multi_agent/swarm_router/swarm_router_example.py => swarm_router_example.py (100%) diff --git a/examples/multi_agent/swarm_router/swarm_router_example.py b/swarm_router_example.py similarity index 100% rename from examples/multi_agent/swarm_router/swarm_router_example.py rename to swarm_router_example.py diff --git a/swarms/structs/swarm_router.py b/swarms/structs/swarm_router.py index 70609436..74348c37 100644 --- a/swarms/structs/swarm_router.py +++ b/swarms/structs/swarm_router.py @@ -26,7 +26,7 @@ from swarms.structs.council_as_judge import CouncilAsAJudge from swarms.structs.debate_with_judge import DebateWithJudge from swarms.structs.groupchat import GroupChat from swarms.structs.heavy_swarm import HeavySwarm -from swarms.structs.hierarchical_swarm import HierarchicalSwarm +from swarms.structs.hiearchical_swarm import HierarchicalSwarm from swarms.structs.interactive_groupchat import InteractiveGroupChat from swarms.structs.ma_utils import list_all_agents from swarms.structs.majority_voting import MajorityVoting @@ -306,24 +306,6 @@ class SwarmRouter: "See https://docs.swarms.world/en/latest/swarms/structs/swarm_router/" ) - if ( - self.swarm_type != "HeavySwarm" - and self.swarm_type != "DebateWithJudge" - and self.agents is None - ): - raise SwarmRouterConfigError( - "SwarmRouter: No agents provided for the swarm. Check the docs to learn of required parameters. https://docs.swarms.world/en/latest/swarms/structs/agent/" - ) - - if self.swarm_type == "DebateWithJudge": - if self.agents is None or len(self.agents) != 3: - raise SwarmRouterConfigError( - "SwarmRouter: DebateWithJudge requires exactly 3 agents: " - "pro_agent (arguing in favor), con_agent (arguing against), " - "and judge_agent (evaluating and synthesizing). " - f"Provided {len(self.agents) if self.agents else 0} agent(s). " - "Check the docs: https://docs.swarms.world/en/latest/swarms/structs/swarm_router/" - ) if ( self.swarm_type == "AgentRearrange"