Building Agentic Retrieval on Amazon Bedrock with AWS CDK
A new architectural pattern for enterprise retrieval brings multi-turn planning, semantic routing, and built-in observability to Managed Amazon Bedrock Knowledge Bases.

Understanding the Limits of Traditional RAG
Traditional Retrieval-Augmented Generation systems follow a straightforward approach: they embed a question, fetch the nearest chunks from a single index, and hand those chunks to a model to generate an answer. While this single-shot pipeline works well for straightforward inquiries, it breaks down when facing complex cross-corpus queries or tasks requiring multiple iterations. A single retrieval call often returns incomplete information, leading to fluent yet inaccurate answers because the system lacks a mechanism to re-examine the corpus or route questions dynamically.
To solve these architectural hurdles, developers are turning to enterprise agentic retrieval. By integrating a reasoning agent into the workflow, the system can determine whether retrieval is necessary, select the appropriate data source, and perform multiple lookups before composing a grounded and cited response. These capabilities are central to modern implementations on <a href="https://aws.amazon.com/blogs/machine-learning/build-agentic-retrieval-on-a-managed-amazon-bedrock-knowledge-base-with-cdk/">AWS Machine Learning Blog</a> frameworks, marking a significant evolution from older single-shot solutions.

The Evolution from DIY to Managed Knowledge Bases
Earlier deployment patterns, such as the approach detailed in a previous <a href="https://aws.amazon.com/blogs/machine-learning/build-an-end-to-end-rag-solution-using-knowledge-bases-for-amazon-bedrock-and-the-aws-cdk/">2024 post</a>, required developers to manually provision and sequence separate resources like vector stores and storage buckets. In contrast, current architectures leverage the Managed Knowledge Base type provided by <a href="https://docs.aws.amazon.com/bedrock/">Amazon Bedrock</a>, which autonomously manages data ingestion, storage, indexing, and retrieval.
This managed model eliminates the need to provision or scale customer-managed vector infrastructure such as collections in <a href="https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless.html">Amazon OpenSearch Serverless</a>. By removing the overhead of managing OpenSearch Compute Units, engineering teams can focus entirely on application logic while relying on service-managed models for embedding and internal reranking.

Powering Agentic Workflows with AgentCore and CDK
The agentic capabilities of the new architecture are powered by <a href="https://docs.aws.amazon.com/bedrock-agentcore/">Amazon Bedrock AgentCore</a>. This component features a Gateway that exposes each knowledge base as a Model Context Protocol tool, alongside a Runtime that hosts the reasoning agent. Utilizing the AgenticRetrieveStream API, the system executes multi-turn planning and returns synthesized answers complete with citations.
Deploying this multi-component infrastructure is streamlined through the <a href="https://docs.aws.amazon.com/cdk/">AWS CDK</a>. Instead of orchestrating resource stacks by hand, developers can define the entire application—including storage buckets managed via <a href="https://docs.aws.amazon.com/s3/">Amazon Simple Storage Service (Amazon S3)</a> and the associated knowledge bases—as a single Python-based application.

Observability and Continuous Evaluation
Because agentic systems follow non-deterministic execution paths depending on the exact phrasing of a user's question, monitoring their internal behavior is critical. Operational visibility ensures that developers can track call volumes, latency, and token usage effectively across production environments.
To address this requirement, the reference architecture integrates deep telemetry directly into the deployment package. Utilizing <a href="https://docs.aws.amazon.com/cloudwatch/">Amazon CloudWatch</a>, the application provisions specialized dashboards spanning seven distinct layers of observability alongside both on-demand and continuous evaluation frameworks.

Sources
- AWS Machine Learning BlogBuild agentic retrieval on a Managed Amazon Bedrock Knowledge Base with CDK
Continue chronologically





