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

# Team Reliability Evaluation for News Search

> Check whether a news-research team makes the expected delegation and web search tool calls.

```python ai_news.py theme={null}
"""
Team Reliability Evaluation for News Search
===========================================

Demonstrates tool-call reliability checks for a team workflow.
"""

from typing import Optional

from agno.agent import Agent
from agno.eval.reliability import ReliabilityEval, ReliabilityResult
from agno.models.openai import OpenAIChat
from agno.run.team import TeamRunOutput
from agno.team.team import Team
from agno.tools.websearch import WebSearchTools

# ---------------------------------------------------------------------------
# Create Team
# ---------------------------------------------------------------------------
team_member = Agent(
    name="News Searcher",
    model=OpenAIChat("gpt-4o"),
    role="Searches the web for the latest news.",
    tools=[WebSearchTools(enable_news=True)],
)
team = Team(
    name="News Research Team",
    model=OpenAIChat("gpt-4o"),
    members=[team_member],
    markdown=True,
    show_members_responses=True,
)
expected_tool_calls = [
    "delegate_task_to_member",
    "search_news",
]


# ---------------------------------------------------------------------------
# Create Evaluation Function
# ---------------------------------------------------------------------------
def evaluate_team_reliability():
    response: TeamRunOutput = team.run("What is the latest news on AI?")
    evaluation = ReliabilityEval(
        name="Team Reliability Evaluation",
        team_response=response,
        expected_tool_calls=expected_tool_calls,
    )
    result: Optional[ReliabilityResult] = evaluation.run(print_results=True)
    if result:
        result.assert_passed()


# ---------------------------------------------------------------------------
# Run Evaluation
# ---------------------------------------------------------------------------
if __name__ == "__main__":
    evaluate_team_reliability()
```

## Run the Example

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

  <Step title="Install dependencies">
    ```bash theme={null}
    uv pip install -U agno ddgs openai
    ```
  </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 the example">
    Save the code above as `ai_news.py`, then run:

    ```bash theme={null}
    python ai_news.py
    ```
  </Step>
</Steps>

Full source: [cookbook/09\_evals/reliability/team/ai\_news.py](https://github.com/agno-agi/agno/blob/main/cookbook/09_evals/reliability/team/ai_news.py)
