Skip to main content
This example demonstrates how to create an async team with various tools for information gathering using multiple agents with different tools to gather comprehensive information asynchronously.

Code

async_team_with_tools.py
import asyncio

from agno.agent import Agent
from agno.models.openai import OpenAIResponses
from agno.team import Team
from agno.tools.hackernews import HackerNewsTools
from agno.tools.yfinance import YFinanceTools

# HackerNews agent
news_agent = Agent(
    name="News Agent",
    role="Search HackerNews for tech news",
    model=OpenAIResponses(id="gpt-5.2"),
    tools=[HackerNewsTools()],
    instructions=[
        "Find the latest tech news and discussions",
    ],
)

# Finance agent
finance_agent = Agent(
    name="Finance Agent",
    role="Get stock prices and financial data",
    model=OpenAIResponses(id="gpt-5.2"),
    tools=[YFinanceTools()],
    instructions=[
        "Get stock prices and financial information",
    ],
)

# Create the research team
research_team = Team(
    name="Research Team",
    model=OpenAIResponses(id="gpt-5.2"),
    members=[
        news_agent,
        finance_agent,
    ],
    markdown=True,
    instructions=[
        "You are a team that researches companies.",
        "Use the news agent to find recent discussions and the finance agent for stock data.",
    ],
    show_members_responses=True,
)

if __name__ == "__main__":
    asyncio.run(
        research_team.aprint_response(
            "Research NVIDIA - get the current stock price and find any recent HackerNews discussions about the company.",
            stream=True,
        )
    )

Usage

1

Create a Python file

Create async_team_with_tools.py with the code above.
2

Set up your virtual environment

uv venv --python 3.12
source .venv/bin/activate
3

Install dependencies

uv pip install -U agno openai yfinance
4

Export your OpenAI API key

export OPENAI_API_KEY="your_openai_api_key_here"
5

Run Team

python async_team_with_tools.py