Gemini Enterprise Agent Platform and zero data retention

Google was the first in the industry to publish an AI/ML Privacy Commitment, which outlines our belief that customers should have the highest level of security and control over their data that is stored in the cloud. That commitment extends to Google Cloud's generative AI products. Google ensures that its teams are following these commitments through robust data governance practices, which include reviews of the data that Google Cloud uses in the development of its products. More details about how Google processes data can also be found in Google's Cloud Data Processing Addendum (CDPA).

Training restriction

As outlined in "Training Restriction" in the Service Terms section of the Service Specific Terms, Google won't use your data to train or fine-tune any AI/ML models without your prior permission or instruction. This applies to all managed models on Gemini Enterprise Agent Platform, including GA and pre-GA models.

Customer data retention and achieving zero data retention

Customer data is retained in Gemini Enterprise Agent Platform for Models as a Service (MaaS) for limited periods of time in the following scenarios and conditions. To achieve zero data retention, customers must take specific actions within each of these areas:

  • Prompt logging for abuse monitoring for Google models: As outlined in Section 4.3 "Generative AI Safety and Abuse" of Google Cloud Platform Terms of Service, Google may log prompts to detect potential abuse and violations of its Acceptable Use Policy and Prohibited Use Policy as part of providing generative AI services to customers. Only customers whose use of Google Cloud is governed by the Google Cloud Platform Terms of Service are subject to prompt logging for abuse monitoring. If you are in scope for prompt logging for abuse monitoring and want zero data retention, you can request an exception for abuse monitoring. See Abuse monitoring.

  • Prompt and response logging for abuse monitoring for Advanced AI models: Certain models or features may also be subject to additional prompt and response logging to prevent abuse, as described in the Advanced AI Safety Addendum. Zero data retention may not be possible when using some Advanced AI features. Please contact your account team for clarification. See Abuse monitoring for more information.

  • Grounding with Google Search: As outlined in Section 20 "Generative AI Services: Grounding with Google Search" of the Service Specific Terms, Google collects and stores logs, which contains the following Customer Data: queries derived from End User prompts and contextual information that Customer may provide along with the prompts that are not associated with any Customer or its End Users for up to three (3) days, this stored information may be used for debugging of systems that support Grounding with Google Search. There is no way to disable the storage of this information if you use Grounding with Google Search. If you require zero data retention, we recommend using Web Grounding for Enterprise.

  • Grounding with Google Maps: As outlined in Section 20 "Generative AI Services: Grounding with Google Maps" of the Service Specific Terms, Google stores prompts and contextual information that customers may provide, and generated output for thirty (30) days for the purposes of creating grounded results, and this stored information may only be used for reliability engineering, such as debugging in case of service issues, of systems that support grounding with Google Maps. There is no way to disable the storage of this information if you use Grounding with Google Maps.

  • Request-response logging: This feature is disabled by default. It can be enabled using a configuration setting on a per-model, per-project basis. Enabling this logging causes certain requests and responses to the specified model to be written to a designated BigQuery table. To achieve zero data retention, do not enable this feature. For more information about this feature, including how to enable or disable it, or read the current configuration setting, see Log requests and responses.

  • Interactions API: When using the Interactions API with store = true, Google stores user data (such as prompts, responses, and conversation state) to enable multi-turn conversations and later retrieval. If you do not specify a value for store, it defaults to true for all models. To achieve zero data retention, explicitly set store = false in your API requests.

This applies to all managed models on Gemini Enterprise Agent Platform, including GA and pre-GA models.

Agent products

To achieve zero data retention for agent products, customers must adhere to the following conditions and retention schedules for each product:

  • CodeMender session data — To enable resumption of long-running find and fix scans, CodeMender stores session state in Spanner. While a scan is in progress, session data — including target source code snippets, diffs, configuration, and analysis checkpoints — is stored encrypted for up to seven (7) days from session creation. When a session reaches a terminal state, source code and related content are cleared within seconds; the remaining session record is deleted automatically at the seven-day TTL. Customers can delete a session (removing all associated data) before the TTL expires.

  • Deep Research agent session data — Google stores prompts and session data - including search results and generated images - via the Interactions API for a period of seven (7) days. This session data is encrypted at rest, and is deleted automatically at the end of the seven-day TTL. Customers can delete a session (removing all associated data) before the TTL expires. This feature cannot be disabled when using the Deep Research agent.

  • Agent Platform Sandbox Snapshots: If you use the Snapshot API to persist Sandbox state, these snapshots are stored only for the duration of the Sandbox TTL. To achieve zero-data-retention, don't use the Sandbox API.

