
Memory Bank is Agent Platform's managed long-term memory for storing meaningful facts about individual users across separate conversations. On the Professional Agentic Architect exam, Memory Bank often appears alongside session state, prompt history, and caching mechanisms. Knowing how it extracts and consolidates facts, how ADK scopes those memories, and where its boundaries sit makes it straightforward to choose the right persistence pattern for a given workload.
Instead of keeping raw transcripts, Memory Bank extracts only the facts worth remembering from conversations using GenerateMemories. Developers do not have to write custom extraction logic for every kind of preference or detail a user might mention in passing. Extracted memories are stored per user and remain available when that user starts later sessions.
On the retrieval side, adding PreloadMemoryTool to an ADK agent pulls the relevant memories at the start of each turn. Because the agent begins the turn with those facts already loaded, users do not have to repeat preferences or background details they shared in earlier chats.
Memory Bank's defining behavior is consolidation. Each time Memory Bank generates a new memory, it compares that candidate against existing memories within the same scope and updates, merges, or deletes entries that are duplicative or contradictory. This mechanism is what allows a changed user preference to replace an older one rather than leaving conflicting facts in place.
Because consolidation only compares memories inside the same scope, scoping configuration directly determines whether consolidation works as intended. In ADK, memories are scoped by user_id and app_name. The user_id should be a stable identifier for the person, the same in every session, so that all of that user's memories land in one shared scope. Memory Bank never compares entries across different scopes, so anything that splits one person's memories across several user_id values also splits consolidation.
Memory Bank also has configuration settings that shape how memories are generated and kept. All of them operate within whatever scopes the application creates:
disable_consolidation tells Memory Bank to store every new memory without comparing it against existing ones, which creates duplicates.revisions_per_candidate_count makes fact extraction more consistent.The Professional Agentic Architect exam frequently contrasts Memory Bank with simpler ways of carrying context across sessions. Each alternative handles persistence differently and introduces trade-offs when the goal is recalling casual user facts across many conversations:
user: state: A state key with the user: prefix persists across sessions, but storing full conversation transcripts grows without limit and fills every prompt with irrelevant text.app: prefix: State keys using the app: prefix are shared across all users of the application, which would expose one user's details in other users' conversations.Memory Bank avoids these issues by keeping only the meaningful, per-user facts extracted automatically from conversation rather than raw transcripts, shared application state, or manual forms.
The same behaviors that make Memory Bank effective for long-term user facts also establish clear boundaries for when to use another tool.
First, Memory Bank is scoped per user, so it is not a response cache shared across users. Its memories come from one user's conversations and are retrieved for that same user. Cost and latency across a whole application are shaped at a different layer, such as model routing that matches the size of the model to the complexity of each request.
Second, because Memory Bank holds long-term facts about a user across sessions and consolidates them, it is the wrong place to store a task status that changes over time. Work in progress belongs to the conversation, which makes session state its natural home. For work that runs outside the agent, ADK provides LongRunningFunctionTool, which starts and manages external tasks, can return an initial result such as an operation ID, and lets the client send updates back to the agent when the external system responds.
How state is written matters as much as where it lives. Writes to tool_context.state become part of the event's state delta, which is what a managed session service, such as the managed sessions on Agent Runtime, persists with the session. Keys with the temp: prefix are discarded after each invocation, so they only hold values needed within that invocation. Assigning directly to session.state on a session retrieved in client code bypasses the event mechanism, so those changes are likely not saved.
Our Professional Agentic Architect practice exams test Memory Bank and consolidation scoping alongside managed sessions and ADK state prefixes, with detailed explanations that drill these distinctions.