Google Cloud Data Agent Kit 可讓您在偏好的 IDE 或代理式程式設計環境中,處理 Google Cloud 資料 資源。視設定而定,您可以安裝 IDE 擴充功能或外掛程式。
Data Agent Kit 預先安裝了下列 Google Cloud服務:
- Cloud Shell
- Cloud Workstations
事前準備
安裝 Data Agent Kit 前,請先完成下列步驟。
設定本機環境
在本機電腦上安裝偏好的 IDE 或程式碼代理程式和 Node.js。
- 安裝及設定 IDE、agentic CLI 或程式碼編寫代理程式。如果已安裝,請更新至最新版本。
- 安裝 Node.js。
設定「 Google Cloud」
- 如果沒有,請建立 Google Cloud 專案。
- 啟用計費功能。
必要的角色
如果需要額外權限才能完成工作,Data Agent Kit 會通知您。您只需要使用服務的權限。 如要查看 Data Agent Kit 中各項服務所需的權限和 API 完整清單,請參閱「權限」。
安裝擴充功能或外掛程式
安裝程序取決於您使用的 IDE 或程式設計代理。
VS Code
如要在 VS Code 中使用 Data Agent Kit,請安裝擴充功能:
- 在 IDE 中,按一下「擴充功能」或按下
Ctrl/Cmd+Shift+X。 - 搜尋
Google Cloud Data Agent Kit。 - 按一下 [安裝]。
- 如果系統提示,請重新啟動 IDE。擴充功能安裝完成後,活動列會新增 Google Cloud Data Agent Kit 圖示。
您也可以從 Visual Studio Marketplace 安裝擴充功能。
Antigravity
按一下即可展開所用 Antigravity 工具的操作說明。
Antigravity IDE
如要在 Antigravity IDE 中使用 Data Agent Kit,請安裝擴充功能。
- 在 IDE 中,按一下「擴充功能」或按下
Ctrl/Cmd+Shift+X。 - 搜尋
Google Cloud Data Agent Kit。 - 按一下 [安裝]。
- 如果系統提示,請重新啟動 IDE。擴充功能安裝完成後,活動列會新增 Google Cloud Data Agent Kit 圖示。
Antigravity CLI
如要搭配使用 Antigravity CLI 和 Data Agent Kit,請安裝外掛程式。在終端機中執行下列指令:
agy plugin install https://github.com/GoogleCloudPlatform/data-agent-kit-plugin
Antigravity 2.0
如要搭配使用 Antigravity CLI 和 Data Agent Kit,請安裝外掛程式。
- 按一下「設定」。
- 在「設定」窗格中,按一下「自訂」。
- 找到「Build with Google Plugins」,然後點選「Customize」。
- 在清單中找到「Google Cloud Data Agent Kit」,然後點選「Download」。
VS Code 擴充功能的 Antigravity
如要在使用 Antigravity for VS Code 擴充功能時,透過 VS Code 使用 Data Agent Kit,請按照下列步驟操作:
- 在 VS Code 狀態列中,按一下「Antigravity - Settings」。
- 在「設定」窗格中,按一下「自訂」。
- 找到「Build with Google Plugins」,然後點選「Customize」。
- 在清單中找到「Google Cloud Data Agent Kit」,然後點選「Download」。
Claude Code CLI
如要搭配 Claude Code CLI 使用 Data Agent Kit,請安裝外掛程式。 在終端機中執行下列指令:
claude plugin install data-agent-kit-starter-pack@claude-plugins-official
Codex CLI
如要搭配 Codex CLI 使用 Data Agent Kit,請安裝外掛程式。在終端機中執行下列指令:
codex plugin marketplace aadd GoogleCloudPlatform/data-agent-kit-plugin
codex plugin add dak@dak-marketplace
Cursor
如要在 Cursor 中使用 Data Agent Kit,請安裝擴充功能。
- 在 IDE 中,按一下「擴充功能」或按下
Ctrl/Cmd+Shift+X。 - 搜尋
Google Cloud Data Agent Kit。 - 按一下 [安裝]。
- 如果系統提示,請重新啟動 IDE。擴充功能安裝完成後,活動列會新增 Google Cloud Data Agent Kit 圖示。
以 VS Code 為基礎的 IDE
如要在其他以 VS Code 為基礎的 IDE 中使用 Data Agent Kit,請安裝擴充功能。
- 在 IDE 中,按一下「擴充功能」或按下
Ctrl/Cmd+Shift+X。 - 搜尋
Google Cloud Data Agent Kit。 - 按一下 [安裝]。
- 如果系統提示,請重新啟動 IDE。擴充功能安裝完成後,活動列會新增 Google Cloud Data Agent Kit 圖示。
登入 Data Agent Kit
安裝擴充功能或外掛程式後,請務必登入。
擴充功能登入
如果您已安裝 IDE 擴充功能,請務必向 Google Cloud Data Agent Kit 進行驗證。
如果登入對話方塊未自動開啟,請在 IDE 視窗底部的狀態列中,尋找 Google Cloud Data Agent Kit 登入連結,然後點選該連結。
或者,您也可以按下
Ctrl/Cmd+Shift+P開啟指令面板,然後搜尋並選取「Google Cloud Data Agent Kit: Sign in」。按照提示完成登入程序。
系統會顯示網頁,確認驗證完成。
關閉頁面並返回 IDE。
登入外掛程式
安裝並登入 Google Cloud CLI。Data Agent Kit 外掛程式會使用 gcloud CLI 憑證和應用程式預設憑證 (ADC) 的憑證。
- 在本機或 IDE 中開啟終端機。
- 如果先前未安裝 gcloud CLI,請按照「安裝 gcloud CLI」中的步驟下載並安裝 gcloud CLI。
- 在終端機中執行
gcloud init,初始化 gcloud CLI:gcloud init
- 執行下列指令,然後按照提示驗證及設定應用程式預設憑證:
gcloud auth login && gcloud auth application-default login
- 將 gcloud CLI 更新至最新版本:
gcloud components update
疑難排解
如果遇到問題,請嘗試登出,然後重新登入。如要瞭解診斷及解決安裝錯誤的其他方法,請參閱「疑難排解」。