v vanemmerik.ai / aws-ai
Tip of the Day 2026 · 05 · 28 ≈ 8 min read Bedrock AgentCore · Memory

AgentCore Memory, end to end.

Yesterday we mapped the /invocations wire contract. Today we move one layer up: how an agent remembers what happened on the last turn, and what it remembers about you across sessions. AgentCore Memory is the managed answer to the statelessness problem — and it splits cleanly into two halves stitched together by a single hierarchical path called a namespace.

$ agentcore add memory --strategies SEMANTIC,SUMMARIZATION,USER_PREFERENCE  — short-term + long-term, one command

01Two halves of the same store

From the docs: "AgentCore Memory is a fully managed service that gives your AI agents the ability to remember past interactions … It provides a simple and powerful way to handle both short-term context and long-term knowledge retention without the need to build or manage complex infrastructure."

It splits into two memory types that work together:

The shift

You stop hand-managing chat history in DynamoDB and stop bolting RAG onto every conversation. Short-term is a stream of immutable events the platform stores for you; long-term is what an LLM-powered extraction pipeline distills out of that stream and drops into searchable namespaces.

02The seven words you need

AgentCore Memory has its own small vocabulary. The official memory terminology page spells it out:

TermWhat it is
AgentCore MemoryThe top-level container resource. Holds all events and extracted insights.
Memory strategyConfigurable rules that decide what to extract from short-term into long-term.
NamespaceA hierarchical path (/users/{actorId}/preferences/) used to group long-term records.
Memory recordA structured unit of long-term information, identified by ID, scoped to a namespace.
SessionOne continuous interaction. Grouped by sessionId.
ActorThe entity interacting with the agent (user, agent, or system). Grouped by actorId.
EventThe fundamental unit of short-term memory. Immutable, timestamped, organized by actorId + sessionId.

Two things to internalise: events are immutable and timestamped, and long-term records are scoped to a namespace. Everything else falls out of those two facts.

03Short-term: write events, get them back

You write to short-term memory with CreateEvent. Every event is keyed by actorId (who) and sessionId (which conversation). Payloads come in two shapes:

The high-level Python SDK wraps it cleanly:

from bedrock_agentcore.memory import MemorySessionManager from bedrock_agentcore.memory.constants import (   ConversationalMessage, MessageRole, )   mgr = MemorySessionManager(memory_id=MEMORY_ID, region_name="us-west-2") session = mgr.create_memory_session(   actor_id="User1",   session_id="OrderSupportSession1", )   session.add_turns(messages=[   ConversationalMessage("Hi, how can I help you today?", MessageRole.ASSISTANT), ]) session.add_turns(messages=[   ConversationalMessage(     "I just made an order, but it hasn't arrived. Order #35476.",     MessageRole.USER,   ), ])   for turn in session.get_last_k_turns(k=5):   print(turn)

Notice there's no "create a session" API call — sessions are an organisational concept. A session exists the moment you write the first event with a given sessionId.

Event branching is built in. The branch parameter on CreateEvent lets you fork from any prior event (rootEventId + name) — perfect for edited messages or "what if we tried this path instead." The original branch stays intact; you can switch back.

04Long-term: strategies do the extraction

By default, an AgentCore Memory only stores raw events. To get long-term memory, you attach one or more memory strategies when you call create_memory (or via update_memory later).

Built-in strategies, all from the Built-in strategies page:

Each strategy runs three internal steps powered by an LLM: Extraction (find useful insights in short-term), Consolidation (write to a new record or update an existing one), and Reflection (generate insights across episodes). Each step is driven by a system prompt with an output schema specific to that strategy. You can ship built-in with overrides strategies if you want to tweak the prompt or model.

Important footnote from the docs: "Long-term memory records will only be extracted from conversational events that are stored after a new strategy becomes ACTIVE. Conversations stored before a strategy is added will not be processed for long-term memory." So: add the strategy first, then have the conversation.

05Namespaces: how multi-tenant isolation actually works

Every long-term record lands inside a namespace, which is a hierarchical path like a file path. You set the template on the strategy at creation time and AgentCore Memory fills in the placeholders at extraction time. From the memory organization page:

