Download core/agent_base.py from dipan004/Proofly: direct link, hf CLI and curl.
- Browser
- Download file 868 Bytes
-
https://huggingface.co/spaces/dipan004/Proofly/resolve/main/core/agent_base.py
- Command line
-
hf download hf://spaces/dipan004/Proofly/core/agent_base.py
-
curl -L -o agent_base.py https://huggingface.co/spaces/dipan004/Proofly/resolve/main/core/agent_base.py
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__ | |
| 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}>" |