from pylangdb.agno import init
init()
from agno.agent import Agent
from agno.team import Team
from agno.models.langdb import LangDB
from agno.tools.hackernews import HackerNewsTools
from agno.tools.yfinance import YFinanceTools
# Research Agent
web_agent = Agent(
name="Market Research Agent",
model=LangDB(id="openai/gpt-4.1"),
tools=[HackerNewsTools()],
instructions="Research current market conditions and news"
)
# Financial Analysis Agent
finance_agent = Agent(
name="Financial Analyst",
model=LangDB(id="xai/grok-4"),
tools=[YFinanceTools(stock_price=True, company_info=True)],
instructions="Perform quantitative financial analysis"
)
# Coordinated Team
reasoning_team = Team(
name="Finance Reasoning Team",
model=LangDB(id="xai/grok-4"),
members=[web_agent, finance_agent],
instructions=[
"Collaborate to provide comprehensive financial insights",
"Consider both fundamental analysis and market sentiment"
]
)
# Execute team workflow
reasoning_team.print_response("Analyze Apple (AAPL) investment potential")