from abc import ABC, abstractmethod
from typing import List, Dict, Any
[docs]
class ISwarmAPI(ABC):
"""
Interface for managing the swarm's API endpoints.
"""
[docs]
@abstractmethod
def dispatch_request(self, request_data: Dict[str, Any]) -> Any:
"""
Dispatches an incoming user request to one or more suitable agents based on their capabilities.
Parameters:
- request_data (Dict[str, Any]): Data related to the incoming request.
Returns:
- Any: Response from processing the request.
"""
pass
[docs]
@abstractmethod
def broadcast_request(self, request_data: Dict[str, Any]) -> Any:
pass