Skip to content

feat: add Bedrock Managed Knowledge Base support across samples - #285

Open
PVidyadhar wants to merge 1 commit into
strands-agents:mainfrom
PVidyadhar:bmkb-managed-kb-support
Open

PVidyadhar wants to merge 1 commit into
strands-agents:mainfrom
PVidyadhar:bmkb-managed-kb-support

Conversation

@PVidyadhar

Copy link
Copy Markdown

Issue #, if available:

N/A — new feature addition for AWS Bedrock Managed Knowledge Base GA launch.

Description of changes:

Added Bedrock Managed Knowledge Base support across multiple samples in the repository.

Changes:

  • Finance advisor: KB creation supports MANAGED type (default: VECTOR), retrieval uses correct config
  • Lambda error analysis: CDK stack creates MANAGED KB when knowledgeBaseType=MANAGED context provided
  • Agentic RAG tool: supports managedSearchConfiguration + AgenticRetrieveStream
  • Learn tutorial: KB setup prereqs support MANAGED type
  • Updated README with managed KB section and doc links
  • Added BEDROCK_MANAGED_KB.md design doc
  • Existing VECTOR samples unchanged

Testing:

  • Lambda error analysis CDK: ✅ CREATE_COMPLETE (KB type MANAGED, ACTIVE status)
  • Agentic RAG tool: ✅ AgenticRetrieveStream returns results from managed KB
  • Finance advisor: ✅ KB creation with VECTOR default, MANAGED via --kb-type MANAGED
  • All existing VECTOR paths: ✅ Unchanged

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@PVidyadhar
PVidyadhar force-pushed the bmkb-managed-kb-support branch from 1708b3c to 60f275c Compare July 11, 2026 00:26
@manoj-selvakumar5 manoj-selvakumar5 self-assigned this Jul 13, 2026
@github-actions

github-actions Bot commented Jul 13, 2026 •

Copy link
Copy Markdown

Latest scan for commit: 9a69969 | Updated: 2026-07-26 03:04:55 UTC

✅ Security Scan Report (PR Files Only)

Scanned Files

  • BEDROCK_MANAGED_KB.md
  • README.md
  • python/01-learn/07-aws-services/prereqs/knowledge_base.py
  • python/04-industry-use-cases/finance/genai-powered-financial-advisor-tools/application/chat.py
  • python/04-industry-use-cases/finance/genai-powered-financial-advisor-tools/application/prerequisites/bedrock_knowledge_base_setup.py
  • python/04-industry-use-cases/finance/genai-powered-financial-advisor-tools/application/prerequisites/prereqs_config.yaml
  • python/04-industry-use-cases/software-engineering/lambda-error-analysis-agent/cdk-app.ts
  • python/04-industry-use-cases/software-engineering/lambda-error-analysis-agent/cdk/constant.ts
  • python/04-industry-use-cases/software-engineering/lambda-error-analysis-agent/cdk/lambda/error-analyzer-agent/agent.py
  • python/04-industry-use-cases/software-engineering/lambda-error-analysis-agent/cdk/stacks/lambda-error-analysis-agent-stack.ts
  • ... and 1 more files

Security Scan Results

Critical High Medium Low Info
0 0 0 0 0

Threshold: High

No security issues detected in your changes. Great job!

This scan only covers files changed in this PR.

@PVidyadhar
PVidyadhar marked this pull request as ready for review July 13, 2026 17:52
@PVidyadhar
PVidyadhar force-pushed the bmkb-managed-kb-support branch 2 times, most recently from 087f0cb to 98230ae Compare July 15, 2026 07:47
- Finance advisor: KB creation supports MANAGED type (default: VECTOR), retrieval uses correct config
- Lambda error analysis: CDK stack creates MANAGED KB when knowledgeBaseType=MANAGED context provided
- Agentic RAG tool: supports managedSearchConfiguration + AgenticRetrieveStream
- Learn tutorial: KB setup prereqs support MANAGED type
- Updated README with managed KB section and doc links
- Added BEDROCK_MANAGED_KB.md design doc
- Existing VECTOR samples unchanged
@PVidyadhar
PVidyadhar force-pushed the bmkb-managed-kb-support branch from 98230ae to 9a69969 Compare July 16, 2026 01:02
@manoj-selvakumar5

Copy link
Copy Markdown
Collaborator

@PVidyadhar Hi, could you please test all the changes to make sure its working? For example, the retrieve tool doesn't actually pick up the MANAGED setting. Even with KNOWLEDGE_BASE_TYPE=MANAGED, the tool always sends vectorSearchConfiguration, and Bedrock rejects that against a managed KB.

@PVidyadhar

Copy link
Copy Markdown
Author

@PVidyadhar Hi, could you please test all the changes to make sure its working? For example, the retrieve tool doesn't actually pick up the MANAGED setting. Even with KNOWLEDGE_BASE_TYPE=MANAGED, the tool always sends vectorSearchConfiguration, and Bedrock rejects that against a managed KB.

@manoj-selvakumar5 Thanks for catching this! You're right — strands_tools.retrieve doesn't support KNOWLEDGE_BASE_TYPE=MANAGED and always sends
vectorSearchConfiguration.

The Strands team closed our PR to the tools repo (#534) and recommends using the built-in memory solution instead
(https://strandsagents.com/docs/user-guide/concepts/memory/bedrock-knowledge-base/. However, I don't see that pattern used in this repo yet.

For the samples that use strands_tools.retrieve (lambda error analysis + finance advisor), I can fix them by using direct boto3 with
managedSearchConfiguration when KNOWLEDGE_BASE_TYPE=MANAGED. The agentic RAG sample already works correctly this way.

Would that approach work, or would you prefer these samples migrate to the built-in memory pattern?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants