Introducing Memory Bank: Building Stateful, Personalized AI Agents with Long-Term Memory
Published: July 8, 2025
Google Cloud just announced Memory Bank, the latest managed service for the Vertex AI Agent Engine, is now available for everyone in public preview.
This launch provides developers with a powerful, out-of-the-box solution to a long-standing challenge in AI: the absence of memory.
With Memory Bank, you can now build truly stateful and highly personalized conversational agents that deliver more natural and continuous user engagement.
Until now, agents treated every interaction as their first. This led to repetitive questions, an inability to recall user preferences, and a frustrating, impersonal user experience. Common workarounds, like inserting conversation history into an LLM's context window, are not only expensive and inefficient but can also degrade model performance.
Memory Bank directly solves this by giving your agents persistent, long-term memory, empowering them to remember context across multiple sessions, even those days or weeks apart.
Technical Deep Dive: How Memory Bank Works
Memory Bank is a significant technical innovation grounded in cutting-edge research from Google Cloud AI Research. The core methodology, which introduces an intelligent, topic-based approach to how agents learn and recall information, has been accepted at the prestigious ACL 2025 conference, setting a new performance standard for agent memory.
The service is engineered as a seamless, managed experience that handles the complexities of memory management. Here’s a look under the hood.
1. Understands and Extracts Memories Asynchronously
At its core, Memory Bank leverages the power of Gemini to analyze conversation history. As a user interacts with your agent, Memory Bank works in the background to automatically extract key facts, details, and preferences. This process is asynchronous, ensuring that memory generation doesn't introduce latency into the live conversation. Developers are freed from building complex and brittle data pipelines to parse and interpret dialogue.
2. Stores and Updates Memories Intelligently
Extracted information is persistently stored. But Memory Bank goes beyond simple storage; it actively manages the memory. It intelligently consolidates new information as it arises. For instance, if a user updates a preference, the memory is updated. Crucially, the system is designed to resolve contradictions. If a user provides conflicting information, Memory Bank's logic works to keep the stored memories accurate and up-to-date, ensuring the agent operates from the most reliable information.
3. Recalls Relevant Information with Advanced Search
When a user begins a new conversation, the agent can instantly query Memory Bank to retrieve relevant context. Two powerful retrieval methods are available:
Simple Lookup: For retrieving specific, known pieces of information directly.
Advanced Similarity Search: This is where the topic-based research shines. The agent can find the most relevant context for the current topic, even if the user doesn't explicitly mention the stored fact. The system searches for semantically similar memories, ensuring conversations are always context-aware.
Example in Action: A Personal Beauty Companion Agent
Let's illustrate these technical concepts with the example of a personal beauty companion agent built with the Agent Development Kit (ADK) and enhanced with Memory Bank.
Session 1: Initial Interaction
A user, Allie, starts a conversation with the beauty agent.
Allie: "Hi, I'm looking for a new moisturizer. I have really sensitive skin and I try to only use vegan products."
In the background, Memory Bank's asynchronous process, powered by Gemini, analyzes this interaction and extracts key information. It populates its memory store for Allie:
user_id: "allie123"
memory_entry_1: { "topic": "skincare", "fact": "skin_type", "value": "sensitive" }
memory_entry_2: { "topic": "product_preference", "fact": "ethos", "value": "vegan" }
Session 2: A Week Later
Allie returns to the agent.
Allie: "I have a friend's wedding coming up. Can you recommend a good foundation?"
Allie doesn't mention their sensitive skin or vegan preference. A stateless agent would provide generic recommendations. But this agent, equipped with Memory Bank, performs an advanced similarity search on the query "recommend a good foundation." The system identifies that "foundation" is semantically related to the "skincare" and "product_preference" topics already stored.
The agent instantly retrieves the memories skin_type: 'sensitive' and preference: 'vegan'. It uses this context to shape its response:
Agent: "Of course! For your sensitive skin, it's important to use a gentle, non-comedogenic foundation. Based on your preference for vegan products, I recommend 'Ethereal Glow Foundation.' It's highly rated for sensitive skin, completely vegan, and provides great coverage for events like a wedding."
The agent has delivered a highly personalized, relevant, and helpful recommendation without forcing Allie to repeat themselves.
Easy GCP Integration for ADK Developers
For developers building with the Agent Development Kit (ADK), Memory Bank is the key to unlocking this next level of personalization. And if you are new to Google Cloud, getting started has never been easier. You can now use the newly supported express mode registration to try Agent Engine Sessions and Memory Bank for free.
Here’s how it works:
Sign up with a Gmail account to receive an API key.
Use the key to access Agent Engine Sessions and Memory Bank.
Build and test your ADK agent within the free tier usage quotas.
Seamlessly upgrade to a full Google Cloud project when you are ready for production.
Get Started Today
We encourage you to explore the public preview of Memory Bank and see what you can build.
Read the Official Announcement
Explore Hands-On Examples: Check out our sample notebooks for integration with the ADK, CrewAI, and LangGraph on the Google Cloud Generative AI GitHub repository.
Your feedback has been invaluable in shaping this product, and we look forward to seeing the incredible, stateful agents you create.
