ImportError: cannot import name 'BaseTool' from 'crewai_tools'

from crewai_tools import BaseTool
ImportError Traceback (most recent call last)
Cell In[8], line 1
----> 1 from crewai_tools import BaseTool

ImportError: cannot import name ‘BaseTool’ from ‘crewai_tools’ (/home/xxx/nlpllm01/lib/python3.12/site-packages/crewai_tools/init.py)

I have crewai-tools 0.25.8

dir(crewai_tools)
[‘BraveSearchTool’,
‘BrowserbaseLoadTool’,
‘CSVSearchTool’,
‘CodeDocsSearchTool’,
‘CodeInterpreterTool’,
‘ComposioTool’,
…,
]
There seems to be no BaseTool in this version. can I manually add if I cannot upgrade the package?

I also checked under crewAI-tools/crewai_tools/tools at main · crewAIInc/crewAI-tools · GitHub but I could not find BaseTool

Regards,
Amit

Try importing tools this way instead:

from crewai.tools import BaseTool
1 Like

Thank you so much. It works!

1 Like

Glad it worked! Happy Crewing!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.