Google models

To achieve zero data retention for Google trained models, customers must take additional specific actions within each of these areas:

Session resumption for Gemini Live API

Session resumption for Gemini Live API is disabled by default. It must be enabled by the user every time they call the API by specifying the field in the API request, and project-level privacy is enforced for cached data. Enabling Session Resumption allows the user to reconnect to a previous session within 24 hours by storing cached data, including text, video, and audio prompt data and model outputs, for up to 24 hours. To achieve zero data retention, do not enable this feature. For more information about this feature, including how to enable it, see Gemini Live API.

Implicit data caching

By default, Google's published Gemini models cache Customer Data to reduce latency and accelerate responses. Implicit caching uses two storage tiers:

  • In-memory caching: Enabled by default for supported Gemini models.
  • Durable caching: Enabled by default for supported Gemini models. For the list of supported models, see Context caching overview.

In-memory data caching

Implicit caching stores Customer Data (inputs, outputs, and derived data) in memory. In-memory cached data has the following properties:

  • It's stored only in memory, not at rest.
  • It's scoped to your project and is never served to another project.
  • It's deleted no later than 24 hours after it's written.
  • It's processed in the region that serves the request.
  • It's used only to serve your requests faster, and is never used to train or fine-tune models.

Durable data caching

On models that support durable caching, when in-memory cache capacity is exhausted, Google stores derived cache data (key-value representations computed from your inputs) in durable storage within the Agent Platform serving environment. Durable cached data has the following properties:

  • It's stored at rest and encrypted with Google default encryption.
  • It's scoped to your project and is never served to another project.
  • It's deleted no later than 24 hours after it's written, and is often evicted sooner.
  • It stays within the selected location and adheres to its Data Residency requirements when you use a regional or multi-regional endpoint. When you use the global endpoint, requests and their cached data can be served from any region.
  • It's used only to serve your requests faster, and is never used to train or fine-tune models.

Customer-managed encryption keys (CMEK) aren't supported for durable caching.

Control data caching

If your organization's policy does not permit Customer Data to be stored at rest, you can disable durable caching on a per-project basis and maintain in-memory caching. Alternatively, you can disable caching entirely. To disable durable caching across your organization rather than on a project level, contact your account team.

Enable and disable data caching

You can use the following curl commands to get caching status, disable caching, re-enable caching, or turn durable caching off and on. Turning off caching disables both in-memory caching and durable caching. When you disable or re-enable caching, the change applies to all Google Cloud regions. For more information about using Identity and Access Management to grant permissions required to enable or disable caching, see Gemini Enterprise Agent Platform access control with IAM. Expand the following sections to learn how to get the current cache setting, to disable caching, to enable caching, and to turn durable caching off and on.

Get current caching setting

Run the following command to check whether in-memory caching and durable caching are enabled for a project. To run this command, a user must be granted one of the following roles: roles/aiplatform.viewer, roles/aiplatform.user, or roles/aiplatform.admin.

PROJECT_ID=PROJECT_ID
# Setup project_id
$ gcloud config set project PROJECT_ID

# GetCacheConfig
$ curl -X GET \
    -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \
    -H "Content-Type: application/json" \
    https://us-central1-aiplatform.googleapis.com/v1/projects/PROJECT_ID/cacheConfig

# Response if durable caching and in-memory caching are enabled (default).
{
  "name": "projects/PROJECT_ID/cacheConfig",
  "retentionConfig": {
    "retentionType": "DURABLE"
  }
}

# Response if durable caching is turned off and in-memory caching is enabled.
{
  "name": "projects/PROJECT_ID/cacheConfig",
  "retentionConfig": {
    "retentionType": "EPHEMERAL"
  }
}

# Response if all caching is turned off.
{
  "name": "projects/PROJECT_ID/cacheConfig",
  "disableCache": true
}
    

Turn off caching

Run the following curl command to turn off all caching for a Google Cloud project. This disables both in-memory caching and durable caching, and no cached data is retained. To run this command, a user must be granted the Gemini Enterprise Agent Platform administrator role, roles/aiplatform.admin.

