Copy
Ask AI
"""
Groq Finance Agent
==================
Cookbook example for `groq/reasoning/finance_agent.py`.
"""
from agno.agent import Agent
from agno.models.groq import Groq
from agno.tools.yfinance import YFinanceTools
# ---------------------------------------------------------------------------
# Create Agent
# ---------------------------------------------------------------------------
# Create an Agent with Groq and YFinanceTools
finance_agent = Agent(
model=Groq(id="deepseek-r1-distill-llama-70b-specdec"),
tools=[YFinanceTools()],
description="You are an investment analyst with deep expertise in market analysis",
instructions=[
"Use tables to display data where possible.",
"Always call the tool before you answer.",
],
add_datetime_to_context=True,
markdown=True,
)
# Example usage
finance_agent.print_response(
"Write a report on NVDA with stock price, analyst recommendations, and stock fundamentals.",
stream=True,
)
# ---------------------------------------------------------------------------
# Run Agent
# ---------------------------------------------------------------------------
if __name__ == "__main__":
pass
Run the Example
Copy
Ask AI
# Clone and setup repo
git clone https://github.com/agno-agi/agno.git
cd agno/cookbook/90_models/groq/reasoning
# Create and activate virtual environment
./scripts/demo_setup.sh
source .venvs/demo/bin/activate
python finance_agent.py