crewAI: DuckDuckGo Search not working anymore? Not supported?

I updated to the latest crewai release 0.19.0 and DuckDuckGo Search does not working anymore. Is this not supported anymore? Here is the error:

`Action: duckduckgo_search Action Input: {“q”: “AIi news latest not older than 1 day”}

I encountered an error while trying to use the tool. This was the error: DuckDuckGoSearchRun._run() got an unexpected keyword argument ‘q’. Tool duckduckgo_search accepts there inputs: A wrapper around DuckDuckGo Search. Useful for when you need to answer questions about current events. Input should be a search query. `

About this issue

  • Original URL
  • State: closed
  • Created 4 months ago
  • Comments: 18 (1 by maintainers)

Most upvoted comments

Hello guys, I was facing absolutely the same problem but after the solution suggested by João seems it finally worked

Libraries version:
crewai 0.19.0
crewai-tools 0.0.15
duckduckgo_search 5.0

The changed part: image

Output: image

Hi, I have the same issue with error msg --> action duck_search doesn’t exist

It seems to be something around how the duckduckgo tool specificaly was constructed, if you wrap it as a crewAI tool it shoudl work: python from crewai_tools import tool @tool('DuckDuckGoSearch') def search(search_query: str): """Search the web for information on a given topic""" return DuckDuckGoSearchRun().run(search_query) agent = Agent( #... tools=[search], #... ) – João Moura @joaomdmoura http://twitter.com/joaomdmoura Em ter., 5 de mar. de 2024 às 13:18, marioz78 @.> escreveu: Hi, I have the same issue with error msg --> action duck_search doesn’t exist — Reply to this email directly, view it on GitHub <#316 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFC3N5Q27IV25FAZSUKKCDYWXV3TAVCNFSM6AAAAABEGYI526VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZZGE2DEOBVGU . You are receiving this because you are subscribed to this thread.Message ID: @.>

wrapping it as suggested got the same errore --> Action ‘DuckDuckGoSearch(‘latest advancements in AI 2024’)’ don’t exist, these are the only available Actions: DuckDuckGoSearch: DuckDuckGoSearch(search_query: ‘string’) - Search the web for information on a given topic

Just a suggestion. I isolated/debug the issue by creating a test.py with only the minimum code. First to use the tool by itself, nothing else, and see if it works. And so on…

And I figure out that I could not use the old way:

search_tool = searchduck(source_material)

but invoking the searchduck(source_material) directly inside the Agent declaration. Not sure if this is your case but it worked for me.