Compare

Vertex AI Memory Bank: how it works and when to use it

Vertex AI Memory Bank is Google Cloud’s managed long-term memory service for agents built with the Agent Platform and Google ADK. It generates memories from conversations, consolidates them with existing memories and exposes semantic retrieval through the ADK MemoryService interface. It is the natural choice when the agent is already committed to Google Cloud; a portable memory layer is the better fit when the same memory must serve several clouds, frameworks or products.

Updated November 5, 202612 min readAI Memory field guide
A managed Google Cloud memory bank generating memory profiles and serving retrieval to an ADK agent.

What is Vertex AI Memory Bank?

Memory Bank is a managed service in Google Cloud’s Agent Platform that stores long-term user preferences and facts for conversational agents. It sits beside Agent Platform sessions: sessions keep the state of a conversation, while Memory Bank keeps the information that should survive it.

Google describes Memory Bank as generating memories from session events, consolidating new information with existing memories and returning relevant memories through a search API. The service is managed, so the team does not operate the extraction, storage and retrieval pipeline itself. The application still owns product identity, authorization, user experience and the decision about which remembered facts may influence an action.

How does Memory Bank work with Google ADK?

Google ADK exposes long-term memory through the `MemoryService` interface. The Python SDK ships three implementations: `InMemoryMemoryService` for prototyping, `VertexAiMemoryBankService` for managed, evolving memories and `VertexAiRagMemoryService` for vector retrieval over the full conversation corpus or other indexed content.

The interface separates ingestion from retrieval. `add_session_to_memory` ingests a completed session, `add_events_to_memory` appends a delta of events and `add_memory` writes explicit `MemoryEntry` objects. `search_memory` retrieves relevant snippets or context, usually inside a tool. Not every service implements every optional write method, so confirm support before relying on it.

MemoryServicePersistenceBest fit
InMemoryMemoryServiceNone; lost on restartPrototyping and local tests
VertexAiMemoryBankServiceManaged by the Agent PlatformAgents that must learn from past conversations
VertexAiRagMemoryServiceKnowledge EngineVector retrieval over full transcripts or RAG content

How does Memory Bank generate long-term memory?

The usual flow is session-first. The agent completes a conversation, the application sends the session’s events to Memory Bank, and the service processes them into durable memories. Generation is powered by an LLM and consolidation merges new information with what the user already has, so the result is an extracted memory rather than a replay of the transcript.

This is an asynchronous path. A fact written in the current turn may not be available from long-term retrieval immediately. Read-after-write behavior should use the session event or application state until generation completes. Decide explicitly which events are eligible: not every message deserves to become a permanent memory.

  • Send completed sessions, not every intermediate turn.
  • Define which facts, preferences and outcomes are eligible for extraction.
  • Expect eventual consistency between the event write and memory retrieval.
  • Keep the source session or event for provenance and correction.
  • Do not treat a generated memory as the authoritative account record.

How do you retrieve and correct memories?

Retrieval normally happens through a tool that calls `search_memory` with the current user and query. The service returns relevant memories, and the agent decides how to use them. Keep the retrieval result small and relevant: a large memory block can crowd out the current conversation and the source systems the agent must inspect.

Memory Bank documents memory profiles, memory revisions and IAM Conditions. Use revisions to understand how a memory changed, and correction flows to supersede a wrong fact rather than adding a second contradictory one. Deletion and export must be verified against the current API, region and SDK; the managed service does not remove copies your application, logs or vector indexes already made.

How should you scope Memory Bank users and tenants?

Memory Bank is organized around a user and the Agent Platform project. Use an application user identifier that is stable and opaque, and resolve the tenant before calling the service. Google Cloud IAM Conditions can restrict access to Memory Bank resources, but application authorization still decides which user and tenant may read a memory.

Do not pass a model-generated tenant identifier into the memory call. Derive the scope from the authenticated request, then apply it consistently to the session, the memory write and the retrieval query. If one Google Cloud project serves several tenants, document the isolation boundary and test it with two semantically similar users.

  • Use an opaque, stable application user ID.
  • Resolve tenant and product scope from trusted request context.
  • Apply IAM Conditions at the cloud boundary and application checks at the product boundary.
  • Keep the same scope on session events, memory writes and retrieval.
  • Test a wrong-tenant request before production.

How should you evaluate Memory Bank pricing?

Use the official Agent Platform pricing page and model the complete memory loop: memory generation, stored memories, retrieval calls, returned context and the model tokens those results consume. A storage price alone is not the memory cost, because irrelevant retrieval can add more model cost than the memory saves.

Recheck the current SKU and region before committing to a budget. Managed prices and free tiers change, and the cost of a memory generation depends on how often sessions are ingested and how much text is processed. Measure the same workload you would use for any other memory provider rather than copying a headline rate from an article.

