Proofly / core /agent_base.py
Dipan04's picture
Initial clean commit for Hugging Face Space
2c41dce
raw
history blame contribute delete
868 Bytes
"""
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}>"