Skip to content

vertexai: add memory customization fields to google_vertex_ai_reasoning_engine - #18577

Open
wadhah101 wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
wadhah101:vertexai-memorybank-memory-customization
Open

vertexai: add memory customization fields to google_vertex_ai_reasoning_engine#18577
wadhah101 wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
wadhah101:vertexai-memorybank-memory-customization

Conversation

@wadhah101

Copy link
Copy Markdown
Contributor

Follow-up to #18498, split out per reviewer request.

Adds the two remaining contextSpec.memoryBankConfig.customizationConfigs[] fields for API parity:

  • disable_natural_language_memories
  • generate_memories_examples (few-shot examples: input conversation → expected memories)

On documentation: the REST API reference page is not up to date — its MemoryBankConfig section omits customizationConfigs entirely. The fields are public and documented in:

Per-attribute source references are added as inline review comments on the YAML.

Test coverage: new handwritten TestAccVertexAIReasoningEngine_memoryCustomizationUpdate exercises both fields (create with examples + managed/custom topics, update to structured-only with NL memories disabled, import verify at each step), and the vertex_ai_reasoning_engine_context_spec example now includes generate_memories_examples.

Release Note Template for Downstream PRs (will be copied)

vertexai: added `context_spec.memory_bank_config.customization_configs.disable_natural_language_memories` and `context_spec.memory_bank_config.customization_configs.generate_memories_examples` fields to `google_vertex_ai_reasoning_engine` (beta)

…ing Engine

feat(tests): implement tests for new memory customization features in Reasoning Engine
The commit introduces new customizable properties in the Reasoning Engine's YAML configuration, specifically for managing memory generation. This includes the ability to disable natural language memory generation and provide example memory configurations. Additionally, tests are added to verify the expected behavior of these changes, ensuring robustness and reliability as the system evolves.
@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Aug 10, 2026

@wadhah101 wadhah101 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inline source references for each new attribute — note the REST API reference page is not up to date: its MemoryBankConfig section currently omits customizationConfigs, so the references below point to the discovery document and the published guides.

type: Boolean
description: |-
Optional. Generate memories in the third person if set to true.
- name: 'disableNaturalLanguageMemories'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Source: disableNaturalLanguageMemories in GoogleCloudAiplatformV1beta1MemoryBankCustomizationConfig (v1beta1 discovery doc):

Optional. Indicates whether natural language memory generation should be disabled for all requests. By default, natural language memory generation is enabled. Set this to true when you only want to generate structured memories.

Also documented in the Memory Profiles guide and the Python SDK type reference. Not yet listed on the REST reference page (API docs page is out of date).

Optional. If true, natural language memory generation is disabled for the
scopes that this customization config applies to. Set this to true when you
only want to generate structured memories.
- name: 'generateMemoriesExamples'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Source: generateMemoriesExamples in GoogleCloudAiplatformV1beta1MemoryBankCustomizationConfig (v1beta1 discovery doc):

Optional. Provides examples of how to generate memories for a particular scope.

Nested types: ...GenerateMemoriesExample (conversationSource, generatedMemories), ...ConversationSource (events[].content), ...GeneratedMemory (fact — Required, topics). Usage documented with code samples in the Memory Bank setup guide — "Natural language memory customization configuration" and the Python SDK type reference. Not yet listed on the REST reference page (API docs page is out of date).

item_type:
type: NestedObject
properties:
- name: 'managedMemoryTopic'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Source: topics[] is GoogleCloudAiplatformV1beta1MemoryTopicId in the discovery doc: managedMemoryTopic (enum: USER_PERSONAL_INFO, USER_PREFERENCES, KEY_CONVERSATION_DETAILS, EXPLICIT_INSTRUCTIONS) or customMemoryTopicLabel (string). Modeled as plain strings to match the API shape.

@github-actions
github-actions Bot requested a review from slevenick August 10, 2026 17:09
@github-actions

Copy link
Copy Markdown

Googlers: For automatic test runs see go/terraform-auto-test-runs.

@slevenick, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.

You can help make sure that review is quick by doing a self-review and by running impacted tests locally.

@wadhah101

Copy link
Copy Markdown
Contributor Author

hey @BBBmau can you check this ? I have added all references to attributes not yet included in the API page, but included in the rest version https://aiplatform.googleapis.com/$discovery/rest?version=v1beta1

@slevenick
slevenick requested review from BBBmau and removed request for slevenick August 10, 2026 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-approval Pull requests that need reviewer's approval to run presubmit tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants