@ -284,6 +284,10 @@ class ReasoningAgentRouter:
The result of the reasoning process (format depends on agent and output_type).
"""
try:
if self.swarm_type == "ReflexionAgent":
swarm = self.select_swarm()
return swarm.run(tasks=[task], *args, **kwargs)
else:
return swarm.run(task=task, *args, **kwargs)
except Exception as e: