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.""" ...