Hey everyone,
What would be the best way to reach the maintainers/reviewers for review on the PR?
Discord/community/forum suggestions would be really helpful.
I’ve been working on adding an IBM Db2 Vector Search Tool integration for CrewAI tools to enable semantic/vector similarity search workflows using IBM Db2 native vector capabilities.
The implementation is currently aligned with the existing CrewAI vector search tool patterns and follows a similar structure to tools like the Qdrant Vector Search Tool.
Current features include:
vector similarity search
configurable distance metrics
configurable embedding model support
standardized JSON retrieval responses
validation and safer query handling
runtime dependency loading
I’ve also completed end-to-end local testing for:
IBM Db2 connection flow
embedding generation
vector similarity search execution
retrieval response handling
Issue:
opened 05:29AM - 26 May 26 UTC
feature-request
### Feature Area
Integration with external tools
### Is your feature request r… elated to an existing bug? Please link it here.
NA
### Describe the solution you'd like
I would like to add a Db2 Vector Search Tool for CrewAI tools to enable semantic/vector similarity search workflows using Db2 native vector capabilities.
The tool would support:
- vector similarity search
- configurable distance metrics
- metadata filtering
- configurable embedding models
- optional custom embedding functions
- standardized JSON retrieval responses
The implementation would follow the existing CrewAI tools architecture and provide a consistent developer experience for retrieval workflows using Db2 as a vector store.
### Describe alternatives you've considered
Currently, users need to implement custom Db2 retrieval logic manually outside the CrewAI tools ecosystem.
Adding native Db2 vector search support would simplify integration and provide a more standardized retrieval workflow experience.
### Additional context
I have already started working on an initial implementation and opened a draft PR for early feedback and review:
https://github.com/crewAIInc/crewAI/pull/5885
### Willingness to Contribute
Yes, I'd be happy to submit a pull request.
PR:
main ← PawanThakurIBM:feat/db2-search-tool
opened 09:18AM - 21 May 26 UTC
Closes #5925
# Overview
This PR introduces a Db2 Vector Search Tool for Cr… ewAI tools, enabling semantic/vector similarity search using Db2 native vector capabilities.
The implementation follows existing CrewAI tools architecture patterns to maintain consistency, extensibility, and maintainability across vector search integrations.
---
# Components Added
## DB2VectorSearchTool
Main CrewAI tool implementation providing:
- vector similarity search
- configurable distance metrics
- configurable embedding model support
- standardized JSON response formatting
- runtime dependency loading
## DB2Config
Configuration model for:
- Db2 connection handling
- retrieval configuration
- embedding configuration
- distance metric configuration
## DB2ToolSchema
Pydantic-based input schema for:
- query validation
- metadata filtering parameters
- runtime input validation
---
# Features
## Vector Search Support
Provides semantic/vector similarity retrieval using Db2 native vector functionality with:
- configurable distance metrics
- top-k retrieval support
## Flexible Embedding Support
Supports:
- OpenAI embedding generation
- configurable embedding models
- optional custom embedding functions
## Validation & Security
Added validation and sanitization support for:
- Db2 identifiers
- distance metrics
- retrieval configuration
- input validation
- safer query construction
## Connection Lifecycle Management
Added support for:
- Db2 connection setup
- cursor initialization
- safe cleanup/disconnection
- runtime connection handling
## Serialization Handling
Implemented standardized JSON serialization support for Db2-specific response types including:
- Decimal
- datetime
- binary payloads
---
# Current Scope
This implementation currently focuses on:
- semantic retrieval
- vector similarity search
- Db2 integration
The following are currently out of scope:
- ingestion pipelines
- document chunking workflows
- hybrid retrieval
- async support
---
# Testing
Completed end-to-end local testing for:
- Db2 connection flow
- embedding generation
- vector similarity search execution
- retrieval response handling
---
# Documentation
Added documentation covering:
- installation and setup
- configuration options
- semantic retrieval workflows
- custom embedding support
- filtering support
- usage examples
## Summary by CodeRabbit
* **New Features**
* DB2 Vector Search Tool: semantic vector search against DB2 with OpenAI or custom embeddings, selectable distance metrics, result shaping, and optional metadata filtering.
* **Breaking Changes**
* DirectoryReadTool is no longer publicly exported from the tools package.
* **Documentation**
* Added user docs and README covering installation, configuration, examples, environment variables, security considerations, and a full semantic search workflow.
[](https://app.coderabbit.ai/change-stack/crewAIInc/crewAI/pull/5885?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)
Would appreciate feedback/review from the community.
Thanks!