The agent calls the tools that have been published by the workflow, and the tools cannot be streamed #13721

Closed
opened 2026-02-21 19:13:33 -05:00 by yindo · 4 comments
Owner

Originally created by @guqing1315 on GitHub (May 8, 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.1.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

After publishing a workflow as a tool, the workflow can be streamed out normally, but after the workflow is published as a tool, it is called by the agent, and the problem is entered in the agent, and when the agent calls the tool, there is no way to stream the output, resulting in a long wait for the result.

✔️ Expected Behavior

When an agent invokes a tool published by a workflow, the tool can also stream output

Actual Behavior

When an agent invokes a tool published by a workflow, the tool does not have streaming output and needs to wait a long time before returning the result

Originally created by @guqing1315 on GitHub (May 8, 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.1.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce After publishing a workflow as a tool, the workflow can be streamed out normally, but after the workflow is published as a tool, it is called by the agent, and the problem is entered in the agent, and when the agent calls the tool, there is no way to stream the output, resulting in a long wait for the result. ### ✔️ Expected Behavior When an agent invokes a tool published by a workflow, the tool can also stream output ### ❌ Actual Behavior When an agent invokes a tool published by a workflow, the tool does not have streaming output and needs to wait a long time before returning the result
yindo added the 🤖 feat:agent🔨 feat:tools labels 2026-02-21 19:13:33 -05:00
yindo closed this issue 2026-02-21 19:13:33 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (May 8, 2025):

Hello @guqing1315! I'm Dosu, your friendly bot here to assist you with bug fixes, answer questions, and help you become a contributor. I'm here to help while you wait for a human maintainer. Let's dive into your issue!

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

  1. How to implement streaming response when a Dify agent invokes a workflow? - This discussion is open and provides a solution for implementing streaming responses using the invoke method of the workflow interface with the response_mode set to "streaming". This returns a generator that yields data as it becomes available.

  2. How to make the conversational application created using dify use streaming output? - This discussion is open and might offer insights into enabling streaming output for applications created using Dify.

  3. Does the agent support the streaming output of Tools? - This issue is closed, but it suggests using a generator for streaming responses when invoking tools.

To address your problem, you might consider using the invoke method with response_mode set to "streaming" when the agent calls the tool. This approach should help in achieving streaming output and reducing wait times [1][2].

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 (May 8, 2025): <!-- Greeting --> Hello @guqing1315! I'm [Dosu](https://dosu.dev), your friendly bot here to assist you with bug fixes, answer questions, and help you become a contributor. I'm here to help while you wait for a human maintainer. Let's dive into your issue! <!-- Answer --> I found some similar threads that might be relevant to your issue: 1. [How to implement streaming response when a Dify agent invokes a workflow?](https://github.com/langgenius/dify/discussions/13552) - This discussion is open and provides a solution for implementing streaming responses using the `invoke` method of the `workflow` interface with the `response_mode` set to `"streaming"`. This returns a generator that yields data as it becomes available. 2. [How to make the conversational application created using dify use streaming output?](https://github.com/langgenius/dify/discussions/3767) - This discussion is open and might offer insights into enabling streaming output for applications created using Dify. 3. [Does the agent support the streaming output of Tools?](https://github.com/langgenius/dify/issues/9648) - This issue is closed, but it suggests using a generator for streaming responses when invoking tools. To address your problem, you might consider using the `invoke` method with `response_mode` set to `"streaming"` when the agent calls the tool. This approach should help in achieving streaming output and reducing wait times <sup>[[1]](https://github.com/langgenius/dify/discussions/13552)</sup><sup>[[2]](https://github.com/langgenius/dify/discussions/3767)</sup>. <!-- 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/b1dd401f-cb56-4f47-a7fd-98a959e617c8?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/b1dd401f-cb56-4f47-a7fd-98a959e617c8?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/b1dd401f-cb56-4f47-a7fd-98a959e617c8?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/b1dd401f-cb56-4f47-a7fd-98a959e617c8?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/b1dd401f-cb56-4f47-a7fd-98a959e617c8?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/b1dd401f-cb56-4f47-a7fd-98a959e617c8?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/b1dd401f-cb56-4f47-a7fd-98a959e617c8?feedback_type=other)</sup>
Author
Owner

@CyanMystery commented on GitHub (May 29, 2025):

解决了吗

@CyanMystery commented on GitHub (May 29, 2025): 解决了吗
Author
Owner

@chuangzhidan commented on GitHub (May 30, 2025):

Self Checks

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

Dify version

1.1.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

After publishing a workflow as a tool, the workflow can be streamed out normally, but after the workflow is published as a tool, it is called by the agent, and the problem is entered in the agent, and when the agent calls the tool, there is no way to stream the output, resulting in a long wait for the result.

✔️ Expected Behavior

When an agent invokes a tool published by a workflow, the tool can also stream output

Actual Behavior

When an agent invokes a tool published by a workflow, the tool does not have streaming output and needs to wait a long time before returning the result

为啥我给了工具(marketplace选的),agent看不到

Image

@chuangzhidan commented on GitHub (May 30, 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.1.3 > > ### Cloud or Self Hosted > Self Hosted (Docker) > > ### Steps to reproduce > After publishing a workflow as a tool, the workflow can be streamed out normally, but after the workflow is published as a tool, it is called by the agent, and the problem is entered in the agent, and when the agent calls the tool, there is no way to stream the output, resulting in a long wait for the result. > > ### ✔️ Expected Behavior > When an agent invokes a tool published by a workflow, the tool can also stream output > > ### ❌ Actual Behavior > When an agent invokes a tool published by a workflow, the tool does not have streaming output and needs to wait a long time before returning the result 为啥我给了工具(marketplace选的),agent看不到 ![Image](https://github.com/user-attachments/assets/ae29b3bb-537c-4cb3-984f-f3df686d4209)
Author
Owner

@dosubot[bot] commented on GitHub (Aug 29, 2025):

Hi, @guqing1315. I'm Dosu, and I'm helping the Dify team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported that in Dify v1.1.3 self-hosted via Docker, tools called by an agent from a published workflow do not stream output, causing long waits.
  • You expect streaming output similar to normal workflow executions.
  • I suggested using the workflow interface's invoke method with response_mode set to "streaming" as a potential workaround.
  • No further updates or maintainer responses have been provided since then.

Next Steps:

  • Please let me know if this issue is still relevant with the latest version of Dify by commenting here to keep the discussion open.
  • Otherwise, this issue will be automatically closed in 15 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Aug 29, 2025): Hi, @guqing1315. I'm [Dosu](https://dosu.dev), and I'm helping the Dify team manage their backlog and am marking this issue as stale. **Issue Summary:** - You reported that in Dify v1.1.3 self-hosted via Docker, tools called by an agent from a published workflow do not stream output, causing long waits. - You expect streaming output similar to normal workflow executions. - I suggested using the workflow interface's `invoke` method with `response_mode` set to "streaming" as a potential workaround. - No further updates or maintainer responses have been provided since then. **Next Steps:** - Please let me know if this issue is still relevant with the latest version of Dify by commenting here to keep the discussion open. - Otherwise, this issue will be automatically closed in 15 days. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#13721