namespaceTemplates
# Most granular — per-actor, per-session, per-strategy /strategy/{memoryStrategyId}/actor/{actorId}/session/{sessionId}/ # Resolved after extraction /strategy/summarization-93483043/actor/actor-9830m2w3/session/session-9330sds8/ # Variables available: {actorId}, {strategyId}, {sessionId} # Trailing / prevents prefix collisions: /actors/Alice/ /actors/AliceCorp/

Reconstruction from the memory-organization reference

Three rules the docs are explicit about:

PatternWhat it isolates
/strategy/{memoryStrategyId}/actor/{actorId}/session/{sessionId}/One record set per actor per session.
/strategy/{memoryStrategyId}/actor/{actorId}/One actor's memory across all their sessions.
/strategy/{memoryStrategyId}/All actors, scoped to a single strategy.
/Global. Everything in one bucket.

The namespace is also your IAM boundary. The condition keys bedrock-agentcore:namespace (exact match) and bedrock-agentcore:namespacePath (hierarchical prefix) let you write policies like "this role can only call RetrieveMemoryRecords on records under summaries/agent1/*." That's how a per-tenant role gets per-tenant memory access without standing up a per-tenant memory resource.

06Retrieving long-term records

Two read patterns. List by namespace prefix when you want everything under a path:

records = session.list_long_term_memory_records(namespace_path="/")

Semantic search when you want the top-k most relevant records to a query (this uses the embedding-backed semantic index that the SEMANTIC strategy maintains for you):

hits = session.search_long_term_memories(   query="can you summarize the support issue",   namespace_path="/",   top_k=3, )

The high-level Strands integration takes this even further — you configure a retrieval_config per namespace prefix and the agent automatically pulls the right slice on every turn:

retrieval_config = {   f"/users/{actor_id}/facts":           RetrievalConfig(top_k=3, relevance_score=0.5),   f"/summaries/{actor_id}/{session_id}": RetrievalConfig(top_k=3, relevance_score=0.5), }

This is the seam where AgentCore Memory and your agent runtime stop being two services and start feeling like one.

07Limits worth knowing

From the official quotas page:

And two non-quota gotchas: only conversational payloads flow into long-term memory, and strategies don't backfill — they only apply to events stored after the strategy is ACTIVE.

08Try it in five minutes

Assuming an existing agentcore project from yesterday's tip:

$ agentcore add memory \   --name CustomerSupportMemory \   --strategies SEMANTIC,USER_PREFERENCE $ agentcore deploy $ agentcore status  # wait for ACTIVE   $ python - <<'PY' import boto3 from bedrock_agentcore.memory import MemorySessionManager from bedrock_agentcore.memory.constants import ConversationalMessage, MessageRole   control = boto3.client("bedrock-agentcore-control", region_name="us-west-2") memory_id = control.list_memories()["memories"][0]["id"]   mgr = MemorySessionManager(memory_id=memory_id, region_name="us-west-2") s = mgr.create_memory_session(actor_id="User1", session_id="demo-1")   s.add_turns(messages=[ConversationalMessage("I prefer window seats and aisle access.", MessageRole.USER)]) s.add_turns(messages=[ConversationalMessage("Noted — I'll remember that.", MessageRole.ASSISTANT)])   for r in s.search_long_term_memories(query="seat preference", namespace_path="/", top_k=3):   print(r) PY

The very first call may return nothing — extraction is asynchronous. Give the strategy a beat, then re-run; the user-preference record should appear under the namespace you configured (default /users/{actorId}/preferences/ if you used the SDK example).

Tomorrow we'll look at AgentCore Identity — OAuth, credential vending, and how an agent gets a token to call a downstream tool on behalf of the user without you writing the auth code.

Verified against the official AWS docs on 2026-05-28.
Sources: Add memory to your AgentCore agent, Memory terminology, Memory organization, Get started with AgentCore Memory, Built-in strategies, Quotas for AgentCore.
If the docs change, this tip is a snapshot of that day — check the sources for current behaviour.
Heads up — this tip is from 2026-05-28. AWS services move fast. Cross-check the AgentCore developer guide before relying on specifics, then come back for today's tip →
C

This page — research, writing, verification, and deployment — was built by Claude Cowork. No human touched the prose, the layout, or the upload pipeline. The tip was generated this morning, cross-checked against the official AWS docs by an independent verification pass, and published to Cloudflare R2 on a schedule.

A daily experiment by Monty van Emmerik · vanemmerik.ai · what is Claude Cowork?