Spaces:
Runtime error
Runtime error
| from abc import ABC, abstractmethod | |
| from typing import Dict, Any, List, Optional | |
| class BaseAgent(ABC): | |
| """ | |
| Protocol 26: Standard Agent Interface for Matroska Swarm. | |
| All agents must implement this to be auto-discovered by the Router. | |
| """ | |
| def name(self) -> str: | |
| """Unique name of the agent (e.g., 'VideoAtomizer')""" | |
| pass | |
| def description(self) -> str: | |
| """Short description for the Router's system prompt""" | |
| pass | |
| def triggers(self) -> List[str]: | |
| """List of keywords or regex patterns that trigger this agent""" | |
| pass | |
| async def process(self, task: Dict[str, Any]) -> Dict[str, Any]: | |
| """ | |
| Execute the agent's logic. | |
| Args: | |
| task: The input packet (e.g., {'content': '...', 'context': {}}) | |
| Returns: | |
| Dict containing 'status', 'result', and 'tensor_updates' | |
| """ | |
| pass | |