Build agentic retrieval on managed Amazon Bedrock with CDK
The AWS Machine Learning Blog presents a tutorial for building agentic retrieval on a Managed Amazon Bedrock Knowledge Base with the AWS Cloud Development Kit. It combines multi-knowledge-base routing, a reasoning agent hosted in Amazon Bedrock AgentCore, MCP tools, cited retrieval, seven observability layers, and evaluation, with a CDK application that provisions four dependent stacks. AWS says the reasoning agent can choose whether to retrieve, which knowledge base to consult, and whether to retrieve again before answering.
The tutorial provides a concrete implementation pattern for agentic RAG, including managed ingestion, multi-turn retrieval, observability, evaluation, and infrastructure deployment through CDK.
This post builds enterprise agentic retrieval on a Managed Amazon Bedrock Knowledge Base with the AWS Cloud Development Kit (AWS CDK). To see why that’s worth building, it helps to start with where ordinary Retrieval Augmented Generation (RAG) breaks down. Most RAG systems start the same way: they embed the question, fetch the nearest chunks from one index, hand them to a model, and return the answer. One retrieval, one generation. For a large class of questions that’s the right design, and there’s no reason to build anything more complicated.
It fails in a recognizable way. Ask a question whose answer spans two corpora, and a single retrieval returns half of what the model needs, which is worse than returning nothing, because the answer comes back fluent and incomplete. Ask a question where the right source depends on the question, and a single index has no mechanism to choose. Ask a question that needs a second look at the corpus after seeing the first result, and there is nowhere for that second look to happen.
Enterprise agentic retrieval answers all three by putting a reasoning agent in the loop. The agent decides whether to retrieve, which knowledge base to consult, and whether to go back for more before it composes an answer. This is the direction Amazon Bedrock Knowledge Bases have evolved. With the launch of the Managed Knowledge Base, retrieval is no longer a single embed-and-fetch call. It has become an agentic capability: multi-turn planning, tool-driven retrieval, and grounded, cited answers. The AgenticRetrieveStream API offers this as a first-class service feature rather than something you assemble yourself. That works, and it also introduces a genuinely harder operational problem. A single-shot pipeline is a function you can reason about by reading it. An agent that reasons and retrieves in a loop takes a different path on every question. By default you can see neither the path it took nor whether the answer it produced was any good. Observability stops being a nice-to-have and becomes the only way to know the system works.
#Amazon Web Services#Amazon Bedrock#Managed Amazon Bedrock Knowledge Base#Amazon Bedrock AgentCore#AgenticRetrieveStream#Model Context Protocol#AWS Cloud Development Kit#Amazon CloudFormation#Amazon S3