Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
5d81286
feat: add Amazon Bedrock Knowledge Base tool and context provider
PVidyadhar Jul 11, 2026
2f9edd2
Merge branch 'main' into bmkb-managed-kb-support
PVidyadhar Aug 5, 2026
3d1ae25
fix: inject KB context as instructions to avoid consecutive user roles
PVidyadhar Sep 9, 2026
9f8ea75
fix: address Copilot review on #8173
PVidyadhar Sep 9, 2026
dfd0d2f
fix: correct agentic result parsing + scope user-message coalescing
PVidyadhar Sep 9, 2026
8da7c32
fix: disable response generation in agentic retrieve
PVidyadhar Sep 9, 2026
db70b32
fix: address 4th Copilot review + eavanvalkenburg feedback on #8173
PVidyadhar Sep 11, 2026
a639086
samples: move Bedrock KB samples to canonical provider tree
PVidyadhar Sep 11, 2026
46fb12e
samples: read BEDROCK_REGION for KB client region
PVidyadhar Sep 11, 2026
ef6bbb0
test: fix stale coalescing comment in KB provider test
PVidyadhar Sep 11, 2026
3af22d9
Python: fix bedrock KB CI — pyright, pyupgrade, and test typing
PVidyadhar Sep 18, 2026
376c616
Python: address bedrock KB review feedback (IAM, SQL ROW, sample output)
PVidyadhar Sep 18, 2026
37d1d52
Python: consolidate standard Retrieve behind _retrieve_standard_passages
PVidyadhar Sep 18, 2026
773cece
Python: apply ruff format to bedrock KB (single-line comprehensions)
PVidyadhar Sep 18, 2026
af64bdd
Python: address Copilot re-review (IMAGE content, security wording, s…
PVidyadhar Sep 18, 2026
6900e99
Python: log KB context-provider retrieval failure at WARNING not DEBUG
PVidyadhar Sep 18, 2026
736d27e
Python: fix BedrockChatClient usage in KB examples
PVidyadhar Sep 18, 2026
dafe97c
Python: handle AUDIO/VIDEO retrieval content, not just IMAGE
PVidyadhar Sep 18, 2026
60b3361
Python: align KB client with Bedrock settings/session; drop file-leve…
PVidyadhar Sep 18, 2026
f5588c2
Python: address KB review — public settings, inline tool schema, drop…
PVidyadhar Sep 25, 2026
5defe1d
Python: unify KB into one public BedrockKnowledgeBaseProvider with mo…
PVidyadhar Sep 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions python/packages/bedrock/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Integration with AWS Bedrock for LLM inference.
- **`BedrockChatOptions`** - Options TypedDict for Bedrock-specific parameters
- **`BedrockGuardrailConfig`** - Configuration for Bedrock guardrails
- **`BedrockSettings`** - Pydantic settings for Bedrock configuration
- **`BedrockKnowledgeBaseProvider`** - The public entry point for using an Amazon Bedrock Knowledge Base with an agent. A single `ContextProvider` with a `mode`: `"inject"` (inject retrieved passages as context), `"tool"` (expose a KB search tool the model can call), or `"both"` (default). Uses agentic retrieval (query decomposition + managed reranking) with fallback to standard Retrieve, and injects image/audio/video passages as multi-modal `Content`.
- **`BedrockKnowledgeBaseSettings`** - Settings TypedDict for KB region/credentials resolution (`BEDROCK_*`)

## Usage

Expand Down
7 changes: 7 additions & 0 deletions python/packages/bedrock/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,10 @@ See the [Bedrock sample](../../samples/02-agents/providers/amazon/bedrock_chat_c
- Loads credentials from the `BEDROCK_*` environment variables
- Instantiates `BedrockChatClient`
- Sends a simple conversation turn and prints the response

### Knowledge Base Examples

For Amazon Bedrock managed Knowledge Base retrieval, see:

- [`bedrock_kb_tool.py`](../../samples/02-agents/providers/amazon/bedrock_kb_tool.py) — `BedrockKnowledgeBaseTool` as a `FunctionTool` the agent calls on demand.
- [`bedrock_kb_context_provider.py`](../../samples/02-agents/providers/amazon/bedrock_kb_context_provider.py) — `BedrockKnowledgeBaseProvider` as a `ContextProvider` that injects KB context automatically.
4 changes: 4 additions & 0 deletions python/packages/bedrock/agent_framework_bedrock/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

from ._chat_client import BedrockChatClient, BedrockChatOptions, BedrockGuardrailConfig, BedrockSettings
from ._embedding_client import BedrockEmbeddingClient, BedrockEmbeddingOptions, BedrockEmbeddingSettings
from ._knowledge_base import BedrockKnowledgeBaseSettings
from ._knowledge_base_provider import BedrockKnowledgeBaseProvider

try:
__version__ = importlib.metadata.version(__name__)
Expand All @@ -17,6 +19,8 @@
"BedrockEmbeddingOptions",
"BedrockEmbeddingSettings",
"BedrockGuardrailConfig",
"BedrockKnowledgeBaseProvider",
"BedrockKnowledgeBaseSettings",
"BedrockSettings",
"__version__",
]
Loading
Loading