ThinkingTools ツールキットはエージェントに実行中の思案のための専用のスペースを提供します。このツールキットはエージェントがスクラッチパッドを使用して、問題をよく考え、ルールをリストアップし、情報を確認し、コンプライアンスを検証し、そしてアクションを取る前に結果を評価することを可能にします。
Agno : ユーザガイド : コンセプト : ツール – 思考ツール
作成 : クラスキャット・セールスインフォメーション
作成日時 : 08/09/2025
バージョン : Agno 1.7.7
* 本記事は docs.agno.com の以下のページを独自に翻訳した上で、補足説明を加えてまとめ直しています :
* サンプルコードの動作確認はしておりますが、必要な場合には適宜、追加改変しています。
* ご自由にリンクを張って頂いてかまいませんが、sales-info@classcat.com までご一報いただけると嬉しいです。
Agno ユーザガイド : コンセプト : ツール – 思考ツール
ThinkingTools ツールキットはエージェントに実行中の思案 (reflection) のための専用のスペースを提供します。このツールキットはエージェントがスクラッチパッドを使用して、問題をよく考え、ルールをリストアップし、情報を確認し、コンプライアンスを検証し、そしてアクションを取る前に結果を評価することを可能にします。
エージェントを直ちに応答・行動させるアプローチとは違い、このツールキットは、エージェントにアクションについて「考える」スペースを与え、自身の応答を検証し、そして会話を通して思考プロセスの記録を保持することで、思慮深い考慮 (consideration) を促します。
このツールキットは以下のツールを含みます :
- think : このツールは、エージェントが問題を推論し、適用可能なルールをリストアップし、収集した情報を検証し、そしてコンプリアンスと正確性について計画されたアクションを評価するためのスクラッチパッドとして機能します。
例
ThinkingTools ツールキットの使用方法の例を以下に示します :
from agno.agent import Agent
from agno.models.anthropic import Claude
from agno.tools.thinking import ThinkingTools
from agno.tools.yfinance import YFinanceTools
thinking_agent = Agent(
model=Claude(id="claude-3-7-sonnet-latest"),
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,
)
thinking_agent.print_response("Write a report comparing NVDA to TSLA", stream=True)
ツールキットはデフォルトの指示を備え、エージェントがツールを効果的に使用できるようにします。それらを有効にする方法は :
thinking_agent = Agent(
model=Claude(id="claude-3-7-sonnet-latest"),
tools=[
ThinkingTools(
think=True,
add_instructions=True,
),
],
)
ThinkingTools は関数呼び出しをサポートする任意のモデルプロバイダーで使用できます。OpenAIChat を使用した思考エージェントの例が以下です :
from textwrap import dedent
from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.tools.thinking import ThinkingTools
thinking_agent = Agent(
model=OpenAIChat(id="gpt-4o"),
tools=[ThinkingTools(add_instructions=True)],
instructions=dedent("""\
You are an expert problem-solving assistant with strong analytical skills! 🧠
Your approach to problems:
1. First, break down complex questions into component parts
2. Clearly state your assumptions
3. Develop a structured reasoning path
4. Consider multiple perspectives
5. Evaluate evidence and counter-arguments
6. Draw well-justified conclusions
When solving problems:
- Use explicit step-by-step reasoning
- Identify key variables and constraints
- Explore alternative scenarios
- Highlight areas of uncertainty
- Explain your thought process clearly
\
"""),
add_datetime_to_instructions=True,
stream_intermediate_steps=True,
show_tool_calls=True,
markdown=True,
)
このエージェントは、注意深い考慮が必要な複雑な問題に対処するために使用できます :
thinking_agent.print_response(
"We need to implement a new content moderation policy for our platform. "
stream=True
)
or
thinking_agent.print_response(
"Our company is developing a new AI product. We need to consider ethical implications "
stream=True,
)
以上