explainx.ai350K+ learn from us
TrendingAI News TodayPathwaysSkills
Pricing
explainx.ai

Upskill in AI — 16 free pathways, live workshops & bootcamps, and 50+ courses from practitioners. Plus the skills, tools, and MCP servers to practice on.

follow us

follow on google

Add explainx.ai as a preferred source

corporate training

support@explainx.ai

get started

Find your pathTake Free Evaluation

community

Join the community

learn

mind: share how you thinkpathways — start freeworkshopsbootcampscoursescompare Explainxcertificationsmock testsexplainx universitycorporate traininglearn skills & mcp

discover

skillsmcp serversexplainx mcpestacktoolsmdx readeragentsllmsdesignsdictionarypeopleagi trackerfelony benchranks

company

aboutvisionmissionteaminstructorsteach on explainxpartnershipscommunityhackathonscareers

content

daily AI newsstate of AI — live resultsblogreleasespromptsgeneratorsresource libraryfor LLMsexplainx.ai kids

solutions

all solutionsdeveloper upskillingmarketing upskillingproduct manager upskillingleadership upskilling

newsletter · weekly

Get AI news, tools, and insights in your inbox.

supportcontactprivacytermsdata rightshow we create contentsubmission guidelines

© 2026 AISOLO Technologies Pvt Ltd

explainx.ai

On this page

  • Answer first: what changed for builders
  • Why AWS merged KB and memory in one stream
  • Architecture: AnyCompany fictional assistant
  • Step 1 — ACL-enabled S3 data source
  • Step 2 — Memory strategies and namespace layout
  • Step 3 — Cognito claims: email vs sub
  • Step 4 — Building AgenticRetrieveStream
  • IAM: defense in depth for multi-tenant memory
  • Reading traces: when did memory matter?
  • How this differs from Apple and Microsoft agent memory research
  • Migration checklist from DIY chat history
  • Testing memory-aware agentic retrieve in staging
  • Limits AWS states or implies
  • Bottom line
  • Related reading
← Back to blog

explainx / blog

Bedrock Agentic Retrieve plus AgentCore Memory: Multi-User RAG Guide

Amazon Bedrock, RAG, AI Agents, AWS, AgentCore

Part of AI Agents

AWS Nov 16, 2026 shows AgenticRetrieveStream with AgentCore memory on Bedrock Managed Knowledge Bases: per-user ACLs, Cognito identity, IAM isolation, and traces.

Nov 16, 2026·8 min read·Yash Thakker
add explainx.ai
go deep
Bedrock Agentic Retrieve plus AgentCore Memory: Multi-User RAG Guide

Amazon Bedrock can now treat long-term user memory as another retrieval source inside the same AgenticRetrieveStream call that searches your enterprise knowledge base. On November 16, 2026, AWS published Build memory-aware AI agents with Agentic Retrieve on Amazon Bedrock Managed Knowledge Base—a full multi-tenant employee assistant pattern where each user sees only ACL-allowed documents and each user's AgentCore memory stays private.

If you already deployed agentic RAG from our October CDK blueprint, this post is the memory upgrade: swap your conversation table for AgentCore session and long-term records, and pass Cognito identity into userContext and memoryConfiguration on every stream.

Daily briefFrom Yash · 350K+ students taught

Catch up on AI

One AI story explained in plain English, plus one thing to try. Every day, free. Unsubscribe anytime.

Answer first: what changed for builders

table · 3 cols
PieceBefore (typical DIY)AWS November 16 pattern
Session historyApp database or cacheAgentCore short-term memory via sessionBinding
User facts from old chatsCustom extractorsAgentCore summary and user-preference strategies
Retrieval callKB onlyKB plus planner-selected memory searches
Per-user docsManual filtersManaged KB ACL filtering from S3 ACL JSON
IsolationApp logic onlyIAM conditions on actorId and namespacePath

The integration is opt-in: omit memoryConfiguration and behavior stays compatible with earlier AgenticRetrieveStream clients.

Why AWS merged KB and memory in one stream

AWS opens with a product truth many RAG demos skip: users expect follow-up questions that only make sense with last month's context, and answers grounded with citations from docs they may read.

That splits state across two systems:

  1. Knowledge base — policies, runbooks, commission plans with document ACLs.
  2. Memory — durable facts such as office location, laptop OS, or answer-format preferences.

Without a single orchestrated call, apps glue retrieve → memory fetch → LLM themselves and often leak cross-user facts or over-fetch documents.

AgenticRetrieveStream already runs a planner that chooses sub-queries. Adding memoryConfiguration makes AgentCore memory a first-class retrieval source next to the managed knowledge base. After generation, persistenceMode: DEFAULT writes the turn back so long-term extraction runs asynchronously under configured strategies.

This is the same agentic retrieval family we covered when AWS shipped ACL interceptors on AgentCore Gateway—but the November guide focuses on memory namespaces rather than MCP tool routing.

