Announcing customization features for Vertex AI Memory Bank


Hey everyone,

For those who missed it, I wanted to share some exciting news from the Vertex AI team. Vertex AI just launched new customization capabilities for Vertex AI Memory Bank!

This update is focused on giving you more control over your AI agent’s memory lifecycle. It directly addresses your feedback for more customization and flexibility when building stateful, context-aware AI applications.

Let’s dive into what’s new.

What’s New in Memory Bank

Here are four key features in this release:

1. Manage Memory Lifespan with Time-to-Live (TTL)

You can now automatically manage how long memories are stored. The new TTL configuration allows you to set an expiration duration for memories, ensuring your agent’s knowledge stays fresh, relevant, and free of clutter. This is perfect for memories that are only useful for a limited time.

Here’s how simple it is to get started:

# Set memories to automatically expire after 30 days
from vertexai.types import ReasoningEngineContextSpecMemoryBankConfig as MemoryBankConfig
from vertexai.types import ReasoningEngineContextSpecMemoryBankConfigTtlConfig as TtlConfig

memory_bank_config = MemoryBankConfig(
    ttl_config=TtlConfig(
        default_ttl="2592000s" # 30 days in seconds
    )
)

2. Teach Your Agent What to Remember with Custom Topics

You can now guide your agent on what information is meaningful enough to persist as memory. Use a combination of managed topics (like USER_PREFERENCES) and your own custom topics to tailor the agent’s knowledge to your specific business domain.

# Define what's important for your agent to remember
from vertexai.types import (
    MemoryBankCustomizationConfig as CustomizationConfig,
    MemoryBankCustomizationConfigMemoryTopic as MemoryTopic,
    MemoryBankCustomizationConfigMemoryTopicCustomMemoryTopic as CustomTopic,
    ManagedTopicEnum
)

customization_config = CustomizationConfig(
    memory_topics=[
        MemoryTopic(
            managed_memory_topic={"managed_topic_enum": ManagedTopicEnum.USER_PREFERENCES}
        ),
        MemoryTopic(
            custom_memory_topic=CustomTopic(
                label="business_feedback",
                description="Specific user feedback about their experience."
            )
        )
    ]
)

3. Demonstrate How to Remember with Few-Shot Examples

To achieve even higher accuracy, you can now provide few-shot examples that demonstrate the exact memory extraction behavior you expect. Provide sample conversations and the desired memory outputs to show your agent how to handle real-world scenarios correctly.

# Show your agent how to extract a memory from a conversation
from vertexai.types import MemoryBankCustomizationConfigGenerateMemoriesExample as GenerateMemoriesExample

example = GenerateMemoriesExample(
    conversation_source={ # Sample conversation events...
        "events": [...]
    },
    generated_memories=[{
        "fact": "The user felt the music in the shop was too loud."
    }]
)

4. Customize Your Engine with Model Selection

You now have the power to choose the underlying models for memory operations. Configure the embedding_model for similarity search—perfect for multilingual use cases—and the generation_model for extracting and consolidating memories, allowing you to balance cost and performance.

# Choose the models for search and generation
from vertexai.types import (
    ReasoningEngineContextSpecMemoryBankConfig as MemoryBankConfig,
    ReasoningEngineContextSpecMemoryBankConfigSimilaritySearchConfig as SimilaritySearchConfig,
    ReasoningEngineContextSpecMemoryBankConfigGenerationConfig as GenerationConfig
)

memory_bank_config = MemoryBankConfig(
    similarity_search_config=SimilaritySearchConfig(
        embedding_model="text-multilingual-embedding-002"
    ),
    generation_config=GenerationConfig(
        model="gemini-2.5-flash"
    )
)

What’s Next

These new configuration features are available now through the Vertex AI SDK (version 1.104.0 and higher). You can start using them by creating or updating your Agent Engine instance. We have detailed guides in our documentation to help you get started.

While you explore these new capabilities, we’d love for you to share your thoughts, questions, and feedback right here or feel free to connect on LinkedIn or X/Twitter.

Stay tuned!

1 Like

Can we use models from other providers for the generation and similarity search