Skip to content

Class swarmauri_core.swarms.ISwarm.ISwarm

swarmauri_core.swarms.ISwarm.ISwarm

Bases: ABC

Abstract base class for swarm implementations

agents abstractmethod property

agents

Get list of agents in the swarm

queue_size abstractmethod property

queue_size

Get size of task queue

exec abstractmethod async

exec(input_data, **kwargs)

Execute swarm tasks with given input

Source code in swarmauri_core/swarms/ISwarm.py
 8
 9
10
11
12
13
14
15
@abstractmethod
async def exec(
    self,
    input_data: Union[str, List[str]],
    **kwargs: Dict[str, Any],
) -> Any:
    """Execute swarm tasks with given input"""
    pass

get_swarm_status abstractmethod

get_swarm_status()

Get status of all agents in the swarm

Source code in swarmauri_core/swarms/ISwarm.py
17
18
19
20
@abstractmethod
def get_swarm_status(self) -> Dict[int, Any]:
    """Get status of all agents in the swarm"""
    pass