diff --git a/docs/llm.txt b/docs/llm.txt index 2a0709b1..d6674264 100644 --- a/docs/llm.txt +++ b/docs/llm.txt @@ -24130,7 +24130,6 @@ flowchart LR - Maintains strict ordering of task processing - ### Star Swarm ```python def star_swarm(agents: AgentListType, tasks: List[str], return_full_history: bool = True) @@ -24364,7 +24363,6 @@ flowchart TD ## Common Use Cases 1. **Data Processing Pipelines** - - Linear Swarm - Circular Swarm 2. **Distributed Computing** diff --git a/docs/swarms/examples/unique_swarms.md b/docs/swarms/examples/unique_swarms.md index a4a37bb6..af3b30e1 100644 --- a/docs/swarms/examples/unique_swarms.md +++ b/docs/swarms/examples/unique_swarms.md @@ -294,7 +294,6 @@ flowchart TD ## Common Use Cases 1. **Data Processing Pipelines** - - Linear Swarm - Circular Swarm 2. **Distributed Computing** diff --git a/swarms/structs/swarming_architectures.py b/swarms/structs/swarming_architectures.py index f2c09bed..033a083f 100644 --- a/swarms/structs/swarming_architectures.py +++ b/swarms/structs/swarming_architectures.py @@ -106,7 +106,6 @@ def grid_swarm( return history_output_formatter(conversation, output_type) - # Star Swarm: A central agent first processes all tasks, followed by others def star_swarm( agents: AgentListType, diff --git a/swarms/structs/various_alt_swarms.py b/swarms/structs/various_alt_swarms.py index c4b34f9f..589e9ad2 100644 --- a/swarms/structs/various_alt_swarms.py +++ b/swarms/structs/various_alt_swarms.py @@ -119,60 +119,6 @@ class CircularSwarm(BaseSwarm): return self._format_return() -class LinearSwarm(BaseSwarm): - """ - Implements a linear swarm where agents process tasks sequentially. - """ - - def __init__( - self, - agents: AgentListType, - name: str = "LinearSwarm", - description: str = "A linear swarm where agents process tasks sequentially", - output_type: str = "dict", - ): - """ - Initialize the LinearSwarm. - - Args: - agents: List of Agent objects or nested list of Agent objects - name: Name of the swarm - description: Description of the swarm's purpose - output_type: Type of output format, one of 'dict', 'list', 'string', 'json', 'yaml', 'xml', etc. - """ - super().__init__(agents, name, description, output_type) - - def run(self, tasks: List[str]) -> Union[Dict, List, str]: - """ - Run the linear swarm with the given tasks - - Args: - tasks: List of tasks to be processed - - Returns: - Union[Dict, List, str]: The conversation history in the requested format - """ - if not self.agents or not tasks: - raise ValueError( - "Agents and tasks lists cannot be empty." - ) - - tasks_copy = tasks.copy() - responses = [] - - for agent in self.agents: - if tasks_copy: - task = tasks_copy.pop(0) - response = agent.run(task) - self.conversation.add( - role=agent.agent_name, - content=response, - ) - responses.append(response) - - return self._format_return() - - class StarSwarm(BaseSwarm): """ Implements a star swarm where a central agent processes all tasks, followed by others.