ZICQ
中 Log in / Sign up
Newsroom Agentic #Amazon Bedrock #AgentCore Memory #Agentic RAG #Multi-Tenant Isolation #Long-Term Memory

Amazon Bedrock Adds Multi-User Long-Term Memory to Agentic Retrieval

Avatar of Mr.Xu

By Mr.Xu Compiled & Reviewed by Editorial

Published:

中文阅读 (Chinese) English Version
Co-reading Select any sentence in the article to highlight, annotate, or copy a quote card. Join discussion ↓

Summary:Amazon Bedrock Managed Knowledge Base and AgentCore Memory can now operate within a single `AgenticRetrieveStream` request. A `memoryConfiguration` binds the memory resource, stable actor identity, and conversation session; the planner can search long-term memory when context is useful, while `userContext` applies document-level ACL filtering to the managed knowledge base. The service also restores short-term history and persists each completed turn, removing much of the application-side convers


## Core Change: Memory Becomes Part of the Retrieval Chain Amazon Bedrock Managed Knowledge Base now supports `memoryConfiguration` in `AgenticRetrieveStream`, allowing AgentCore Memory to operate alongside the managed knowledge base as a retrieval source. The integration is opt-in, while applications that continue to send complete conversation history through `messages` remain compatible. A request now follows six stages: 1. The application derives identity from a verified Cognito ID token. The stable `sub` claim becomes `actorId`, while the verified `email` claim is passed through `userContext.userId`. 2. `sessionBinding` restores short-term memory for the specified `actorId` and `sessionId`. 3. Speculative retrieval checks both the knowledge base and long-term memory. The planner can also emit a `memoryRetrieve` action and compose a more targeted memory query. 4. The knowledge base applies ACL filters, indexing, and ranking. Relevant documents and memory records are passed to the managed model, which produces a cited response. 5. With `persistenceMode: DEFAULT`, the question and final answer are persisted back into the same session. When `sessionBinding` is active, `messages` contains only the current question because the service restores history itself. 6. AgentCore Memory asynchronously extracts conversation summaries and user preferences into long-term records that can be retrieved by later sessions. The ownership boundary is important. Managed Knowledge Base owns ingestion, ACL filtering, indexing, ranking, planning, retrieval, and generation. AgentCore Memory owns memory storage, retention, encryption, and fact extraction. The application retains authentication, user-interface logic, and identity mapping. It no longer needs a conversation table, history replay, or a separately operated extraction pipeline. ## Multi-User Isolation: Two Identity Axes Document permissions and personal memory must not use the same identifier. The Cognito `email` maps to knowledge-base ACLs, while `sub` serves as the long-term `actorId`. Email addresses can change or be reassigned; using one to identify memory could transfer old records to a departing employee or a new hire. A stable, non-reused subject identifier is the safer memory boundary. Long-term records use namespaces such as `/anycompany/`. Because `retrievalConfigs` accepts only one `namespacePath`, `actorId` should sit directly below the root. Otherwise, a single path cannot cover both profile data and conversation summaries. Two built-in strategies can run together: the `summary` strategy captures facts discussed in a conversation, while the `userPreference` strategy extracts explicitly stated preferences and avoids treating incidental remarks as durable preferences. IAM supplies a second isolation layer. The backend uses `sts:AssumeRole` to create a temporary session tagged with the user ID, then restricts memory operations with the `bedrock-agentcore:actorId` and `bedrock-agentcore:namespacePath` condition keys. Even if application code attempts to address another user's namespace, IAM can reject event creation, retrieval, and listing operations. ACL-aware retrieval is still result filtering, not a complete authorization system. The email must come from an ID token whose signature, issuer, audience, expiry, and `email_verified` state have all been validated. It should also be immutable in the user pool. The knowledge base fails closed when an ACL is missing or invalid, but reassigning an email to another employee still transfers the associated access. ## Engineering Trade-offs: Latency, Consistency, and Degradation - **Added latency**: The sample reports roughly 200 milliseconds for session restoration. A complete turn with one knowledge base, ACLs, and memory took about 4 to 10 seconds. Planning iterations, rather than the memory read itself, account for most of that time. These are observations, not service commitments. - **Eventual consistency**: Long-term extraction runs asynchronously after a turn is persisted. In the sample, the first record appeared about 81 seconds after turn two. A fact stated in one conversation is therefore not guaranteed to be available immediately in the next one. - **Graceful degradation**: A failed or denied memory operation does not fail the entire request. The trace contains a `FAILED` memory event, and the service continues with knowledge-base retrieval. The UI should expose this degraded state so users do not mistake a generic answer for a memory-grounded one. - **Layered cost**: Agentic Retrieval is billed per call and underlying retrieval, while memory operations performed during the call are billed separately. Injecting more long-term context also increases model-token consumption, so teams should evaluate retrieval count, memory operations, and generation tokens together. - **Control-plane limits**: `sessionBinding` cannot be combined with a manually supplied complete `messages` history. The service restores `USER` and `ASSISTANT` events but skips `TOOL` and `OTHER` events. A request can route to at most five knowledge bases, and their descriptions directly affect planner routing. - **Asymmetric lifecycle**: Raw events can expire according to `eventExpiryDuration`, but extracted long-term records do not automatically expire with them. A 30-day event-retention example is not a complete user-deletion workflow. ## Functional Evidence and Evaluation Boundaries The AWS sample indexed 11 documents with zero reported ingestion failures and demonstrates three important behaviors. A salesperson and an engineer receive different ACL-filtered results for the same question. A follow-up VPN question resolves a pronoun from the active session. In a separate session, a long-term summary identifies the user's office and personalizes the answer. Trace output also shows that different users search only their own namespaces even though they share one memory resource. These examples validate the end-to-end control flow, but they are not a formal benchmark. The corpus is small, and the post does not disclose `Recall@K`, answer accuracy, citation faithfulness, cross-tenant leakage rates, long-term-memory poisoning success, p95 or p99 latency, or cost per task. Planner errors, extraction mistakes, and knowledge-base recall failures can also compound one another. Production acceptance testing should separately evaluate document authorization, memory hit quality, memory poisoning, session continuity, and degraded operation, while attributing contributions to the knowledge-base and memory branches independently. ## Deployment Guidance for Developers 1. Validate the Cognito ID token on the server. Use a verified, immutable email for ACL identity and a stable, non-reused `sub` as `actorId`; never accept `actorId` or namespace values from the client. 2. Generate a `sessionId` on the server and return it to the client, then keep it stable for that conversation. Reuse `/anycompany/` at the namespace root so one path covers both summaries and profile strategies. 3. Issue temporary AWS credentials with a per-user session tag and enforce both `actorId` and `namespacePath` in IAM. Memory operations should fail closed even if application-level identity mapping is defective. 4. Record the complete planning trace, subqueries, memory hits, ACL filtering, and degraded events. CloudWatch monitoring should cover request errors, total planning iterations, memory latency, and strategy-level token consumption. 5. Treat memory as untrusted input. The AgentCore Memory resource is customer-owned and other systems may write to it, so Bedrock Guardrails should be used to reduce persistent prompt-injection risk. 6. Implement a deletion workflow covering both `DeleteEvent` and `DeleteMemoryRecord`, then verify that events, summaries, preferences, and backups are covered by the required retention policy. 7. Run load and fault-injection tests in the target region before production. The official sample uses `us-west-2`, Python 3.10 or later, and Boto3 1.43.72 or later. Because `aclEnabled` cannot be changed after data-source creation, permission mappings should be validated beforehand. --- > **Source**: [AWS Machine Learning Blog](https://aws.amazon.com/blogs/machine-learning/build-memory-aware-ai-agents-with-agentic-retrieve-on-amazon-bedrock-managed-knowledge-base/) (2026-11-16) — END —

Tags: #Amazon Bedrock #AgentCore Memory #Agentic RAG #Multi-Tenant Isolation #Long-Term Memory

Editorial & Fact-Checking Note: This article is compiled from primary research, official release documentation, and source papers by the ZICQ Newsroom pipeline with automated entity verification and human editorial review. If you notice any technical inaccuracy, please submit a correction via our corrections policy or email our editorial desk directly.

What's your take on this story?
🚀 Explore & Submit Works

Community Comments

Loading live comments and annotations…