from collections.abc import AsyncIterator
from typing import Protocol


class AgentProtocol(Protocol):
    """Standard interface for all test agents."""

    def ask(self, question: str) -> str:
        """
        Ask the agent a question and return the response.

        Args:
            question: The question to ask the agent

        Returns:
            The agent's response as a string
        """
        ...

    async def stream(self, question: str) -> AsyncIterator[str]:
        """
        Ask the agent a question and stream the response.

        Args:
            question: The question to ask the agent

        Yields:
            Chunks of the agent's response
        """
        ...
