File size: 868 Bytes
2c41dce |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
"""
Base agent interface for all system agents.
Ensures consistent behavior across all agent implementations.
"""
from abc import ABC, abstractmethod
from typing import Any, Dict
class Agent(ABC):
"""
Base class for all agents in the system.
Each agent must implement the execute method with structured I/O.
"""
def __init__(self):
self.name = self.__class__.__name__
@abstractmethod
def execute(self, input_data: Dict[str, Any]) -> Dict[str, Any]:
"""
Execute the agent's core logic.
Args:
input_data: Structured input dictionary
Returns:
Structured output dictionary
Raises:
ProofSystemError: On execution failure
"""
pass
def __repr__(self) -> str:
return f"<{self.name}>" |