Spaces:
Sleeping
Sleeping
| from abc import ABC, abstractmethod | |
| from typing import List, Dict, Any | |
| class BaseTool(ABC): | |
| """ | |
| The universal contract for any capability. | |
| Enforces structure so the Agent Loader can handle any tool automatically. | |
| """ | |
| def name(self) -> str: | |
| """Unique identifier (e.g., 'get_stock_price').""" | |
| pass | |
| def description(self) -> str: | |
| """Natural language instruction for the LLM.""" | |
| pass | |
| def categories(self) -> List[str]: | |
| """Tags for the Registry (e.g., ['finance', 'public_api']).""" | |
| pass | |
| def get_schema(self) -> Dict[str, Any]: | |
| """Returns the JSON schema for LLM function calling.""" | |
| pass | |
| def run(self, **kwargs) -> Any: | |
| """Executes the tool logic.""" | |
| pass |