Build memory-aware AI agents with Agentic Retrieve on Amazon Bedrock Managed Knowledge Base Amazon Bedrock Managed Knowledge Base now supports Agentic Retrieve with AgentCore memory, letting developers add a memoryConfiguration to the AgenticRetrieveStream request so long-term memory becomes a retrieval source alongside the knowledge base. The service restores the conversation, has a planner decide when a stored user fact would help, retrieves that fact to compose sub-queries, and saves the turn back to memory, while a userContext field restricts returned documents to those permitted by the user's access control lists. The integration is opt-in and backward compatible, and the post shows how to enforce per-user memory isolation with AWS Identity and Access Management even when application code fails to do so. Artificial Intelligence https://aws.amazon.com/blogs/machine-learning/ Build memory-aware AI agents with Agentic Retrieve on Amazon Bedrock Managed Knowledge Base Users of a knowledge-grounded application expect it to remember them, not only to search well. They ask follow-up questions that make sense only in the context of the previous turn. They expect an answer about a policy or a procedure to reflect what they told the application about themselves last month. And they still expect every answer to be grounded in the documents they are allowed to read, with citations. Whether the application is a customer support assistant, a document chat inside a SaaS product, or an internal assistant over company policies, the expectation is the same. Meeting that expectation is hard, because the context that would sharpen a search lives outside the knowledge base. A user’s location, role, or product tier was often mentioned in an unrelated conversation weeks ago. To use it, the application has to store every conversation, extract durable facts from it, decide which facts matter for the current question, and inject them into the request. When many users share the application, every one of those steps also has to be isolated per user, and so does every document. Amazon Bedrock Managed Knowledge Base https://aws.amazon.com/bedrock/knowledge-bases/ and Amazon Bedrock AgentCore memory, a capability of Amazon Bedrock AgentCore https://aws.amazon.com/bedrock/agentcore/ , now take over these steps: storing each conversation, extracting facts from it, and bringing the relevant facts into the search. You turn this on by adding a memoryConfiguration to the AgenticRetrieveStream request, which makes AgentCore memory a retrieval source alongside your knowledge base. Within the same call, the service restores the conversation, and the planner decides on its own when a fact about the user would help. It retrieves that fact from long-term memory and uses it to compose the sub-queries it sends to the knowledge base. After generating the answer, the service saves the turn back to memory. The same request carries a userContext , so the knowledge base returns only the documents that the user’s access control lists ACLs allow. The integration is opt-in and backward compatible. Your application keeps only what is genuinely yours: authenticating the user and passing who they are. This post shows how to build such an assistant for many users who share one knowledge base and one memory resource. Each user sees only the documents they may read, and each user’s memory stays private. The running example is an internal employee assistant for AnyCompany, a fictional company. Employees sign in with Amazon Cognito and ask questions over HR policies, IT guides, engineering runbooks, and sales plans. We show how to read the user’s identity from the Cognito ID token, how to pass it to AgenticRetrieveStream for document ACLs and for memory, how to design memory namespaces for many users, and how to read the trace to see when the planner used memory. Finally, we make AWS Identity and Access Management IAM enforce per-user memory isolation even when application code gets it wrong. If you deployed the application from Build multi-tenant agentic chat applications on enterprise data with Amazon Bedrock Managed Knowledge Base https://aws.amazon.com/blogs/machine-learning/build-multi-tenant-agentic-chat-applications-on-enterprise-data-with-amazon-bedrock-managed-knowledge-base/ , this post replaces its “persist conversation history yourself” step. Solution overview AnyCompany keeps its documents in Amazon Simple Storage Service Amazon S3 . One managed knowledge base syncs them through an ACL-enabled Amazon S3 data source. A global ACL file in the same bucket says which employees may read each folder: everyone reads HR and IT, only engineers read the engineering runbooks, and only salespeople read the commission plan. One AgentCore memory resource is shared by every employee. Amazon Cognito authenticates employees, and its ID token supplies two claims: the sub user ID identifies the user’s memory, and the verified email identifies the user to the knowledge base’s ACL filter. Three test users sign in: two engineers, Maya and Liam, and one salesperson, Sofia. The trace excerpts in this post are taken from a run of the sample application in the GitHub repository https://github.com/aws-samples/sample-managed-knowledge-base-patterns/tree/main/agentcore-memory-multiuser . 1. The employee signs in with Cognito and receives an ID token, a JSON Web Token JWT signed by the user pool. 2. The application’s API validates the token — an Amazon API Gateway JWT authorizer in production, a small FastAPI service in the sample. Unauthenticated requests do not reach the handler. 3. The handler reads two claims from the verified token: sub becomes the memory actorId and namespace, and email becomes the userContext.userId . The client body carries only { question, sessionId? } . The handler then assumes the application’s IAM role for this user, with the session tag userId=