Some issues regarding the use of intelligent agents in workflows #12637

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

Originally created by @1523826455647 on GitHub (Apr 7, 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

v1.1.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

I encountered some problems using intelligent agents in the workflow, and their output was very brief or interrupted halfway, making it easy to output 'I am thinking about how to help you'.
##Reproduction method
this is a picture about how i build my workflow.
Image
Regarding the prompt words for the agent, I am using Chinese. For ease of reading, I will provide both the Chinese and English versions of the prompt words here

##introduce
Let me briefly introduce my task here. Firstly, I will provide the agent with a website address, which needs to continuously dig deeper into the information and URL addresses on the website, using multiple crawls until it finds the information data I need
###Chinese###
网页抓取分析助手
我将给你一个网页url地址,你需要从这个地址中,抓取并查询我所需要的信息和数据。
这个信息和数据可能在该网页标签中,即从一个网页跳转到另一个网页你才能找得到,因此请严格按照一下操作完成任务。
##步骤
步骤1:从我最初给的url地址中执行网页爬取,分析爬取的信息。
步骤2:查看这个信息是否有我所需要的信息数据,如果有,请直接回答,如果没有,继续执行步骤三。
步骤3:深入剖析爬取的网页,从网页爬取的信息中捕获一些url地址及url地址所对应的网页标题。
步骤4:思考一下从哪个网页标签对应的url地址能够获取我所需要的数据,最后选择适合的网页标题对应的url地址,再次执行网页抓取。
重复执行2-4步骤,直到获得我所需要的信息。
##注意事项
-如果始终没有抓取所需信息数据,则返回:该网站无法提供所需数据,请再次提供一个网站。
-如果选择适合的网页标题对应的url地址是多个的,请逐一利用网络抓取工具进行爬取
-如果爬取过程中遇到图片的url地址,你可以借助工具对图片进行分析提取
-最终形成一份数据报告,只需将所需要的数据进行整理即可。
##返回结果
-如果爬取到合适的数据,则返回数据报告
-如果未能从该网页中获得所需要的数据,则返回:该网站无法提供所需数据,请再次提供一个网站。
###english###
Web crawling analysis assistant
I will give you a webpage URL address, and you need to retrieve and query the information and data I need from this address.
This information and data may be located in the webpage tag, which means that you can only find them by jumping from one webpage to another. Therefore, please strictly follow the following steps to complete the task.
##Steps
Step 1: Perform web crawling from the URL address I initially provided and analyze the crawled information.
Step 2: Check if this information contains the information data I need. If so, please answer directly. If not, continue with Step 3.
Step 3: Thoroughly analyze the crawled web pages and capture some URL addresses and corresponding web page titles from the information crawled from the web pages.
Step 4: Think about which webpage tag corresponds to the URL address that can obtain the data I need, and finally choose the URL address corresponding to the appropriate webpage title to perform webpage crawling again.
Repeat steps 2-4 until I obtain the information I need.
##Precautions
-If the required information data is not captured, return: The website cannot provide the required data, please provide another website.
-If there are multiple URL addresses corresponding to the appropriate webpage title, please use web scraping tools to crawl them one by one
-If you encounter the URL address of an image during the crawling process, you can use tools to analyze and extract the image
-To ultimately form a data report, simply organize the necessary data.
##Return result
-If suitable data is crawled, return a data report
-If the required data cannot be obtained from the webpage, return: The website cannot provide the required data, please provide another website.
##tool use
I used firecrack as a web crawling tool in the agent,only a tool.I have also tested other agent strategies regarding the choice of agent strategy, and this issue also occurs.
![Image](https://github.com/user-attachments/assets/6cb40559-ed94-4cd4-8d9d-70ad8ccebab4)
##llm model
I have used deepseek-v3 and qwen max as large language models, and both of them have encountered this issue. Therefore, I believe this is not a problem caused by the language model.
##Agent tracking
In the agent tracking, it used two rounds. In the first round, it did indeed use firecrack and successfully captured the data. However, in the second round, it directly outputs "I am thinking about how to help you", as shown in pic2.
![Image](https://github.com/user-attachments/assets/b5b777c9-9a52-4a8e-b2c4-77379dc4ad22)
##input
I provided two input parameters: URL address and requirement. URL address is the address for the agent to crawl web pages, and requirement is what data I need
##question

I also tested this prompt in a non workflow agent, and it ran successfully without this issue.

✔️ Expected Behavior

1.Resolve this issue
2.I think it's possible to use the agent directly built by dify in the workflow instead of rebuilding the agent in the workflow, and the agent built in the workflow cannot use the knowledge base, while the one built externally can

Actual Behavior

No response

Originally created by @1523826455647 on GitHub (Apr 7, 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 v1.1.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce I encountered some problems using intelligent agents in the workflow, and their output was very brief or interrupted halfway, making it easy to output 'I am thinking about how to help you'. ##Reproduction method this is a picture about how i build my workflow. ![Image](https://github.com/user-attachments/assets/6c69c853-ae7c-447f-9299-db0a00233156) Regarding the prompt words for the agent, I am using Chinese. For ease of reading, I will provide both the Chinese and English versions of the prompt words here ``` ##introduce Let me briefly introduce my task here. Firstly, I will provide the agent with a website address, which needs to continuously dig deeper into the information and URL addresses on the website, using multiple crawls until it finds the information data I need ###Chinese### 网页抓取分析助手 我将给你一个网页url地址,你需要从这个地址中,抓取并查询我所需要的信息和数据。 这个信息和数据可能在该网页标签中,即从一个网页跳转到另一个网页你才能找得到,因此请严格按照一下操作完成任务。 ##步骤 步骤1:从我最初给的url地址中执行网页爬取,分析爬取的信息。 步骤2:查看这个信息是否有我所需要的信息数据,如果有,请直接回答,如果没有,继续执行步骤三。 步骤3:深入剖析爬取的网页,从网页爬取的信息中捕获一些url地址及url地址所对应的网页标题。 步骤4:思考一下从哪个网页标签对应的url地址能够获取我所需要的数据,最后选择适合的网页标题对应的url地址,再次执行网页抓取。 重复执行2-4步骤,直到获得我所需要的信息。 ##注意事项 -如果始终没有抓取所需信息数据,则返回:该网站无法提供所需数据,请再次提供一个网站。 -如果选择适合的网页标题对应的url地址是多个的,请逐一利用网络抓取工具进行爬取 -如果爬取过程中遇到图片的url地址,你可以借助工具对图片进行分析提取 -最终形成一份数据报告,只需将所需要的数据进行整理即可。 ##返回结果 -如果爬取到合适的数据,则返回数据报告 -如果未能从该网页中获得所需要的数据,则返回:该网站无法提供所需数据,请再次提供一个网站。 ###english### Web crawling analysis assistant I will give you a webpage URL address, and you need to retrieve and query the information and data I need from this address. This information and data may be located in the webpage tag, which means that you can only find them by jumping from one webpage to another. Therefore, please strictly follow the following steps to complete the task. ##Steps Step 1: Perform web crawling from the URL address I initially provided and analyze the crawled information. Step 2: Check if this information contains the information data I need. If so, please answer directly. If not, continue with Step 3. Step 3: Thoroughly analyze the crawled web pages and capture some URL addresses and corresponding web page titles from the information crawled from the web pages. Step 4: Think about which webpage tag corresponds to the URL address that can obtain the data I need, and finally choose the URL address corresponding to the appropriate webpage title to perform webpage crawling again. Repeat steps 2-4 until I obtain the information I need. ##Precautions -If the required information data is not captured, return: The website cannot provide the required data, please provide another website. -If there are multiple URL addresses corresponding to the appropriate webpage title, please use web scraping tools to crawl them one by one -If you encounter the URL address of an image during the crawling process, you can use tools to analyze and extract the image -To ultimately form a data report, simply organize the necessary data. ##Return result -If suitable data is crawled, return a data report -If the required data cannot be obtained from the webpage, return: The website cannot provide the required data, please provide another website. ##tool use I used firecrack as a web crawling tool in the agent,only a tool.I have also tested other agent strategies regarding the choice of agent strategy, and this issue also occurs. ![Image](https://github.com/user-attachments/assets/6cb40559-ed94-4cd4-8d9d-70ad8ccebab4) ##llm model I have used deepseek-v3 and qwen max as large language models, and both of them have encountered this issue. Therefore, I believe this is not a problem caused by the language model. ##Agent tracking In the agent tracking, it used two rounds. In the first round, it did indeed use firecrack and successfully captured the data. However, in the second round, it directly outputs "I am thinking about how to help you", as shown in pic2. ![Image](https://github.com/user-attachments/assets/b5b777c9-9a52-4a8e-b2c4-77379dc4ad22) ##input I provided two input parameters: URL address and requirement. URL address is the address for the agent to crawl web pages, and requirement is what data I need ##question ``` I also tested this prompt in a non workflow agent, and it ran successfully without this issue. ### ✔️ Expected Behavior 1.Resolve this issue 2.I think it's possible to use the agent directly built by dify in the workflow instead of rebuilding the agent in the workflow, and the agent built in the workflow cannot use the knowledge base, while the one built externally can ### ❌ Actual Behavior _No response_
yindo closed this issue 2026-02-21 19:08:18 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Apr 7, 2025):

To address the issue of intelligent agents in workflows producing brief or interrupted outputs, you should configure the max_tokens parameter when calling the models. This configuration is crucial to ensure complete text output, as the token limit of the AI model can affect the output. Make sure that the selected model's token limit is sufficient for your use case [1].

Additionally, the ReAct strategy, which you are using, involves alternating between reasoning and acting, which may require multiple iterations to solve a problem. This could potentially increase execution time and lead to incomplete outputs if not properly configured [2].

If the problem persists, consider reviewing the configuration of your tools and ensuring that the external tools, like FIRECRAWL, are properly set up and integrated within the workflow. This includes checking the API key and other necessary configurations [3][4].

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 (Apr 7, 2025): <!-- Answer --> To address the issue of intelligent agents in workflows producing brief or interrupted outputs, you should configure the `max_tokens` parameter when calling the models. This configuration is crucial to ensure complete text output, as the token limit of the AI model can affect the output. Make sure that the selected model's token limit is sufficient for your use case <sup>[[1]](https://github.com/langgenius/dify/issues/16545)</sup>. Additionally, the ReAct strategy, which you are using, involves alternating between reasoning and acting, which may require multiple iterations to solve a problem. This could potentially increase execution time and lead to incomplete outputs if not properly configured <sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/zh_CN/guides/workflow/node/agent.md)</sup>. If the problem persists, consider reviewing the configuration of your tools and ensuring that the external tools, like FIRECRAWL, are properly set up and integrated within the workflow. This includes checking the API key and other necessary configurations <sup>[[3]](https://github.com/langgenius/dify/blob/main/web/i18n/ja-JP/dataset-creation.ts)</sup><sup>[[4]](https://github.com/langgenius/dify/blob/main/web/i18n/it-IT/dataset-creation.ts)</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/f1f3fda9-66eb-4481-aab7-eececfffb902?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/f1f3fda9-66eb-4481-aab7-eececfffb902?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/f1f3fda9-66eb-4481-aab7-eececfffb902?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/f1f3fda9-66eb-4481-aab7-eececfffb902?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/f1f3fda9-66eb-4481-aab7-eececfffb902?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/f1f3fda9-66eb-4481-aab7-eececfffb902?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/f1f3fda9-66eb-4481-aab7-eececfffb902?feedback_type=other)</sup>
Author
Owner

@crazywoola commented on GitHub (Apr 7, 2025):

Try to use different strategies. I noticed you have used a agent strategy with MCP which we do not have the ability in normal agent application.

@crazywoola commented on GitHub (Apr 7, 2025): Try to use different strategies. I noticed you have used a agent strategy with MCP which we do not have the ability in normal agent application.
Author
Owner

@1523826455647 commented on GitHub (Apr 7, 2025):

尝试使用不同的策略。我注意到您在 MCP 中使用了代理策略,而我们在普通代理应用程序中没有此功能。

I have also used other agent strategies, which can also cause this problem.look at pic1.

Image

@1523826455647 commented on GitHub (Apr 7, 2025): > 尝试使用不同的策略。我注意到您在 MCP 中使用了代理策略,而我们在普通代理应用程序中没有此功能。 I have also used other agent strategies, which can also cause this problem.look at pic1. ![Image](https://github.com/user-attachments/assets/6b5a6fec-63ac-4ec1-899a-a7af3b9d0be5)
Author
Owner

@kanye1025 commented on GitHub (Apr 16, 2025):

你的问题解决了吗

@kanye1025 commented on GitHub (Apr 16, 2025): 你的问题解决了吗
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#12637