This example demonstrates streaming responses from a team using specialized agents with financial tools to provide real-time stock information with streaming output.
"""This example demonstrates streaming responses from a team.The team uses specialized agents with financial tools to provide real-timestock information with streaming output."""from typing import Iterator # noqafrom agno.agent import Agentfrom agno.models.openai import OpenAIChatfrom agno.team import Teamfrom agno.tools.exa import ExaTools# Stock price and analyst data agentstock_searcher = Agent( name="Stock Searcher", model=OpenAIChat(id="gpt-5-mini"), role="Searches the web for information on a stock.", tools=[ ExaTools( include_domains=["cnbc.com", "reuters.com", "bloomberg.com", "wsj.com"], text=False, show_results=True, highlights=False, ) ],)# Company information agentcompany_info_agent = Agent( name="Company Info Searcher", model=OpenAIChat(id="gpt-5-mini"), role="Searches the web for information on a stock.", tools=[ ExaTools( include_domains=["cnbc.com", "reuters.com", "bloomberg.com", "wsj.com"], text=False, show_results=True, highlights=False, ) ],)# Create team with streaming capabilitiesteam = Team( name="Stock Research Team", model=OpenAIChat(id="gpt-5-mini"), members=[stock_searcher, company_info_agent], markdown=True, show_members_responses=True,)# Test streaming responseteam.print_response( "What is the current stock price of NVDA?", stream=True, stream_intermediate_steps=True,)