Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions swarms/agents/reasoning_agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,12 @@ def run(self, task: str, *args, **kwargs):
The result of the reasoning process (format depends on agent and output_type).
"""
try:
swarm = self.select_swarm()
return swarm.run(task=task, *args, **kwargs)
if self.swarm_type == "ReflexionAgent":
swarm = self.select_swarm()
return swarm.run(tasks=[task], *args, **kwargs)
else:
swarm = self.select_swarm()
return swarm.run(task=task, *args, **kwargs)
except Exception as e:
raise ReasoningAgentExecutorError(
f"ReasoningAgentRouter Error: {e} Traceback: {traceback.format_exc()} If the error persists, please check the agent's configuration and try again. If you would like support book a call with our team at https://cal.com/swarms"
Expand Down
Loading