feat: Add Serpex multi-engine search tool integration #3796
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🚀 Add Serpex Multi-Engine Search Tool for CrewAI
Overview
This PR introduces the SerpexTool - a powerful multi-engine search tool that integrates seamlessly with CrewAI, providing access to 6 major search engines with automatic routing, time-based filtering, and structured JSON responses.
✨ Key Features
🔍 Multi-Engine Search Support
🎯 Smart Features
📁 Files Added/Modified
New Files
Modified Files
lib/crewai-tools/src/crewai_tools/tools/__init__.py- Added SerpexTool exportlib/crewai-tools/src/crewai_tools/__init__.py- Added SerpexTool import and export🧪 Testing
Test Coverage
Test Results
$ python -m pytest lib/crewai-tools/tests/tools/serpex_tool_test.py -v ======================== 10 passed in 0.89s ========================📖 Usage Examples
Basic Usage
Advanced Configuration
CrewAI Agent Integration
📊 Response Format
The tool returns structured JSON responses:
{ "query": "OpenAI GPT-4", "engines": ["google"], "metadata": { "number_of_results": 11, "response_time": 0.8, "credits_used": 1, "timestamp": "2025-10-26T10:30:00Z" }, "results": [ { "title": "GPT-4 | OpenAI", "url": "https://openai.com/index/gpt-4/", "snippet": "GPT-4 is the latest milestone in OpenAI's effort in scaling up deep learning...", "position": 1, "engine": "google", "published_date": null } ], "suggestions": [ "GPT-4 capabilities", "GPT-4 vs GPT-3.5", "GPT-4 API access" ] }🔄 API Configuration
Set your API key as an environment variable:
Or configure programmatically:
✅ Checklist
🎯 Impact
This integration significantly enhances CrewAI's capabilities by providing:
📝 Notes
📚 Documentation & Resources