Architecture: AnyCompany fictional assistant

AWS's running example is AnyCompany, an internal assistant over HR, IT, engineering, and sales folders in S3, with:

  • One managed knowledge base (no self-hosted vector DB).
  • One AgentCore memory resource shared by all employees.
  • Amazon Cognito for authentication.
  • Boto3 backend assuming a per-user IAM role with sts:TagSession.

Architecture of memory-aware AnyCompany assistant with Cognito, AgenticRetrieveStream, and AgentCore memoryArchitecture of memory-aware AnyCompany assistant with Cognito, AgenticRetrieveStream, and AgentCore memory

Image: Amazon Web Services

One AgenticRetrieveStream turn with userContext and memoryConfigurationOne AgenticRetrieveStream turn with userContext and memoryConfiguration

Image: Amazon Web Services

Regional note from AWS: the sample uses US West (Oregon) (us-west-2) and requires the memory resource in the same account as the knowledge base, in ACTIVE state, per agentic retrieval documentation linked from the post.

Step 1 — ACL-enabled S3 data source

Managed knowledge bases ingest through MANAGED_KNOWLEDGE_BASE_CONNECTOR data sources. For multi-user enterprise RAG, AWS enables aclEnabled with a globalAccessControlListS3Uri pointing at JSON such as:

  • docs/hr/ and docs/it/ — allow all test employees.
  • docs/engineering/ — allow engineers only.
  • docs/sales/ — allow sales only.

Critical constraint: aclEnabled cannot change after creation. If you already stood up a data source without ACLs, you need a new data source and re-ingestion, not a toggle.

Our Crawl4AI plus Bedrock KB guide shows a different ingestion path for web content; the ACL model still applies when documents land in S3 with consistent user email keys.

Step 2 — Memory strategies and namespace layout

One memory resource serves every user; isolation uses {actorId} templates resolved at extraction time.

AWS recommends two strategies together:

  1. summaryMemoryStrategy — captures facts mentioned in passing (Frankfurt office, Mac laptop).
  2. userPreferenceMemoryStrategy — structured prefs (bullet answers, deploy eu-central-1 first).

Namespace design mistake to avoid: retrievalConfigs accepts one namespacePath. A layout like /profile/actorId and /summaries/actorId in separate trees cannot both be reached with a single entry. AWS uses /anycompany/<sub> so one path covers profile and summaries.

Event retention example: 30-day raw event expiry on the memory resource, with optional CMK encryption.

For pricing shifts on AgentCore memory, see our October AgentCore ICYMI guide.

Step 3 — Cognito claims: email vs sub

Two claims, two jobs—AWS is explicit:

table · 3 cols
ClaimMaps toWhy
Verified emailuserContext.userIdACL files key users by email
Immutable submemoryConfiguration.sessionBinding.actorIdStable per-person memory key

Using email as memory actor would let a reassigned mailbox inherit another employee's memories after HR churn. sub should never move between people.

The sample pool sets email required, verified, not mutable. Federated Okta or Entra installs should map IdP email to match ACL entries.

Step 4 — Building AgenticRetrieveStream

After JWT verification, the handler:

  1. AssumeRole on an app role with Tags=[{Key: "userId", Value: principal.sub}].
  2. Generate or reuse sessionId (conv- plus uuid for new chats).
  3. Call AgenticRetrieveStream with:
    • knowledgeBaseId as retriever.
    • userContext carrying email.
    • memoryConfiguration with sessionBinding and retrievalConfigs namespace.

ListSessions with actorId=sub replaces a custom conversations SQL table. If the actor never chatted, AWS returns ResourceNotFoundException—handle as empty history, not a crash.

ListEvents becomes required when using sessionBinding; RetrieveMemoryRecords when using retrievalConfigs; CreateEvent when persistenceMode is DEFAULT.

IAM: defense in depth for multi-tenant memory

The sample policy is worth copying even if you rewrite the app layer:

  • bedrock:AgenticRetrieveStream on *.
  • Scoped bedrock:Retrieve on the specific knowledge base ARN.
  • bedrock-agentcore memory APIs conditioned on ${aws:PrincipalTag/userId} matching actorId or namespacePath prefix.

That means a bug that passes another user's sessionId still cannot read their STM or LTM—session IDs are namespaced under the caller actorId from the token.

Compare with Greenlight Luna SOC on AgentCore, which uses episodic memory for security playbooks; enterprise HR assistants need the same tenant walls with different retention.

Reading traces: when did memory matter?

Maya assistant answer with AgentCore memory hit for Frankfurt-specific VPN guidanceMaya assistant answer with AgentCore memory hit for Frankfurt-specific VPN guidance

Image: Amazon Web Services

AWS's post walks trace events to show the planner choosing memory searches before composing KB sub-queries. That is the observability hook for debugging "why did it think I live in Berlin?" without dumping raw vectors.

Pair traces with the seven observability layers from the CDK blueprint—dashboards still matter; memory adds new span types.