PROJECT_ID=PROJECT_ID
# Setup project_id
$ gcloud config set project PROJECT_ID

# Turn off all caching.
$ curl -X PATCH \
    -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \
    -H "Content-Type: application/json" \
    https://us-central1-aiplatform.googleapis.com/v1/projects/PROJECT_ID/cacheConfig \
    -d '{
      "name": "projects/PROJECT_ID/cacheConfig",
      "disableCache": true
    }'

# A successful response confirms that caching is turned off for the project.
{
  "name": "projects/PROJECT_ID/locations/us-central1/projects/PROJECT_ID/cacheConfig/operations/${OPERATION_ID}",
  "done": true,
  "response": {
    "@type": "type.googleapis.com/google.protobuf.Empty"
  }
}
    

To keep in-memory caching and turn off only durable caching, see Turn off durable caching.

Enable caching

If you disabled caching for a Google Cloud project and want re-enable it, run the following curl command. To run this command, a user must be granted the Gemini Enterprise Agent Platform administrator role, roles/aiplatform.admin.

PROJECT_ID=PROJECT_ID
LOCATION_ID="us-central1"
# Setup project_id
$ gcloud config set project PROJECT_ID

# Setup project_id.
$ gcloud config set project ${PROJECT_ID}

# Opt in to caching.
$ curl -X PATCH     -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" -H "Content-Type: application/json" https://us-central1-aiplatform.googleapis.com/v1/projects/PROJECT_ID/cacheConfig -d '{
  "name": "projects/PROJECT_ID/cacheConfig",
  "disableCache": false
}'

# A successful response confirms that caching is turned on for the project.
{
  "name": "projects/PROJECT_ID/locations/us-central1/projects/PROJECT_ID/cacheConfig/operations/${OPERATION_NUMBER}",
  "done": true,
  "response": {
    "@type": "type.googleapis.com/google.protobuf.Empty"
  }
}
    

Turn off durable caching

Run the following curl command to turn off durable caching and keep in-memory caching for a Google Cloud project. To run this command, a user must be granted the Gemini Enterprise Agent Platform administrator role, roles/aiplatform.admin.

PROJECT_ID=PROJECT_ID
# Setup project_id
gcloud config set project PROJECT_ID

# Turn off durable caching.
curl -X PATCH \
    -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \
    -H "Content-Type: application/json" \
    https://us-central1-aiplatform.googleapis.com/v1/projects/PROJECT_ID/cacheConfig \
    -d '{
      "name": "projects/PROJECT_ID/cacheConfig",
      "disableCache": false,
      "retentionConfig": {
        "retentionType": "EPHEMERAL"
      }
    }'

# A successful response confirms that durable caching is turned off and in-memory caching stays on.
{
  "name": "projects/PROJECT_ID/locations/us-central1/projects/PROJECT_ID/cacheConfig/operations/${OPERATION_ID}",
  "done": true,
  "response": {
    "@type": "type.googleapis.com/google.protobuf.Empty"
  }
}
    

Turn on durable caching

If you turned off durable caching for a Google Cloud project and want to turn it back on, run the following curl command. To run this command, a user must be granted the Gemini Enterprise Agent Platform administrator role, roles/aiplatform.admin.

PROJECT_ID=PROJECT_ID
# Setup project_id
gcloud config set project PROJECT_ID

# Turn on durable caching.
curl -X PATCH \
    -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \
    -H "Content-Type: application/json" \
    https://us-central1-aiplatform.googleapis.com/v1/projects/PROJECT_ID/cacheConfig \
    -d '{
      "name": "projects/PROJECT_ID/cacheConfig",
      "disableCache": false,
      "retentionConfig": {
        "retentionType": "DURABLE"
      }
    }'

# A successful response confirms that durable caching is turned on for the project.
{
  "name": "projects/PROJECT_ID/locations/us-central1/projects/PROJECT_ID/cacheConfig/operations/${OPERATION_ID}",
  "done": true,
  "response": {
    "@type": "type.googleapis.com/google.protobuf.Empty"
  }
}
    

What's next

Overview

Learn about some of the limitations to generative AI and recommended practices for using generative AI.

Overview

Learn how Gemini for Google Cloud conforms to Google's privacy commitment with generative AI technologies.