adk-python icon indicating copy to clipboard operation
adk-python copied to clipboard

Is ADK also planning to support "think" tool in the upcoming feature?

Open hanjihun2000 opened this issue 1 year ago • 6 comments

Is your feature request related to a problem? Please describe.

  • Actually, it is not related to a problem, but I would like to ask if there is by any chance that ADK team is planning to implement and introduce so-called "think" tool in the upcoming feature.

Describe the solution you’d like

  • I have been working on making an AI agent for my FYP. I found this ADK few days ago and would like to migrate all my code using ADK since I am using Gemini Flash 2.0 model for my foundation LLM model (would be awesome to seamlessly integrate!). However, one limit that Gemini Flash 2.0 model has is that it does not support "reasoning" capability. So my workaround and straightforward way is to implement "think" tool that was first proposed by Anthropic. Even though the model itself does not inherit reasoning capability, I can somehow see the great performance enhancement through this tool by let the model to call "think" tool whenever it has new external resources and information received by the function calling, give it a moment to process and think about the information and its state, and plan for the next step it needs to do. It is somehow different from the reasoning capability that the model first think to process user query before doing anything.

Describe alternatives you’ve considered

  • I think this is more like the prompt engineering technique than the software engineering. So far as I know, by just injecting this tool usage and some few-shot samples to the model's system prompt is basically everything. Here is also an reference tool description from Anthropic:
{
  "name": "think",
  "description": "Use the tool to think about something. It will not obtain new information or change the database, but just append the thought to the log. Use it when complex reasoning or some cache memory is needed.",
  "input_schema": {
    "type": "object",
    "properties": {
      "thought": {
        "type": "string",
        "description": "A thought to think about."
      }
    },
    "required": ["thought"]
  }
}

Additional context

  • I understand that why not just use o3 or Gemini Flash 2.5 where those models support reasoning. But as a student who want to try and explore the limit of LLM and AI agent, I think this simple "think" tool and this new methodology it has is significantly interesting to research in-depth. (and also cost issue as well 😄) Since I am quite new to this framework, I am not sure (and not familiar) how to dynamically inject the system prompt to the model I use through ADK. If I can able to find the spot where I can help, I am happy to contribute to implement this tool in ADK for everyone! Thank you for your attention!

hanjihun2000 avatar Apr 26 '25 10:04 hanjihun2000

Hi @hanjihun2000 , glad to hear you are trying out adk! adk currently support thinking process with planner as far as I know. You can check it out here: https://google.github.io/adk-docs/agents/llm-agents/#planning-code-execution

wyf7107 avatar Apr 27 '25 00:04 wyf7107

The docs don't have a clear example. I tried this, but I don't see the reasoning working https://github.com/google/adk-python/blob/26f55fb5ab00b0da230bc9cb820969fc4fadc464/contributing/samples/fields_planner/agent.py#L98

marianocodes avatar May 07 '25 18:05 marianocodes

The docs don't have a clear example. I tried this, but I don't see the reasoning working

adk-python/contributing/samples/fields_planner/agent.py

Line 98 in 26f55fb

planner=BuiltInPlanner(

yes this planning is not working there is no tags generated to see thinking process.

ramknin avatar May 22 '25 05:05 ramknin

@wyf7107 Thanks for your reply and sorry for my late comment. The one that you mentioned allows the model to plan before it starts to call tools or generating the answer, so that the LM can follow the planning steps. I think I can try this using the model like Gemini 2.5, but thinking tool I mentioned is somewhat different from planner in terms of how it behaves. It is a tool that models can call, stop what they are doing within the tool calling process, and give some spaces to models to think. I have using this tool from different framework called "Agno" and I think it would be a great new tool feature if it can be added to ADK as well. (ref.: https://docs.agno.com/reasoning/reasoning-tools) I would love to hear your opinion or feedback on this tool. Thank you!

hanjihun2000 avatar May 25 '25 09:05 hanjihun2000

It would be interesting to see if this could be implemented using a sub-agent that simply “thinks” and returns a response to an orchestrator. We could also use this agent as a tool.

lsinghkochava avatar Aug 13 '25 12:08 lsinghkochava

Hi @hanjihun2000 and thanks to everyone who participated in this thread.

We're currently doing some housekeeping on our issue tracker. Given the rapid pace of development and the number of updates since this was last active, there's a good chance this issue has been resolved in a newer version. To help us keep our backlog focused on current issues, we are closing this as stale.

If you're still facing this problem, could you please update to the very latest version of the library and confirm the issue still exists? If it does, please comment here, and we will be happy to reopen this issue and investigate further.

Thanks for your contribution and understanding!

klateefa avatar Oct 07 '25 06:10 klateefa