How this differs from Apple and Microsoft agent memory research

Apple's Plan-or-Retrieve study asks when agents should search tools among thousands of APIs. Microsoft UserRepGen-4B simulates user profiles for evaluators. AWS's post is production wiring: Cognito, IAM, S3 ACL JSON, and stream API fields you can deploy this week in us-west-2.

It also complements Claude Code on Bedrock AgentCore—coding agents need repo-scoped memory hygiene; enterprise assistants need document ACL plus user memory hygiene.

Migration checklist from DIY chat history

  1. Audit current message tables for PII before importing into AgentCore strategies.
  2. Create memory resource and wait for ACTIVE.
  3. Align ACL emails with IdP immutable email policy.
  4. Add memoryConfiguration to AgenticRetrieveStream in staging; compare answers with/without memory on the same sessionId.
  5. Turn on IAM session tags on AssumeRole before production multi-tenant launch.
  6. Run regression prompts that require facts from turn 3 in turn 20—the acceptance test AWS implies but does not ship as code.

Testing memory-aware agentic retrieve in staging

Before you cut over production traffic, AWS’s sample pattern implies a test matrix you can script even if the blog does not ship pytest files:

  1. ACL negative test — authenticate as sofia@example.com and ask for an engineering runbook topic. The stream should cite zero engineering docs while still answering from HR folders she may read.
  2. Cross-session memory — in session A, state "I am on a Mac in Frankfurt." Open session B with the same sub and ask a PTO policy question. Trace output should show a memory retrieval influencing KB sub-queries (for example Frankfurt holiday rules).
  3. Session hijack attempt — pass Maya’s sessionId while authenticated as Liam. With IAM session tags enabled, ListEvents for that session should not return Maya’s STM because actorId differs.
  4. Cold start user — first question from a new Cognito user should not 500 when ListSessions raises ResourceNotFoundException; return an empty thread list instead.
  5. Boto3 pin — CI that floats boto3 without a floor can break AgenticRetrieveStream field support; lock 1.43.72+ as AWS documents.

Teams running AWS manufacturing agent taxonomy blueprints can reuse the same per-user tagging pattern when factory roles map to different SOP corpora.

Limits AWS states or implies

  • Region and account colocation for memory and KB.
  • Single namespacePath in retrievalConfigs—design namespaces accordingly.
  • ACL ingestion: documents without ACL coverage do not ingest.
  • Boto3 1.43.72+ requirement—pin in requirements.txt before CI drifts.
  • Preview components elsewhere in AgentCore may still change; check memory strategies docs.

Bottom line

November 16, 2026 AWS documentation closes the loop between agentic RAG and durable per-user memory without a separate persistence microservice. Pass verified email for documents, sub for memory, wrap AgenticRetrieveStream with tagged IAM, and let the planner decide when a user fact should reshape KB sub-queries.

Related reading

  • Agentic Retrieval CDK blueprint (October 2026)
  • Bedrock KB ACLs on AgentCore Gateway
  • AgentCore October 2026 builder ICYMI
  • Crawl4AI plus Bedrock knowledge bases
  • Claude Code remote sessions on AgentCore
  • Apple plan-or-retrieve tool discovery study
  • Primary source: AWS ML Blog — memory-aware Agentic Retrieve
Spotted something out of date? Let us know.
Daily briefFrom Yash · 350K+ students taught

Catch up on AI

One AI story explained in plain English, plus one thing to try. Every day, free. Unsubscribe anytime.

  • ✓ Free
  • ✓ One email a day, no spam
  • ✓ Unsubscribe anytime
Yash Thakker

Written by

Yash Thakker

Yash is an AI expert with over 300K learners. Join his workshops →

View Yash Thakker in People in AI →

Related posts

Nov 9, 2026

AWS Pluggable Agentic AI Framework: Seven Layers for Bedrock AgentCore

Amazon Web Services published a Pluggable Agentic AI Framework on November 9, 2026. It organizes production agent systems into seven composable layers on Amazon Bedrock AgentCore, ships a multi-agent retail workshop, and names MCP, A2A, LiteLLM, Strands Agents, and OpenTelemetry as swappable building blocks.

Nov 9, 2026

CrossnoKaye AURA: Physical AI on Amazon Bedrock AgentCore in Plants

CrossnoKaye published an AWS case study on November 9, 2026 describing AURA, an agentic layer on its ATLAS platform. It uses Amazon Bedrock AgentCore code interpreter sandboxes to run verifiable Python on historian data instead of letting the model guess statistics.

Oct 26, 2026

Agentic Retrieval on Amazon Bedrock Managed Knowledge Bases: The AWS CDK Blueprint

AWS published a CDK walkthrough on October 26, 2026 that replaces single-shot RAG with an agent that routes across two knowledge bases, retrieves through AgentCore Gateway and returns cited answers, with dashboards and evaluation provisioned alongside. Here is what the architecture is, what it costs you to run, and where it fits.