> [!WARNING]
>
> **Preview**
>
>
> This product is
>
> subject to the "Pre-GA Offerings Terms" in the General Service Terms section of the
> [Service Specific
> Terms](https://docs.cloud.google.com/terms/service-terms#1), and the
> [Additional Terms for Generative AI
> Preview Products](https://cloud.google.com/trustedtester/aitos).
>
> Pre-GA products are available "as is" and might have limited support.
>
> For more information, see the
> [launch stage descriptions](https://cloud.google.com/products/#product-launch-stages).

<button class="button button-with-icon cloud-select-dropdown__button button-primary" aria-haspopup="true">Antigravity IDE</button>

- [Antigravity IDE](https://docs.cloud.google.com/data-cloud-extension/antigravity/install)
- [VS Code](https://docs.cloud.google.com/data-cloud-extension/vs-code/install)

The Google Cloud Data Agent Kit extension for Antigravity IDE lets you work with your Google Cloud data resources in your
preferred IDE.

## Before you begin

Before you install the Data Agent Kit extension for Antigravity IDE, do the following.

### Install Antigravity IDE and Python

On your local machine, install Antigravity IDE and Python.

1. [Install and set up Antigravity](https://antigravity.google/download) on your machine, or update it to version 1.21.5 or later.
2. Install [Python](https://www.python.org/).

### Set up Google Cloud

1. If you don't already have one, [create a Google Cloud project](https://console.cloud.google.com/cloud-resource-manager).
2. [Enable billing](https://docs.cloud.google.com/billing/docs/how-to/modify-project).

### Install the gcloud CLI

You must install and sign in to the Google Cloud CLI. The extension uses credentials from both the
gcloud CLI and application default credentials (ADC).

1. Open the terminal on your local machine or in Antigravity IDE.
2. If you haven't previously installed the gcloud CLI, follow the steps on [Install the gcloud CLI](https://docs.cloud.google.com/sdk/docs/install-sdk) to download and install the gcloud CLI.
3. In the terminal, run `gcloud init` to initialize the gcloud CLI:

       gcloud init

4. Run the following command and follow the prompts to authenticate and
   set up application default credentials:

       gcloud auth login && gcloud auth application-default login

5. Update the gcloud CLI to the latest version:

       gcloud components update

### Required roles

To get the permissions that you need to use the Data Agent Kit extension for Antigravity IDE, ask your
administrator to grant you the following Identity and Access Management (IAM) roles on the
project. For more information, see [Review required
roles](https://docs.cloud.google.com/data-cloud-extension:#review-required).

Depending on your use case, you might need additional roles, but these
roles let you install and set up the extension. The complete list is available
in the IDE extension settings.

- BigQuery Data Viewer (`roles/bigquery.dataViewer`)
- BigQuery Job User (`roles/bigquery.jobUser`)
- BigQuery Metadata Viewer (`roles/bigquery.metadataViewer`)
- BigQuery Read Session User (`roles/bigquery.readSessionUser`)
- Dataproc Editor (`roles/dataproc.editor`)

For more information about granting roles, see [Manage access to projects,
folders, and organizations](https://docs.cloud.google.com/iam/docs/granting-changing-revoking-access).

You might also be able to get the required permissions through [custom
roles](https://docs.cloud.google.com/iam/docs/creating-custom-roles) or other [predefined roles](https://docs.cloud.google.com/iam/docs/roles-overview#predefined).

The predefined roles contain the permissions required to use the extension. To
see the exact permissions that are required, expand the Required permissions
section:

#### Required permissions

- bigquery.config.get
- bigquery.datasets.get
- bigquery.datasets.getIamPolicy
- bigquery.jobs.create
- bigquery.readsessions.create
- bigquery.readsessions.getData
- bigquery.readsessions.update
- bigquery.tables.createSnapshot
- bigquery.tables.export
- bigquery.tables.get
- bigquery.tables.getIamPolicy
- bigquery.tables.list
- bigquery.tables.replicateData
- dataform.locations.get
- dataform.locations.list
- dataform.repositories.create
- dataform.repositories.list
- dataplex.projects.search
- dataproc.clusters.use
- dataproc.operations.get
- dataproc.sessions.create
- dataproc.sessions.delete
- dataproc.sessions.get
- dataproc.sessions.list
- dataproc.sessions.terminate
- dataproc.sessionTemplates.create
- dataproc.sessionTemplates.delete
- dataproc.sessionTemplates.get
- dataproc.sessionTemplates.list
- dataproc.sessionTemplates.update
- resourcemanager.projects.get

## Install the extension

1. In Antigravity IDE, click **Extensions** or press `Ctrl/Cmd+Shift+X`.
2. Search for `Google Cloud Data Agent Kit`.
3. Click **Install**.
4. If prompted, restart Antigravity IDE. After the extension has installed successfully, the Google Cloud Data Agent Kit icon is added to the activity bar.

## Sign in to Google Cloud Data Agent Kit

Next, you must authenticate to Google Cloud Data Agent Kit using the same account you used
to sign in to the gcloud CLI.

1. If the **sign-in** dialog doesn't open automatically, look for a Google Cloud Data Agent Kit
   sign-in link in the **status bar** near the bottom of the IDE window, and click
   it.

   Alternatively, you can press `Ctrl/Cmd+Shift+P` to open the **command palette** ,
   search for and select **Google Cloud Data Agent Kit: Sign in**.
2. Follow the prompts and complete signing in.

   A web page confirming that authentication is complete is displayed.
3. Close the page and return to the IDE.

## Enable APIs

After you sign in to your Google Account, you need to enable the APIs in your
Google Cloud project for all services that you use for your
data science or data engineering workflows.

To see the list of APIs and see the ones that are already enabled, do the following:

1. In the activity bar, click the **Google Cloud Data Agent Kit** icon.
2. Expand **Settings** , and then click **Settings**.
3. Select **Common**.
4. Click **Required APIs**.

> [!NOTE]
> **Note:** If you aren't a principal in the Service [Usage Admin](https://docs.cloud.google.com/iam/docs/roles-permissions/serviceusage#serviceusage.serviceUsageAdmin) (`roles/serviceusage.serviceUsageAdmin`) IAM role, ask your administrator to either grant you that role or enable these APIs for you. For more information, see [Enabling APIs](https://docs.cloud.google.com/apis/docs/getting-started#enabling_apis).

#### APIs to enable

- AlloyDB API
- BigLake API
- BigQuery API
- Cloud Composer API
- Cloud Dataplex API
- Cloud Resource Manager API
- Cloud Spanner API
- Cloud SQL
- Cloud SQL Admin API
- Cloud Storage API
- Dataproc API
- Dataproc Release Manager API
- Vertex AI API

## Troubleshoot

If you run into issues, try signing out of Google Cloud Data Agent Kit and the
gcloud CLI and then signing in again. To find additional methods for
diagnosing and resolving installation errors, see [Troubleshoot](https://docs.cloud.google.com/data-cloud-extension/antigravity/troubleshooting).

## What's next

- [Set up and configure settings](https://docs.cloud.google.com/data-cloud-extension/antigravity/configure)