Agent did not call the tool #12013

Closed
opened 2026-02-21 19:05:16 -05:00 by yindo · 2 comments
Owner

Originally created by @ans1988dog on GitHub (Mar 23, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.0.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Agent did not call the tool to answer the question,I publish the workflow as a tool and then call the tool in the agent to answer the same question. The agent's answer is completely different from the workflow...

✔️ Expected Behavior

This is the result of the tool being executed separately

Image

Actual Behavior

I published the above workflow as a tool, but when calling the tool in the agent, according to the prompt words, only the tool can be used to answer questions. However, in reality, the agent did not answer the questions according to the tool, which is simply wrong

Image

Originally created by @ans1988dog on GitHub (Mar 23, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.0.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce Agent did not call the tool to answer the question,I publish the workflow as a tool and then call the tool in the agent to answer the same question. The agent's answer is completely different from the workflow... ### ✔️ Expected Behavior This is the result of the tool being executed separately ![Image](https://github.com/user-attachments/assets/69ee5c54-de4b-47ec-adb8-eac85272e734) ### ❌ Actual Behavior I published the above workflow as a tool, but when calling the tool in the agent, according to the prompt words, only the tool can be used to answer questions. However, in reality, the agent did not answer the questions according to the tool, which is simply wrong ![Image](https://github.com/user-attachments/assets/e323c737-4db6-4043-a287-8f2ab30f1d24)
yindo closed this issue 2026-02-21 19:05:16 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Mar 23, 2025):

Hello @ans1988dog! I'm here to help you with any bugs, questions, or contributions you have. Let's work together to solve this issue!

I found some similar threads that might be relevant to your issue:

  1. When using our own Deepseek API, the agent cannot trigger tool calls - This discussion is open and addresses issues with agents not triggering tool calls. Suggested solutions include checking error handling, ensuring the expected data format, verifying configuration settings, and utilizing logging and debugging features.

  2. An agent project has been created in the community version of DIY, without calling the tools under the agent - This is another open discussion that might provide insights into similar issues with agents not calling tools.

  3. Help, can agent use the tools output directly - This discussion is open and explores whether agents can directly use tool outputs.

Additionally, there is an open issue titled Agent NEVER get any result from workflow tool that suggests similar solutions, such as ensuring error handling is set up correctly, verifying the data format, checking configuration settings, and using logging and debugging features to trace interactions [1][2][3][4].

These threads might offer some guidance on troubleshooting your issue with the agent not calling the tool as expected.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot[bot] commented on GitHub (Mar 23, 2025): <!-- Greeting --> Hello @ans1988dog! I'm here to help you with any bugs, questions, or contributions you have. Let's work together to solve this issue! <!-- Answer --> I found some similar threads that might be relevant to your issue: 1. [When using our own Deepseek API, the agent cannot trigger tool calls](https://github.com/langgenius/dify/discussions/13516) - This discussion is open and addresses issues with agents not triggering tool calls. Suggested solutions include checking error handling, ensuring the expected data format, verifying configuration settings, and utilizing logging and debugging features. 2. [An agent project has been created in the community version of DIY, without calling the tools under the agent](https://github.com/langgenius/dify/discussions/14560) - This is another open discussion that might provide insights into similar issues with agents not calling tools. 3. [Help, can agent use the tools output directly](https://github.com/langgenius/dify/discussions/12757) - This discussion is open and explores whether agents can directly use tool outputs. Additionally, there is an open issue titled [Agent NEVER get any result from workflow tool](https://github.com/langgenius/dify/issues/12108) that suggests similar solutions, such as ensuring error handling is set up correctly, verifying the data format, checking configuration settings, and using logging and debugging features to trace interactions <sup>[[1]](https://github.com/langgenius/dify/discussions/13516)</sup><sup>[[2]](https://github.com/langgenius/dify/discussions/14560)</sup><sup>[[3]](https://github.com/langgenius/dify/discussions/12757)</sup><sup>[[4]](https://github.com/langgenius/dify/issues/12108)</sup>. These threads might offer some guidance on troubleshooting your issue with the agent not calling the tool as expected. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/eaa0895c-cfff-4e1e-bd38-d7f9e41bb169?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/eaa0895c-cfff-4e1e-bd38-d7f9e41bb169?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/eaa0895c-cfff-4e1e-bd38-d7f9e41bb169?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/eaa0895c-cfff-4e1e-bd38-d7f9e41bb169?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/eaa0895c-cfff-4e1e-bd38-d7f9e41bb169?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/eaa0895c-cfff-4e1e-bd38-d7f9e41bb169?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/eaa0895c-cfff-4e1e-bd38-d7f9e41bb169?feedback_type=other)</sup>
Author
Owner

@crazywoola commented on GitHub (Mar 23, 2025):

Try a different model. This has been raised several times, Agent do have it's own ideas about calling the functions and understand your questions.

@crazywoola commented on GitHub (Mar 23, 2025): Try a different model. This has been raised several times, Agent do have it's own ideas about calling the functions and understand your questions.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#12013