Tavily component could not work in agent of workflow #383

Closed
opened 2026-02-16 10:19:13 -05:00 by yindo · 1 comment
Owner

Originally created by @nadazero on GitHub (Jun 18, 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.4.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Image refer to this image, when I use Tavily component in agent of workflow, it report error message "tool_response": "tool invoke error: 'str' object has no attribute 'type'"

I want to know whether it is a bug? agent tool could not work well to to the Tavily API?

✔️ Expected Behavior

Tavily component could work well in agent of workflow

Actual Behavior

No response

Originally created by @nadazero on GitHub (Jun 18, 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.4.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce ![Image](https://github.com/user-attachments/assets/517c46d9-1568-408d-ae5c-401b073642b1) refer to this image, when I use Tavily component in agent of workflow, it report error message "tool_response": "tool invoke error: 'str' object has no attribute 'type'" I want to know whether it is a bug? agent tool could not work well to to the Tavily API? ### ✔️ Expected Behavior Tavily component could work well in agent of workflow ### ❌ Actual Behavior _No response_
yindo closed this issue 2026-02-16 10:19:13 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jun 18, 2025):

This error is caused by a mismatch between how the Tavily tool is registered or configured and what the Dify agent workflow expects. Specifically, the workflow expects tool parameters to be objects with a .type attribute (ToolParameter objects), but in your case, it’s receiving a plain string or dictionary instead, which leads to the "'str' object has no attribute 'type'" error during invocation. This is a known integration pitfall for external or API tools like Tavily, not a general flaw in agent tool support.

To resolve this, check that the Tavily tool’s parameters are defined as ToolParameter objects, not just plain strings or dicts, in your configuration or registration. If you’re using environment variables or a UI/API to register the tool, make sure the parameter schema matches what Dify expects internally. After making changes, restart your plugin daemon and related containers to ensure the new configuration is loaded.

If you’re still seeing the error, it may be worth double-checking your DIFY_INNER_API_KEY and token handling, as some tool invocation errors in recent versions have also been linked to token/config mismatches. More details and similar issues can be found in the Dify repo here and here.

If you need more specific guidance on how to define the parameters, let me know how you’re registering/configuring the Tavily tool and I can help you check the schema.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (Jun 18, 2025): <!-- Answer --> This error is caused by a mismatch between how the Tavily tool is registered or configured and what the Dify agent workflow expects. Specifically, the workflow expects tool parameters to be objects with a .type attribute (ToolParameter objects), but in your case, it’s receiving a plain string or dictionary instead, which leads to the "'str' object has no attribute 'type'" error during invocation. This is a known integration pitfall for external or API tools like Tavily, not a general flaw in agent tool support. To resolve this, check that the Tavily tool’s parameters are defined as ToolParameter objects, not just plain strings or dicts, in your configuration or registration. If you’re using environment variables or a UI/API to register the tool, make sure the parameter schema matches what Dify expects internally. After making changes, restart your plugin daemon and related containers to ensure the new configuration is loaded. If you’re still seeing the error, it may be worth double-checking your DIFY_INNER_API_KEY and token handling, as some tool invocation errors in recent versions have also been linked to token/config mismatches. More details and similar issues can be found in the Dify repo [here](https://github.com/langgenius/dify/issues/20777) and [here](https://github.com/langgenius/dify/blob/dbae5b0564df3874c982594a5b706d5e609f675f/api/core/tools/__base/tool.py). If you need more specific guidance on how to define the parameters, let me know how you’re registering/configuring the Tavily tool and I can help you check the schema. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/ad51c58c-af5e-4bf1-9dd6-928e25da653b?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/ad51c58c-af5e-4bf1-9dd6-928e25da653b?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/ad51c58c-af5e-4bf1-9dd6-928e25da653b?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/ad51c58c-af5e-4bf1-9dd6-928e25da653b?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/ad51c58c-af5e-4bf1-9dd6-928e25da653b?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/ad51c58c-af5e-4bf1-9dd6-928e25da653b?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/ad51c58c-af5e-4bf1-9dd6-928e25da653b?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/21184)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#383