Tools
Bedrock Knowledge Base Retriever
Retrieve information from Amazon Bedrock Knowledge Bases using natural language queries
BedrockKBRetrieverTool
The BedrockKBRetrieverTool
enables CrewAI agents to retrieve information from Amazon Bedrock Knowledge Bases using natural language queries.
Installation
Requirements
- AWS credentials configured (either through environment variables or AWS CLI)
boto3
andpython-dotenv
packages- Access to Amazon Bedrock Knowledge Base
Usage
Here’s how to use the tool with a CrewAI agent:
Tool Arguments
Argument | Type | Required | Default | Description |
---|---|---|---|---|
knowledge_base_id | str | Yes | None | The unique identifier of the knowledge base (0-10 alphanumeric characters) |
number_of_results | int | No | 5 | Maximum number of results to return |
retrieval_configuration | dict | No | None | Custom configurations for the knowledge base query |
guardrail_configuration | dict | No | None | Content filtering settings |
next_token | str | No | None | Token for pagination |
Environment Variables
Response Format
The tool returns results in JSON format:
Advanced Usage
Custom Retrieval Configuration
Supported Data Sources
- Amazon S3
- Confluence
- Salesforce
- SharePoint
- Web pages
- Custom document locations
- Amazon Kendra
- SQL databases
Use Cases
Enterprise Knowledge Integration
- Enable CrewAI agents to access your organization’s proprietary knowledge without exposing sensitive data
- Allow agents to make decisions based on your company’s specific policies, procedures, and documentation
- Create agents that can answer questions based on your internal documentation while maintaining data security
Specialized Domain Knowledge
- Connect CrewAI agents to domain-specific knowledge bases (legal, medical, technical) without retraining models
- Leverage existing knowledge repositories that are already maintained in your AWS environment
- Combine CrewAI’s reasoning with domain-specific information from your knowledge bases
Data-Driven Decision Making
- Ground CrewAI agent responses in your actual company data rather than general knowledge
- Ensure agents provide recommendations based on your specific business context and documentation
- Reduce hallucinations by retrieving factual information from your knowledge bases
Scalable Information Access
- Access terabytes of organizational knowledge without embedding it all into your models
- Dynamically query only the relevant information needed for specific tasks
- Leverage AWS’s scalable infrastructure to handle large knowledge bases efficiently
Compliance and Governance
- Ensure CrewAI agents provide responses that align with your company’s approved documentation
- Create auditable trails of information sources used by your agents
- Maintain control over what information sources your agents can access
Was this page helpful?