|
|
@ -59,7 +59,7 @@ class MultiAgentRouter:
|
|
|
|
self,
|
|
|
|
self,
|
|
|
|
name: str = "swarm-router",
|
|
|
|
name: str = "swarm-router",
|
|
|
|
description: str = "Routes tasks to specialized agents based on their capabilities",
|
|
|
|
description: str = "Routes tasks to specialized agents based on their capabilities",
|
|
|
|
agents: List[Agent] = [],
|
|
|
|
agents: List[Agent] = None,
|
|
|
|
model: str = "gpt-4o-mini",
|
|
|
|
model: str = "gpt-4o-mini",
|
|
|
|
temperature: float = 0.1,
|
|
|
|
temperature: float = 0.1,
|
|
|
|
shared_memory_system: callable = None,
|
|
|
|
shared_memory_system: callable = None,
|
|
|
@ -78,6 +78,7 @@ class MultiAgentRouter:
|
|
|
|
output_type (Literal["json", "string"], optional): The type of output expected from the agents. Defaults to "json".
|
|
|
|
output_type (Literal["json", "string"], optional): The type of output expected from the agents. Defaults to "json".
|
|
|
|
execute_task (bool, optional): A flag indicating whether the task should be executed by the selected agent. Defaults to True.
|
|
|
|
execute_task (bool, optional): A flag indicating whether the task should be executed by the selected agent. Defaults to True.
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
|
|
|
|
agents = agents or []
|
|
|
|
self.name = name
|
|
|
|
self.name = name
|
|
|
|
self.description = description
|
|
|
|
self.description = description
|
|
|
|
self.shared_memory_system = shared_memory_system
|
|
|
|
self.shared_memory_system = shared_memory_system
|
|
|
|