Examples
- Examples
- Getting Started
- Agents
- Teams
- Workflows
- Applications
- Streamlit Apps
- Evals
Agent Concepts
- Reasoning
- Multimodal
- RAG
- User Control Flows
- Knowledge
- Memory
- Async
- Hybrid Search
- Storage
- Tools
- Vector Databases
- Context
- Embedders
- Agent State
- Observability
- Miscellaneous
Models
- Anthropic
- AWS Bedrock
- AWS Bedrock Claude
- Azure AI Foundry
- Azure OpenAI
- Cerebras
- Cerebras OpenAI
- Cohere
- DeepInfra
- DeepSeek
- Fireworks
- Gemini
- Groq
- Hugging Face
- IBM
- LM Studio
- LiteLLM
- LiteLLM OpenAI
- Meta
- Mistral
- NVIDIA
- Ollama
- OpenAI
- Perplexity
- Together
- XAI
- Vercel
Tools
Gemini with Thinking Tools
Code
cookbook/reasoning/tools/gemini_finance_agent.py
from agno.agent import Agent
from agno.models.google import Gemini
from agno.tools.thinking import ThinkingTools
from agno.tools.yfinance import YFinanceTools
thinking_agent = Agent(
model=Gemini(id="gemini-2.0-flash"),
tools=[
ThinkingTools(add_instructions=True),
YFinanceTools(
stock_price=True,
analyst_recommendations=True,
company_info=True,
company_news=True,
),
],
instructions="Use tables where possible",
show_tool_calls=True,
markdown=True,
stream_intermediate_steps=True,
)
thinking_agent.print_response(
"Write a report comparing NVDA to TSLA in detail", stream=True, show_reasoning=True
)
Usage
1
Create a virtual environment
Open the Terminal
and create a python virtual environment.
python3 -m venv .venv
source .venv/bin/activate
2
Set your API key
export GOOGLE_API_KEY=xxx
3
Install libraries
pip install -U google-genai agno
4
Run Agent
python cookbook/reasoning/tools/gemini_finance_agent.py
Was this page helpful?
Assistant
Responses are generated using AI and may contain mistakes.