Abstract base class for all agent runners. Subclasses implement :meth:`run` to handle a natural-language question and return an :class:`AgentResult`. After ``super().__init__``, ``self._server_paths`` is always a concrete ``dict`` — either the caller's override, or a copy of :data:
| 24 | |
| 25 | |
| 26 | class AgentRunner(ABC): |
| 27 | """Abstract base class for all agent runners. |
| 28 | |
| 29 | Subclasses implement :meth:`run` to handle a natural-language question and |
| 30 | return an :class:`AgentResult`. After ``super().__init__``, |
| 31 | ``self._server_paths`` is always a concrete ``dict`` — either the caller's |
| 32 | override, or a copy of :data:`DEFAULT_SERVER_PATHS`. |
| 33 | """ |
| 34 | |
| 35 | def __init__( |
| 36 | self, |
| 37 | llm: LLMBackend, |
| 38 | server_paths: dict[str, Path | str] | None = None, |
| 39 | ) -> None: |
| 40 | self._llm = llm |
| 41 | self._server_paths: dict[str, Path | str] = ( |
| 42 | dict(DEFAULT_SERVER_PATHS) if server_paths is None else server_paths |
| 43 | ) |
| 44 | |
| 45 | @abstractmethod |
| 46 | async def run(self, question: str) -> AgentResult: |
| 47 | """Run the agent on *question* and return a structured result.""" |
nothing calls this directly
no outgoing calls
no test coverage detected