Amazon Bedrock adds memory-aware retrieval for multi-tenant AI agents
AWS integrates AgentCore memory with Managed Knowledge Bases to enable personalized, context-aware RAG while enforcing strict document access controls.
Amazon Web Services has introduced a new integration between Amazon Bedrock Managed Knowledge Base and Amazon Bedrock AgentCore memory. This update allows developers to build AI agents that remember user-specific context across sessions while strictly adhering to document access controls. The feature was announced on November 16, 2026, targeting engineers building multi-tenant enterprise assistants.
What happened
Previously, building a knowledge-grounded application required developers to manually manage conversation history, extract durable facts from past interactions, and inject those facts into search queries. This process was complex, especially when ensuring that each user in a multi-tenant environment could only access documents they were authorized to see. Developers had to build custom infrastructure to store conversations, isolate data per user, and maintain synchronization between user context and document retrieval.
The new integration automates these steps by allowing AgentCore memory to act as a retrieval source alongside the knowledge base. By adding a memoryConfiguration to the AgenticRetrieveStream request, the service automatically restores conversation history, extracts relevant long-term facts, and uses them to refine search queries. The system handles session restoration, memory search, and persistence, while the knowledge base continues to manage ingestion, indexing, and ranking.
This approach ensures that every answer is grounded in both the user’s historical context and the documents they are permitted to access. The integration is opt-in and backward compatible, meaning existing applications can adopt it without breaking changes. The application remains responsible only for authenticating the user and passing their identity, while AWS manages the complex orchestration of memory and retrieval.
How it works
The mechanism relies on mapping user identity to two distinct claims from an authentication token, such as one issued by Amazon Cognito. The user’s email address is used to filter documents via Access Control Lists (ACLs) in the knowledge base, ensuring they only see allowed content. Meanwhile, a stable user ID, such as the Cognito sub, serves as the actorId for memory isolation. This separation prevents issues where changing an email address might inadvertently grant a new user access to another person’s conversation history.
When a user sends a query, the application passes the userContext and memoryConfiguration to the AgenticRetrieveStream API. The service first restores short-term memory for the current session and then optionally searches long-term memory for relevant facts, such as user preferences or previously mentioned details. A planner component decides if these memories are useful for the current question and incorporates them into the sub-queries sent to the knowledge base. After generating an answer, the system saves the interaction back to memory asynchronously.
Security is enforced through IAM policies conditioned on session tags. The application assumes an IAM role tagged with the user’s ID, and IAM policies restrict memory access to namespaces containing that specific ID. This ensures that even if application code contains errors, the underlying infrastructure prevents one user from accessing another’s memory records or documents.
Key details
- The integration uses
AgenticRetrieveStreamwith amemoryConfigurationparameter to enable memory-aware retrieval. - User identity is split: email addresses filter document ACLs, while stable IDs like
subisolate memory namespaces. - Two memory strategies are supported: summary strategy for capturing incidental facts and user-preference strategy for structured settings.
- IAM policies use session tags to enforce per-user isolation for both memory records and document access.
- The system supports asynchronous extraction of long-term records, keeping the response latency low during active chats.
- Existing knowledge bases with ACL-enabled data sources, such as Amazon S3 or SharePoint, work without modification.
Why it matters
For software engineers building enterprise AI assistants, this update significantly reduces the operational burden of maintaining stateful agents. Instead of designing custom databases for conversation history and writing complex logic to inject context into prompts, developers can rely on a managed service. This shift allows teams to focus on application logic and user experience rather than the intricacies of state management and data isolation.
The strict separation of document access and memory context also addresses a critical security concern in multi-tenant environments. By leveraging IAM conditions and ACLs at the infrastructure level, organizations can ensure compliance with data governance policies. This reduces the risk of accidental data leakage, which is a common vulnerability when developers manually handle user context and document retrieval in custom code.
Furthermore, the ability to personalize responses based on long-term memory improves the utility of AI agents. Users expect assistants to remember their preferences and previous discussions, much like a human colleague. This integration makes it feasible to deliver such experiences at scale without compromising on security or performance, enabling more natural and effective interactions in customer support, internal IT helpdesks, and other enterprise use cases.
What you can do
- Update your AWS SDK to Boto3 1.43.72 or later to access the new
memoryConfigurationparameters. - Review your authentication flow to ensure you can extract both a stable user ID and a verified email address from your identity provider.
- Design your memory namespaces using the
{actorId}placeholder to ensure automatic isolation for each user. - Configure IAM roles with session tagging to enforce strict access controls on memory resources and knowledge base queries.
- Test the integration with a small group of users to verify that document ACLs and memory retrieval are functioning as expected.
- Consider enabling both summary and user-preference memory strategies to capture a wider range of contextual information.



