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,
)
)