Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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, injects retrieved images as image `Content` (gif/jpeg/png/webp), and uses the transcription/summary text of audio/video results.
- **`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, use `BedrockKnowledgeBaseProvider`. Its `mode` selects `"inject"` (inject KB context automatically), `"tool"` (expose a KB search tool the agent calls on demand), or `"both"` (default). See:

- [`bedrock_kb_tool.py`](../../samples/02-agents/providers/amazon/bedrock_kb_tool.py) — `BedrockKnowledgeBaseProvider(mode="tool")`: the agent searches the KB on demand.
- [`bedrock_kb_context_provider.py`](../../samples/02-agents/providers/amazon/bedrock_kb_context_provider.py) — `BedrockKnowledgeBaseProvider(mode="inject")`: KB context is injected 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