Skip to main content

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 and python-dotenv packages
  • Access to Amazon Bedrock Knowledge Base

Usage

Here’s how to use the tool with a CrewAI agent:

Tool Arguments

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