What are the limits and tradeoffs of Memory Bank?

The strongest advantage is native integration: Agent Platform sessions, ADK, Google Cloud IAM, project boundaries and managed memory generation reduce the undifferentiated work for a team already standardized on Google Cloud. The service is a Google Cloud primitive, so portability across clouds and non-ADK agent frameworks is a separate architectural concern.

The extraction and consolidation are managed, which also means the team has less direct control over the exact memory representation. Asynchronous generation, region availability, IAM configuration and the current API surface all become part of the release design. Keep a provider-neutral memory contract when the product may change frameworks or clouds.

DecisionChoose Memory Bank whenChoose a neutral layer when
Cloud strategyGoogle Cloud is the committed platformMulti-cloud or cloud-agnostic deployment matters
Agent runtimeYou use ADK and Agent PlatformYou run LangGraph, OpenAI SDK, CrewAI or several runtimes
ControlsGoogle Cloud IAM, projects and regions meet the modelYou need one memory control plane across products and clouds
Memory shapeManaged extraction and consolidation are acceptableYou need direct control over extraction, merge and provenance
Exit pathMigration cost is acceptableExport and provider portability are hard requirements

How does Memory Bank compare with AWS AgentCore Memory?

Both are managed cloud memory services that separate short-term session state from extracted long-term memory. Both offer semantic retrieval and a native path for their own agent platform. The practical difference is the cloud, IAM model, agent runtime and exit path, not a universal quality ranking.

DimensionVertex AI Memory BankAWS AgentCore Memory
Native runtimeGoogle ADK and Agent PlatformAmazon Bedrock AgentCore
Identity and policyGoogle Cloud IAM and IAM ConditionsAWS IAM, KMS and namespaces
Memory modelGenerated memories, profiles and revisionsSession events plus strategy-based long-term records
PortabilityGoogle Cloud-specificAWS-specific
Best fitTeams committed to Google Cloud and ADKTeams committed to AWS and Bedrock

How should you test Memory Bank before production?

Run the same evaluation suite you would use for any memory provider: current-fact recall, contradiction resolution, irrelevant recall, scope isolation, deletion, generation latency and complete token cost. Add Google Cloud-specific tests for IAM Conditions, project boundaries, memory revisions and the behavior between event ingestion and memory availability.

Test the managed generation path with realistic conversations, not only explicit `add_memory` calls. A fact that is easy to ingest directly may be missed or consolidated differently when the service extracts it from a session. Record the source session and the resulting memory so a wrong fact can be traced and corrected.

TestPass condition
Session ingestionThe expected memory appears after generation completes
Read-after-writeThe agent behaves correctly before generation finishes
Wrong tenantNo memory from another scope is returned
Fact correctionThe current fact wins and the revision history is visible
Irrelevant recallUnrelated memories do not crowd the context
DeletionThe user disappears from retrieval and derived copies
PortabilityThe exported contract can be replayed into another provider

When is Vertex AI Memory Bank the right choice?

Choose Memory Bank when the agent runs on Google Cloud and ADK, the team wants managed memory generation and retrieval, and the product can accept a Google Cloud-centered architecture. Add or choose a model-neutral memory layer when multiple frameworks, clouds, regions or exit paths are first-class requirements.

Frequently asked questions

What is Vertex AI Memory Bank?

It is a managed Google Cloud service that generates, stores and retrieves long-term memories for conversational agents. It is used with Agent Platform sessions and Google ADK.

How does Memory Bank work with Google ADK?

ADK exposes it through the `VertexAiMemoryBankService` implementation of the MemoryService interface. The agent can ingest sessions or events and retrieve memories with `search_memory`.

Is Memory Bank the same thing as RAG?

No. RAG retrieves documents or passages for a query. Memory Bank extracts and consolidates durable facts and preferences from conversations, then retrieves them as long-term memory.

How much does Vertex AI Memory Bank cost?

Pricing depends on the current Agent Platform SKU, region, memory generation, storage and retrieval volume. Model the complete loop on the official pricing page rather than copying a headline rate.

Can you export or delete Memory Bank records?

Use the documented memory management APIs and IAM controls for the current region and SDK. Verify deletion of the user, derived memories, revisions and any application-side copies before relying on it.

When should I use a portable memory API instead?

Use a neutral layer when the same memory must serve several clouds, agent frameworks or products, or when centralized export, correction and deletion are more important than native Google Cloud integration.

Evaluate the managed path and the exit path

Model one generated memory, one retrieval, one correction and one deletion in Memory Bank. Then compare the native ADK path with the portability your product actually requires.

Vertex AI Memory Bank: Pricing, Limits & Alternatives | AI Memory