A Bedrock document assistant can remember individual users by connecting its managed document retrieval to AgentCore Memory. AWS’s November 16, 2026 tutorial describes this setup for employee-policy and customer-support assistants: the application verifies the user, while the service can restore conversations, retrieve saved context and store the exchange.
Keep document access separate from memory access. A remembered preference is context, not permission to read a document. The practical choices are which history to retain, who can retrieve it and how to remove it later.
Decide whether to hand over conversation history
Start with a specific need: continuing a conversation or recalling useful context across sessions. If users only need to find an approved procedure, document search may be enough. Our guide to when saved memory helps and when search is enough explains that earlier design choice.
Managed history means Bedrock restores the conversation for you. You cannot combine that restoration with an edited copy of earlier messages in the same request. If each request needs selectively redacted history, retain application control over the messages instead of enabling session restoration. This follows from the memory configuration’s history-source restriction.
Do not assume a guardrail supplies the missing redaction step. The current integration documentation requires an explicitly selected CUSTOM model for guardrails and does not support their masking/anonymization actions in agentic retrieval.
Prepare the knowledge base and memory resource
As of November 17, AWS lists managed knowledge bases in eight commercial Regions: N. Virginia, Oregon, Ireland, London, Frankfurt, Tokyo, Singapore and Sydney. GovCloud US-West lacks agentic retrieval and document ACLs, so this pattern does not work there unchanged. Check the managed knowledge-base Region list before provisioning.
Memory has a separate availability matrix. Its support in Mumbai does not make the combined workflow available there: neither Mumbai nor Hyderabad appears in the managed knowledge-base list. Choose a location that supports both services and meets your deployment requirements.
Create the managed knowledge base with a supported data source, the appropriate service role and document access controls; complete its initial synchronization. AWS’s setup prerequisites cover the required permissions. The memory resource must be ACTIVE and in the same account as the knowledge base, as specified in the integration requirements.
When creating AgentCore Memory, choose how long to keep raw conversation events and add the extraction strategies you need. Without strategies, it stores short-term events but does not extract long-term records. Select facts, preferences or summaries according to the task—not simply every available strategy.
Map verified identity to two different access controls
Validate sign-in before constructing the request. For Cognito, check the token’s signature, issuer, expiry, intended app client and token use; merely decoding it is insufficient. Follow AWS’s token-verification guidance. Build identity fields on the server, not from user-editable request values.
Memory owner:
actorIdshould be a stable, non-reassigned identifier. Cognito’s sub claim identifies the user; an email address is a different attribute and may later belong to someone else.Document reader:
userContext.userIduses the verified email associated with the source’s document permissions. AWS’s ACL identity rules do not automatically map aliases. Authenticate upstream and handle address changes and reuse explicitly.Conversation:
sessionIdidentifies a conversation within that actor. Generate it for a new conversation and retain it for follow-up turns; validate any request to reopen a session against the signed-in user.
Enable document ACL awareness on the source. Without user context, ACL-enabled sources return no results, but non-ACL sources still return results. Review mixed sources deliberately. S3 and Custom sources also lack the live permission rechecks available on some other connectors; connector behavior differs.
For extracted memories, use a namespace—a folder-like logical path—under each user. Illustrative strategy templates are /assistant/{actorId}/facts/ and /assistant/{actorId}/summaries/{sessionId}/. Resolve those placeholders to actual identifiers when requesting records. Use the same leading and trailing slashes in strategies, requests and IAM conditions, following AWS’s namespace guidance.
Paths organize records; permissions enforce access. AWS’s walkthrough uses a backend-assumed role tagged with the verified user ID, then restricts memory operations to that user. Keep tag selection server-controlled. Check the supported IAM condition keys for each operation and scope access to the intended memory resource.
The integration needs GetMemory, ListEvents for history restoration, RetrieveMemoryRecords for saved facts and CreateEvent to persist turns, all in the bedrock-agentcore service. Customer-key encryption also needs kms:Decrypt. These memory permissions supplement, rather than replace, Bedrock retrieval and model permissions.
Add memory to the retrieval request
Build an AgenticRetrieveStream request with the current question in messages, the managed knowledge base in retrievers, model settings in agenticRetrieveConfiguration and the server-verified userContext. When restoring a session, send only the current user question—not the previous conversation again.
The following is a partial JSON configuration, not a complete request. Replace the uppercase placeholders server-side; the user identifier in the path must match the verified actor. It combines session restoration with long-term lookup:
{
"generateResponse": true,
"memoryConfiguration": {
"memoryId": "MEMORY_RESOURCE_ID",
"sessionBinding": {
"actorId": "VERIFIED_USER_ID",
"sessionId": "CONVERSATION_ID"
},
"retrievalConfigs": [
{
"namespacePath": "/assistant/VERIFIED_USER_ID/"
}
],
"persistenceMode": "DEFAULT"
}
}The memory configuration currently allows one retrieval configuration. A user-specific parent namespacePath can cover both facts and summaries beneath that user’s root; do not broaden it to a shared parent containing other users. The planner decides whether a memory lookup is useful.
With DEFAULT, the question and generated answer are stored together as one event; generateResponse must be true. Choose NONE to leave that session unchanged. This controls turn persistence, not whether previously saved records exist.
Handle delayed or failed memory explicitly
Long-term extraction happens after the turn is saved, so a newly mentioned fact may not be available in the next session immediately. AWS also describes memory operations as best-effort: a document answer can continue when a memory operation fails or access is denied.
The operational consequence is that a successful answer is not proof of successful remembering. Inspect memory trace failures and distinguish an answer without saved context from a successfully personalized one. If the task depends on a remembered detail, ask the user to supply it again or pause that task. Treat saved details as potentially stale, not proof of current entitlement.
Delete conversation events and extracted records separately
AWS’s event-deletion documentation explicitly separates the two: removing a conversation event does not remove information already extracted into long-term memory. A user-deletion workflow therefore needs both event deletion and record deletion.
Long-term records do not expire by default. The current retention controls let you set a separate time-to-live through recordExpirySpecification, with a minimum of 31 days. Changing a strategy’s setting affects newly generated records, not existing ones. Expired records can remain readable for a few days during background deletion; use explicit record deletion when prompt removal is needed.
That means a 30-day conversation-retention setting is not a 30-day limit on everything remembered. Plan the extracted-record lifecycle separately, including the additional UpdateMemoryRecordExpirySpecification permission when configuring expiry. Test what happens to pending extraction and previously saved answers when deleting a user or revoking document access; the cited sources do not establish automatic purging of those copies.
Budget retrieval, index storage and memory separately
At the public USD prices checked on November 17, managed agentic retrieval costs $4 per 1,000 calls, plus $1 per 1,000 underlying document-retrieval calls. Index storage costs $5 per GB of raw data per month. Managed parsing, embeddings and reranking are included; custom model choices add charges.
Illustrative knowledge-base subtotal: $11 a month. Assume 20 people ask 50 questions each, with one agentic call and two document retrievals per question, plus 1 GB indexed throughout the month. That gives 1,000 agentic calls ($4), 2,000 retrievals ($2) and storage ($5). Two retrievals per question is an assumption, not a measured result.
This is not the price of the finished assistant. It excludes AgentCore Memory, hosting, source storage, identity services, optional monitoring or Gateway use, custom models, retries, taxes and engineering work.
AgentCore Memory’s separate rates are $1 per GB ingested, $0.20 per GB retrieved and $0.10 per GB-month stored for short-term events. Ingestion and retrieval apply a 12 KB minimum and 64 KB maximum billable size per event; storage uses actual size.
Built-in long-term memory storage costs $0.75 per 1,000 records-month, with retrieval at $0.50 per 1,000 calls. Override/self-managed storage is $0.25 per 1,000 records-month, but custom extraction can add model charges. Storage is prorated hourly. Budget restored-history bytes and memory lookups separately: reading an expanding conversation repeatedly can cost more than counting new messages suggests.
Prompt caching addresses a different expense: repeated model context, not durable user memory. The Bedrock prompt-caching cost guide covers that calculation; do not apply its model-specific savings automatically to managed retrieval.
Check the boundaries before enabling real-user memory
For a pre-release check, use synthetic documents and two test identities with different permissions:
Continue one conversation, then start another for the same user after extraction. Repeat as the second user and verify separation of both document results and memory.
Deny a memory operation in the test environment and check that the application detects the missing context even when an answer arrives.
Exercise event deletion, record deletion and expiry separately. Revoke source access and check previously persisted answers and extracted context, including pending extraction.
