@@ -9,34 +9,20 @@ First published by Anthropic in [this blog post](https://www.anthropic.com/engin
99### Example
1010
1111``` python claude_reasoning_tools.py
12- from textwrap import dedent
13-
1412from agno.agent import Agent
1513from agno.models.anthropic import Claude
16- from agno.tools.thinking import ThinkingTools
14+ from agno.tools.reasoning import ReasoningTools
1715from agno.tools.yfinance import YFinanceTools
1816
19- thinking_agent = Agent(
17+ reasoning_agent = Agent(
2018 model = Claude(id = " claude-3-7-sonnet-20250219" ),
2119 tools = [
22- ThinkingTools( ),
20+ ReasoningTools( add_instructions = True , add_few_shot = True ),
2321 YFinanceTools(stock_price = True , analyst_recommendations = True , company_info = True , company_news = True ),
2422 ],
25- instructions = dedent(""" \
26- ## Using the think tool
27- Before taking any action or responding to the user after receiving tool results, use the think tool as a scratchpad to:
28- - List the specific rules that apply to the current request
29- - Check if all required information is collected
30- - Verify that the planned action complies with all policies
31- - Iterate over tool results for correctness
32-
33- ## Rules
34- - Its expected that you will use the think tool generously to jot down thoughts and ideas.
35- - Use tables where possible\
36- """ ),
3723 show_tool_calls = True ,
3824)
39- thinking_agent .print_response(
25+ reasoning_agent .print_response(
4026 " Write a report comparing NVDA to TSLA" , stream = True , markdown = True
4127)
4228```
0 commit comments