Skip to content

.NET: Python: [Feature]: Amazon Bedrock managed Knowledge Base retrieval for agents #9786

Description

Problem

The Python Bedrock connector (agent-framework-bedrock) supports chat and embeddings, but there is no first-party way to ground an agent in an Amazon Bedrock managed Knowledge Base. Users who want RAG on Bedrock have to hand-write boto3 Retrieve / AgenticRetrieveStream calls and wire the results into a context provider or function tool themselves.

Use Case and Evidence

Teams building Bedrock-backed agents keep their documents in Bedrock managed Knowledge Bases (S3, web, Confluence, SharePoint and other connectors) and want the agent to answer from that content. Other agent frameworks already ship managed-KB retrieval integrations, for example langchain-aws (AmazonKnowledgeBasesRetriever and agentic_retrieve). Agent Framework has the extension points (ContextProvider, function tools) but no Bedrock KB implementation, so each user reimplements the same request shape, response normalization, and IAM setup.

Desired Outcome

A user can point an agent at a Bedrock managed Knowledge Base and either have relevant passages injected as context automatically, or give the model a search tool it can call on demand, with region and credentials resolved the same way as the existing Bedrock chat client.

Alternatives Considered

  • Hand-written boto3 calls in a custom ContextProvider or function tool: works, but every user repeats the same logic and the agentic-retrieval request and response shapes are easy to get wrong.
  • Using another framework's retriever alongside Agent Framework: adds a dependency and does not integrate with ContextProvider / SessionContext.

Proposed Direction

A single public BedrockKnowledgeBaseProvider (ContextProvider) in agent-framework-bedrock with mode="inject" | "tool" | "both"; agentic retrieval (AgenticRetrieveStream) with fallback to standard Retrieve; retrieved images passed to the model as image Content and audio/video as their transcription/summary text; settings resolved via BEDROCK_*. This direction was discussed with Eduard van Valkenburg (@eavanvalkenburg) in the review of #8173; an implementation is ready in #9782.

Scope and Non-Goals

In scope: Python, retrieval from Bedrock managed Knowledge Bases (read-only). Non-goals: creating or ingesting into Knowledge Bases, .NET support, changes to the chat client or the function-calling loop.

Language

Python

Contribution Intent

I am willing to implement this

Acknowledgements

  • I searched existing issues and did not find a duplicate. (Bedrock Agent #35 "Bedrock Agent" covers the Bedrock Agents service, not Knowledge Base retrieval.)
  • I will wait for explicit maintainer agreement before starting implementation of a non-trivial change.

Note on the second item: the implementation already exists. It started before the issue-first policy, in #7066 and #8173, and the design was revised following Eduard van Valkenburg (@eavanvalkenburg)'s review there. I'm filing this issue now so #9782 links to an agreed problem. I'm happy to change direction or scope based on maintainer feedback here before #9782 moves forward.

AI Assistance

This issue was drafted with an AI coding assistant. I reviewed it and take responsibility for its content.

Activity

  1. added
    .NETUsage: [Issues, PRs], Target: .Net
    pythonUsage: [Issues, PRs], Target: Python
    triageUsage: [Issues], Target: All issues that still need to be triaged
    on Oct 28, 2026
  2. changed the title [-]Python: [Feature]: Amazon Bedrock managed Knowledge Base retrieval for agents[/-] [+].NET: Python: [Feature]: Amazon Bedrock managed Knowledge Base retrieval for agents[/+] on Oct 28, 2026
  3. removed
    triageUsage: [Issues], Target: All issues that still need to be triaged
    on Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

.NETUsage: [Issues, PRs], Target: .NetagentsUsage: [Issues, PRs], Target: Single agentpythonUsage: [Issues, PRs], Target: Python

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions