ohollo's picture
Evaluate via ollama and claude
870db88
Raw
History Blame Contribute Delete
569 Bytes
from abc import ABC, abstractmethod
from typing import NamedTuple
class ToolCall(NamedTuple):
name: str
args: dict
result: str | None = None
class AgentResult(NamedTuple):
response: str
tool_calls: list[ToolCall]
class Agent(ABC):
"""Common interface for all agent implementations under test."""
def __init__(self, mcp_url: str):
self.mcp_url = mcp_url
@abstractmethod
def run(self, user_prompt: str) -> AgentResult:
"""Run the agent on a prompt and return the response and ordered tool calls."""
...