GitHub Copilot
Sync: Deployed Dynamic Agent Onboarding logic to Space
ad60bb2
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.
"""
@property
@abstractmethod
def name(self) -> str:
"""Unique name of the agent (e.g., 'VideoAtomizer')"""
pass
@property
@abstractmethod
def description(self) -> str:
"""Short description for the Router's system prompt"""
pass
@property
@abstractmethod
def triggers(self) -> List[str]:
"""List of keywords or regex patterns that trigger this agent"""
pass
@abstractmethod
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