> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agno.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Accuracy with Teams

> Example showing how to evaluate the accuracy of an Agno Team.

<Steps>
  <Step title="Create a Python file">
    ```python accuracy_with_teams.py theme={null}
    from typing import Optional

    from agno.agent import Agent
    from agno.eval.accuracy import AccuracyEval, AccuracyResult
    from agno.models.openai import OpenAIResponses
    from agno.team import Team

    # Setup a team with two members
    english_agent = Agent(
        name="English Agent",
        role="You only answer in English",
        model=OpenAIResponses(id="gpt-5.2"),
    )
    spanish_agent = Agent(
        name="Spanish Agent",
        role="You can only answer in Spanish",
        model=OpenAIResponses(id="gpt-5.2"),
    )

    multi_language_team = Team(
        name="Multi Language Team",
        model=OpenAIResponses(id="gpt-5.2"),
        members=[english_agent, spanish_agent],
        respond_directly=True,
        markdown=True,
        instructions=[
            "You are a language router that directs questions to the appropriate language agent.",
            "If the user asks in a language whose agent is not a team member, respond in English with:",
            "'I can only answer in the following languages: English and Spanish.",
            "Always check the language of the user's input before routing to an agent.",
        ],
    )

    # Evaluate the accuracy of the Team's responses
    evaluation = AccuracyEval(
        name="Multi Language Team",
        model=OpenAIResponses(id="gpt-5.2"),
        team=multi_language_team,
        input="Comment allez-vous?",
        expected_output="I can only answer in the following languages: English and Spanish.",
        num_iterations=1,
    )

    result: Optional[AccuracyResult] = evaluation.run(print_results=True)
    assert result is not None and result.avg_score >= 8
    ```
  </Step>

  <Snippet file="create-venv-step.mdx" />

  <Step title="Install dependencies">
    ```bash theme={null}
    uv pip install -U openai agno
    ```
  </Step>

  <Step title="Export your OpenAI API key">
    <CodeGroup>
      ```bash Mac/Linux theme={null}
        export OPENAI_API_KEY="your_openai_api_key_here"
      ```

      ```bash Windows theme={null}
        $Env:OPENAI_API_KEY="your_openai_api_key_here"
      ```
    </CodeGroup>
  </Step>

  <Step title="Run Team">
    ```bash theme={null}
    python accuracy_with_teams.py
    ```
  </Step>
</Steps>
