[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M787VCK1PZN0R35SF2MF7W1W":3,"skill-same:01M787VCK1PZN0R35SF2MF7W1W":59},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":14,"repositoryHtmlUrl":29,"repositoryHomepageUrl":30,"ownerHtmlUrl":31,"ownerBlogUrl":32,"ownerDescription":33,"updatedAt":34,"install":35,"resources":48},"01M787VCK1PZN0R35SF2MF7W1W","agent-platform-migrate-from-ai-studio",null,"Guides agents and users through migrating from Gemini API in Google AI Studio to Gemini Enterprise Agent Platform (formerly Vertex AI). Use this skill when moving applications to Google Cloud, to leverage Cloud credits, or to unify inferencing with other Cloud infrastructure (IAM, billing, telemetry).","Solizardking\u002Fskillhub-main","Solizardking","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F108096810?v=4","01M786KDB10AYV042N0F9BD5B5","Clawd","01M786NYYXSZK1D05WM8JQPC48",0,"MIT","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fgoogle\u002Fcloud\u002Fagent-platform-migrate-from-ai-studio\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: agent-platform-migrate-from-ai-studio\nmetadata:\n  category: AiAndMachineLearning\ndescription: >-\n  Guides agents and users through migrating from Gemini API in Google AI Studio to Gemini Enterprise Agent Platform (formerly Vertex AI). Use this skill when moving applications to Google Cloud, to leverage Cloud credits, or to unify inferencing with other Cloud infrastructure (IAM, billing, telemetry).\n---\n\n# Migrating from Gemini API in AI Studio to Agent Platform\n\nUse this skill when you need to transition an application from the\ndeveloper-centric Google AI Studio ecosystem\n(`generativelanguage.googleapis.com`) to the enterprise-grade Google Cloud Agent\nPlatform (`aiplatform.googleapis.com`).\n\n--------------------------------------------------------------------------------\n\n## When to Invoke This Skill\n\n*   You want to migrate an application from Google AI Studio to Agent Platform\n    (formerly Vertex AI).\n*   You have **Google Cloud credits** (e.g., the $300 Welcome Free Trial) that\n    you want to apply toward Gemini API inferencing costs.\n*   You need to unify your inferencing pipelines, IAM permissions, telemetry,\n    and billing with existing Google Cloud infrastructure (Compute Engine, Cloud\n    SQL, BigQuery).\n*   You are deploying open-source orchestration engines (like OpenClaw or ADK\n    agents) on Google Cloud VMs, and want the entire system to run under a\n    unified Google Cloud billing structure.\n\n--------------------------------------------------------------------------------\n\n## Gemini API Comparison\n\nFeature \u002F Control      | Google AI Studio (Gemini Developer API)                               | Agent Platform (Enterprise Gemini API)\n:--------------------- | :-------------------------------------------------------------------- | :-------------------------------------\n**API Endpoint**       | `generativelanguage.googleapis.com`                                   | `aiplatform.googleapis.com`\n**Target Audience**    | Developers, startups, students, researchers building production apps. | Enterprise production, MLOps engineers\n**GCP Credit Support** | No (GCP credits\u002FFree Trial **cannot** be applied)                     | Yes (Fully covered by Welcome or custom credits)\n**Data Privacy**       | Data may be reviewed to improve Google products                       | Prompts\u002Fresponses are **never** used for training\n**Security & IAM**     | API key, OAuth                                                        | Google Cloud IAM (Service Accounts, OAuth 2.0, VPC-SC)\n**Compliance & SLAs**  | None (Best-effort availability)                                       | 24\u002F7 Enterprise Support, SLAs, HIPAA, SOC2\n**Throughput Options** | Shared \u002F Rate-limited                                                 | Pay-as-you-go OR Provisioned Throughput\n**MLOps Ecosystem**    | Basic prompt management                                               | Model Registry, Model Monitoring, Pipeline Evaluation\n**Inferencing Scope**  | Global endpoints only                                                 | Both Global and strict Regional endpoints\n\nSee\n[Google Cloud Documentation](https:\u002F\u002Fdocs.cloud.google.com\u002Fgemini-enterprise-agent-platform\u002Fmodels\u002Fmigrate\u002Fmigrate-google-ai.md.txt)\nto learn more about the differences between the two offerings.\n\n--------------------------------------------------------------------------------\n\n## Migration Guide\n\n### Billing and Credits\n\nGoogle Cloud Free Trial credits\n**[do not apply to AI Studio](https:\u002F\u002Fdocs.cloud.google.com\u002Ffree\u002Fdocs\u002Ffree-cloud-features.md.txt)**.\nTo use your credits for Gemini models, you must route calls through the Agent\nPlatform.\n\n1.  Create a Google Cloud billing account. You must provide a valid payment\n    method during setup to verify identity.\n2.  If you are a new customer, ensure your $300 Welcome credit is active in the\n    Billing Console.\n3.  **Avoid Billing Surprises:** To prevent automatic fallback to your standard\n    form of payment when credits are exhausted, you should establish a budget\n    alert:\n    *   Go to **Billing** -> **Budgets & Alerts** -> **Create Budget**.\n    *   Set the threshold to map to your credit limit or maximum comfortable\n        spend.\n\n### Enable the Agent Platform API\n\nYou must explicitly enable the Agent Platform API on your target Google Cloud\nProject. Run the following command via your local shell:\n\n```bash\ngcloud services enable aiplatform.googleapis.com --project=\"{project_id}\"\n```\n\n### Authentication & Authorization (IAM)\n\n#### User Auth\n\nFor local debugging or script execution, authenticate using\n[Application Default Credentials](https:\u002F\u002Fdocs.cloud.google.com\u002Fdocs\u002Fauthentication\u002Fapplication-default-credentials.md.txt)\n(ADC).\n\n**Option 1 - Automated Script**:\n\n```bash\nbash \u003C(curl -sSL https:\u002F\u002Fstorage.googleapis.com\u002Fcloud-samples-data\u002Fadc\u002Fsetup_adc.sh)\n```\n\n**Option 2 - Manual Setup**:\n\n```bash\ngcloud auth login\ngcloud auth application-default login\n```\n\nGrant your user identity the required IAM role to perform inferencing calls:\n\n```bash\ngcloud projects add-iam-policy-binding \"{project_id}\" \\\n    --member=\"user:YOUR_EMAIL@domain.com\" \\\n    --role=\"roles\u002Faiplatform.user\"\n```\n\n#### Service Auth\n\nWhen running your application on Google Cloud infrastructure such as a Compute\nEngine VM, authenticate using the machine's attached Service Account. For\nexample, the\n[Compute Engine Default Service Account](https:\u002F\u002Fdocs.cloud.google.com\u002Fcompute\u002Fdocs\u002Faccess\u002Fservice-accounts#default_service_account.md.txt).\n\n1.  Grant the virtual machine's underlying Service Account the user role:\n\n```bash\ngcloud projects add-iam-policy-binding \"{project_id}\" \\\n    --member=\"serviceAccount:PROJECT_NUMBER-compute@developer.gserviceaccount.com\" \\\n    --role=\"roles\u002Faiplatform.user\"\n```\n\n2.  **[Compute Engine Access Scopes](https:\u002F\u002Fdocs.cloud.google.com\u002Fcompute\u002Fdocs\u002Faccess\u002Fservice-accounts.md.txt):**\n    Legacy access scopes can override IAM bindings. When provisioning or\n    modifying your Compute Engine instance, you must verify that the VM access scope is\n    configured to either **Allow full access to all Cloud APIs**\n    (`https:\u002F\u002Fwww.googleapis.com\u002Fauth\u002Fcloud-platform`) or explicitly includes\n    the standard cloud-platform scope.\n\n--------------------------------------------------------------------------------\n\n## Use the Gemini API in Agent Platform\n\n### SDKs (Client Libraries)\n\nYou can continue to use the unified\n[Google GenAI SDK](https:\u002F\u002Fdocs.cloud.google.com\u002Fgemini-enterprise-agent-platform\u002Fmodels\u002Fsdks\u002Foverview.md.txt)\n(`google-genai`). This SDK works with both AI Studio and Agent Platform. You\nonly need to switch the routing flags via your runtime environment variables to\ntarget the Agent Platform backend.\n\nSet your target environment details:\n\n```bash\nexport GOOGLE_CLOUD_PROJECT=\"{project_id}\"\nexport GOOGLE_CLOUD_LOCATION=\"global\"  # Or your chosen regional endpoint\nexport GOOGLE_GENAI_USE_ENTERPRISE=TRUE\n```\n\nNow, your standard python code shifts from using AI Studio to Agent Platform\nwithout altering the core initialization blocks:\n\n```python\nfrom google import genai\n\n# The client automatically picks up the GOOGLE_GENAI_USE_ENTERPRISE=TRUE environment flag\nclient = genai.Client()\n\nresponse = client.models.generate_content(\n    model='gemini-3-flash-preview',\n    contents='Hello world!',\n)\nprint(response.text)\n```\n\n### Agent Development Kit (ADK)\n\nTo call Gemini models in Agent Platform from an Agent Development Kit agent,\nfollow these steps.\n\n1.  Authenticate to Google Cloud.\n\nIf running an ADK agent in Google Cloud (e.g. Agent Platform Runtime), use the\nagent's assigned service account. Alternatively, if running ADK locally, run:\n\n```bash\ngcloud auth application-default login\n```\n\n1.  Set env variables. Ensure these are set no matter if your ADK agent is\n    running in Google Cloud or locally:\n\n```bash\nexport GOOGLE_CLOUD_PROJECT=\"{project_id}\"\nexport GOOGLE_CLOUD_LOCATION=\"global\"\nexport GOOGLE_GENAI_USE_ENTERPRISE=TRUE\n```\n\n2.  Initialize the ADK agent. You can use the same model string you used with AI\n    Studio (e.g. `gemini-3-flash-preview`).\n\n```python\nfrom google.adk.agents.llm_agent import Agent\n\ndef get_current_time(city: str) -> dict:\n    \"\"\"Returns the current time in a specified city.\"\"\"\n    return {\"status\": \"success\", \"city\": city, \"time\": \"10:30 AM\"}\n\nroot_agent = Agent(\n    model='gemini-3-flash-preview',\n    name='root_agent',\n    description=\"Tells the current time in a specified city.\",\n    instruction=\"You are a helpful assistant that tells the current time in cities. Use the 'get_current_time' tool for this purpose.\",\n    tools=[get_current_time],\n)\n```\n\nTo learn more about integrating ADK agents with Agent Platform,\n[see the ADK documentation](https:\u002F\u002Fraw.githubusercontent.com\u002Fgoogle\u002Fadk-docs\u002Fmain\u002Fdocs\u002Fagents\u002Fmodels\u002Fagent-platform.md).\n\n### Antigravity CLI\n\nGoogle Cloud users [can now access](https:\u002F\u002Fantigravity.google\u002Fpricing)\nAntigravity 2.0, including the Antigravity CLI, with Gemini Enterprise Agent\nPlatform.\n\n1.  [Install the Antigravity CLI](https:\u002F\u002Fantigravity.google\u002Fdocs\u002Fcli-install)\n    to your local environment.\n2.  Start the Antigravity CLI.\n\n    ```bash\n    agy\n    ```\n\n3.  Follow the CLI setup prompts - select **Use a Google Cloud Project**.\n\n4.  Complete the OAuth flow in the opened browser window using your\n    authenticated Google Cloud Workspace or user identity.\n\n5.  Copy the confirmation token, and paste it directly back into your terminal.\n\n6.  Follow the prompts to enter your Google Cloud Project ID.\n\n7.  Select your Google Cloud location (e.g. `global`).\n\n8.  Optionally, run the `\u002Fmodel` command to select a different Gemini model in\n    Agent Platform.\n\n### OpenClaw\n\nTo configure an OpenClaw agent to use Gemini models in Agent Platform, Follow\nthese steps.\n\n1.  [Install OpenClaw using OpenClaw's official instructions](https:\u002F\u002Fdocs.openclaw.ai\u002Finstall).\n\n⚠️ Important: OpenClaw 2026.5.28 currently has a `google-vertex` bug. Please use\n2026.5.20 for now.\n\n2.  Ensure that the runtime where OpenClaw is running (e.g. GCE VM with Service\n    Account) has the `aiplatform.user` IAM role - see Authentication and\n    Authorization section above.\n\n3.  Get the project number from the user's project ID. Outside of GCE, run:\n\n```bash\nexport PROJECT_NUMBER=$(gcloud projects describe \"$PROJECT_ID\" --format=\"value(projectNumber)\")\necho \"Project number: $PROJECT_NUMBER\"\n\n```\n\nWithin a Compute Engine VM, run:\n\n```bash\nexport PROJECT_NUMBER=$(curl \"http:\u002F\u002Fmetadata.google.internal\u002FcomputeMetadata\u002Fv1\u002Fproject\u002Fproject-id\" -H \"Metadata-Flavor: Google\")\necho \"Project number: $PROJECT_NUMBER\"\n```\n\n4.  From outside the GCE instance, generate `GOOGLE_APPLICATION_CREDENTIALS`\n    using the Google Cloud project number. Then, `scp` these credentials to the\n    GCE VM.\n\n```bash\nmkdir -p ~\u002F.config\u002Fgcloud\ngcloud iam service-accounts keys create ~\u002F.config\u002Fgcloud\u002Fapplication_default_credentials.json --iam-account=\"${PROJECT_NUMBER}-compute@developer.gserviceaccount.com\"\n```\n\n> ⚠️ **Troubleshooting Policy Constraints on New Orgs**: New Google\n> Cloud organizations (created on or after May 4th, 2024) enforce a [legacy Organization Policy, restricting Service Account Key Creation](https:\u002F\u002Fdocs.cloud.google.com\u002Forganization-policy\u002Frestrict-service-accounts.md.txt). To complete this step, this Org Policy must be temporarily disabled.\n> An Organization Policy Admin must set this policy to Inactive. \n> To the agent: Check if this policy is enforced, and if it is: pause, and \n> prompt the user to disable it at this Console link: \n> https:\u002F\u002Fconsole.cloud.google.com\u002Fiam-admin\u002Forgpolicies\n\n\n5.  Edit the configuration file that's usually located at:\n    `~\u002F.openclaw\u002Fopenclaw.json`. Ensure you prefix the Gemini model with\n    `google-vertex\u002F`.\n\n> ⚠️ Important: Do not use Gemini 3.5 models, since OpenClaw's `google-vertex`\n> provider does not support it yet. Older models work. When using the\n> [Gemini 3 Flash Preview](https:\u002F\u002Fdocs.cloud.google.com\u002Fgemini-enterprise-agent-platform\u002Fmodels\u002Fgemini\u002F3-flash)\n> model in Agent Platform, always set the location to `global`, NOT a regional\n> endpoint.\n\n```json\n{\n  \"env\": {\n    \"vars\": {\n      \"GOOGLE_CLOUD_PROJECT\": \"PROJECT_ID\",\n      \"GOOGLE_CLOUD_LOCATION\": \"global\",\n      \"GOOGLE_APPLICATION_CREDENTIALS\": \"~\u002F.config\u002Fgcloud\u002Fapplication_default_credentials.json\"\n    }\n  },\n  \"agents\": {\n    \"defaults\": {\n      \"model\": {\n        \"primary\": \"google-vertex\u002Fgemini-3-flash-preview\"\n      },\n      \"workspace\": \"~\u002F.openclaw\u002Fworkspace\",\n      \"compaction\": {\n        \"mode\": \"safeguard\"\n      },\n      \"heartbeat\": {\n        \"model\": \"google-vertex\u002Fgemini-3-flash-preview\"\n      }\n    },\n    \"list\": [\n      {\n        \"id\": \"main\",\n        \"workspace\": \"~\u002F.openclaw\u002Fworkspace\",\n        \"model\": \"google-vertex\u002Fgemini-3-flash-preview\"\n      }\n    ]\n  },\n  \"session\": {\n    \"dmScope\": \"per-channel-peer\"\n  },\n  \"tools\": {\n    \"profile\": \"coding\"\n  }\n}\n\n```\n\n6.  Restart OpenClaw.\n\n```bash\nopenclaw gateway restart\n\n```\n\n7.  Verify the OpenClaw connection to Agent Platform:\n\n```bash\nopenclaw models status\nopenclaw agent --agent main --message \"Hello world!\"\n\n```\n\n--------------------------------------------------------------------------------\n\n## Additional Resources\n\n*   [Google Cloud Free Trial Features & Limits](https:\u002F\u002Fdocs.cloud.google.com\u002Ffree\u002Fdocs\u002Ffree-cloud-features.md.txt)\n*   [Migrate from Google AI Studio to Gemini Enterprise Agent Platform](https:\u002F\u002Fdocs.cloud.google.com\u002Fgemini-enterprise-agent-platform\u002Fmodels\u002Fmigrate\u002Fmigrate-google-ai.md.txt)\n*   [Gemini Enterprise Agent Platform - Models](https:\u002F\u002Fdocs.cloud.google.com\u002Fgemini-enterprise-agent-platform\u002Fmodels\u002Fgoogle-models.md.txt)\n*   [Agent Development Kit Documentation - Connect to Models in Agent Platform](https:\u002F\u002Fadk.dev\u002Fagents\u002Fmodels\u002Fagent-platform\u002F#agent-platform-setup)\n*   [OpenClaw Documentation - Connect to Google models](https:\u002F\u002Fdocs.openclaw.ai\u002Fproviders\u002Fgoogle)\n*   [Google Cloud Budget Alerts - Setup Guide](https:\u002F\u002Fdocs.cloud.google.com\u002Fbilling\u002Fdocs\u002Fhow-to\u002Fbudgets#steps-to-create-budget.md.txt)\n","# Migrating from Gemini API in AI Studio to Agent Platform\n\nUse this skill when you need to transition an application from the\ndeveloper-centric Google AI Studio ecosystem\n(`generativelanguage.googleapis.com`) to the enterprise-grade Google Cloud Agent\nPlatform (`aiplatform.googleapis.com`).\n\n--------------------------------------------------------------------------------\n\n## When to Invoke This Skill\n\n*   You want to migrate an application from Google AI Studio to Agent Platform\n    (formerly Vertex AI).\n*   You have **Google Cloud credits** (e.g., the $300 Welcome Free Trial) that\n    you want to apply toward Gemini API inferencing costs.\n*   You need to unify your inferencing pipelines, IAM permissions, telemetry,\n    and billing with existing Google Cloud infrastructure (Compute Engine, Cloud\n    SQL, BigQuery).\n*   You are deploying open-source orchestration engines (like OpenClaw or ADK\n    agents) on Google Cloud VMs, and want the entire system to run under a\n    unified Google Cloud billing structure.\n\n--------------------------------------------------------------------------------\n\n## Gemini API Comparison\n\nFeature \u002F Control      | Google AI Studio (Gemini Developer API)                               | Agent Platform (Enterprise Gemini API)\n:--------------------- | :-------------------------------------------------------------------- | :-------------------------------------\n**API Endpoint**       | `generativelanguage.googleapis.com`                                   | `aiplatform.googleapis.com`\n**Target Audience**    | Developers, startups, students, researchers building production apps. | Enterprise production, MLOps engineers\n**GCP Credit Support** | No (GCP credits\u002FFree Trial **cannot** be applied)                     | Yes (Fully covered by Welcome or custom credits)\n**Data Privacy**       | Data may be reviewed to improve Google products                       | Prompts\u002Fresponses are **never** used for training\n**Security & IAM**     | API key, OAuth                                                        | Google Cloud IAM (Service Accounts, OAuth 2.0, VPC-SC)\n**Compliance & SLAs**  | None (Best-effort availability)                                       | 24\u002F7 Enterprise Support, SLAs, HIPAA, SOC2\n**Throughput Options** | Shared \u002F Rate-limited                                                 | Pay-as-you-go OR Provisioned Throughput\n**MLOps Ecosystem**    | Basic prompt management                                               | Model Registry, Model Monitoring, Pipeline Evaluation\n**Inferencing Scope**  | Global endpoints only                                                 | Both Global and strict Regional endpoints\n\nSee\n[Google Cloud Documentation](https:\u002F\u002Fdocs.cloud.google.com\u002Fgemini-enterprise-agent-platform\u002Fmodels\u002Fmigrate\u002Fmigrate-google-ai.md.txt)\nto learn more about the differences between the two offerings.\n\n--------------------------------------------------------------------------------\n\n## Migration Guide\n\n### Billing and Credits\n\nGoogle Cloud Free Trial credits\n**[do not apply to AI Studio](https:\u002F\u002Fdocs.cloud.google.com\u002Ffree\u002Fdocs\u002Ffree-cloud-features.md.txt)**.\nTo use your credits for Gemini models, you must route calls through the Agent\nPlatform.\n\n1.  Create a Google Cloud billing account. You must provide a valid payment\n    method during setup to verify identity.\n2.  If you are a new customer, ensure your $300 Welcome credit is active in the\n    Billing Console.\n3.  **Avoid Billing Surprises:** To prevent automatic fallback to your standard\n    form of payment when credits are exhausted, you should establish a budget\n    alert:\n    *   Go to **Billing** -> **Budgets & Alerts** -> **Create Budget**.\n    *   Set the threshold to map to your credit limit or maximum comfortable\n        spend.\n\n### Enable the Agent Platform API\n\nYou must explicitly enable the Agent Platform API on your target Google Cloud\nProject. Run the following command via your local shell:\n\n```bash\ngcloud services enable aiplatform.googleapis.com --project=\"{project_id}\"\n```\n\n### Authentication & Authorization (IAM)\n\n#### User Auth\n\nFor local debugging or script execution, authenticate using\n[Application Default Credentials](https:\u002F\u002Fdocs.cloud.google.com\u002Fdocs\u002Fauthentication\u002Fapplication-default-credentials.md.txt)\n(ADC).\n\n**Option 1 - Automated Script**:\n\n```bash\nbash \u003C(curl -sSL https:\u002F\u002Fstorage.googleapis.com\u002Fcloud-samples-data\u002Fadc\u002Fsetup_adc.sh)\n```\n\n**Option 2 - Manual Setup**:\n\n```bash\ngcloud auth login\ngcloud auth application-default login\n```\n\nGrant your user identity the required IAM role to perform inferencing calls:\n\n```bash\ngcloud projects add-iam-policy-binding \"{project_id}\" \\\n    --member=\"user:YOUR_EMAIL@domain.com\" \\\n    --role=\"roles\u002Faiplatform.user\"\n```\n\n#### Service Auth\n\nWhen running your application on Google Cloud infrastructure such as a Compute\nEngine VM, authenticate using the machine's attached Service Account. For\nexample, the\n[Compute Engine Default Service Account](https:\u002F\u002Fdocs.cloud.google.com\u002Fcompute\u002Fdocs\u002Faccess\u002Fservice-accounts#default_service_account.md.txt).\n\n1.  Grant the virtual machine's underlying Service Account the user role:\n\n```bash\ngcloud projects add-iam-policy-binding \"{project_id}\" \\\n    --member=\"serviceAccount:PROJECT_NUMBER-compute@developer.gserviceaccount.com\" \\\n    --role=\"roles\u002Faiplatform.user\"\n```\n\n2.  **[Compute Engine Access Scopes](https:\u002F\u002Fdocs.cloud.google.com\u002Fcompute\u002Fdocs\u002Faccess\u002Fservice-accounts.md.txt):**\n    Legacy access scopes can override IAM bindings. When provisioning or\n    modifying your Compute Engine instance, you must verify that the VM access scope is\n    configured to either **Allow full access to all Cloud APIs**\n    (`https:\u002F\u002Fwww.googleapis.com\u002Fauth\u002Fcloud-platform`) or explicitly includes\n    the standard cloud-platform scope.\n\n--------------------------------------------------------------------------------\n\n## Use the Gemini API in Agent Platform\n\n### SDKs (Client Libraries)\n\nYou can continue to use the unified\n[Google GenAI SDK](https:\u002F\u002Fdocs.cloud.google.com\u002Fgemini-enterprise-agent-platform\u002Fmodels\u002Fsdks\u002Foverview.md.txt)\n(`google-genai`). This SDK works with both AI Studio and Agent Platform. You\nonly need to switch the routing flags via your runtime environment variables to\ntarget the Agent Platform backend.\n\nSet your target environment details:\n\n```bash\nexport GOOGLE_CLOUD_PROJECT=\"{project_id}\"\nexport GOOGLE_CLOUD_LOCATION=\"global\"  # Or your chosen regional endpoint\nexport GOOGLE_GENAI_USE_ENTERPRISE=TRUE\n```\n\nNow, your standard python code shifts from using AI Studio to Agent Platform\nwithout altering the core initialization blocks:\n\n```python\nfrom google import genai\n\n# The client automatically picks up the GOOGLE_GENAI_USE_ENTERPRISE=TRUE environment flag\nclient = genai.Client()\n\nresponse = client.models.generate_content(\n    model='gemini-3-flash-preview',\n    contents='Hello world!',\n)\nprint(response.text)\n```\n\n### Agent Development Kit (ADK)\n\nTo call Gemini models in Agent Platform from an Agent Development Kit agent,\nfollow these steps.\n\n1.  Authenticate to Google Cloud.\n\nIf running an ADK agent in Google Cloud (e.g. Agent Platform Runtime), use the\nagent's assigned service account. Alternatively, if running ADK locally, run:\n\n```bash\ngcloud auth application-default login\n```\n\n1.  Set env variables. Ensure these are set no matter if your ADK agent is\n    running in Google Cloud or locally:\n\n```bash\nexport GOOGLE_CLOUD_PROJECT=\"{project_id}\"\nexport GOOGLE_CLOUD_LOCATION=\"global\"\nexport GOOGLE_GENAI_USE_ENTERPRISE=TRUE\n```\n\n2.  Initialize the ADK agent. You can use the same model string you used with AI\n    Studio (e.g. `gemini-3-flash-preview`).\n\n```python\nfrom google.adk.agents.llm_agent import Agent\n\ndef get_current_time(city: str) -> dict:\n    \"\"\"Returns the current time in a specified city.\"\"\"\n    return {\"status\": \"success\", \"city\": city, \"time\": \"10:30 AM\"}\n\nroot_agent = Agent(\n    model='gemini-3-flash-preview',\n    name='root_agent',\n    description=\"Tells the current time in a specified city.\",\n    instruction=\"You are a helpful assistant that tells the current time in cities. Use the 'get_current_time' tool for this purpose.\",\n    tools=[get_current_time],\n)\n```\n\nTo learn more about integrating ADK agents with Agent Platform,\n[see the ADK documentation](https:\u002F\u002Fraw.githubusercontent.com\u002Fgoogle\u002Fadk-docs\u002Fmain\u002Fdocs\u002Fagents\u002Fmodels\u002Fagent-platform.md).\n\n### Antigravity CLI\n\nGoogle Cloud users [can now access](https:\u002F\u002Fantigravity.google\u002Fpricing)\nAntigravity 2.0, including the Antigravity CLI, with Gemini Enterprise Agent\nPlatform.\n\n1.  [Install the Antigravity CLI](https:\u002F\u002Fantigravity.google\u002Fdocs\u002Fcli-install)\n    to your local environment.\n2.  Start the Antigravity CLI.\n\n    ```bash\n    agy\n    ```\n\n3.  Follow the CLI setup prompts - select **Use a Google Cloud Project**.\n\n4.  Complete the OAuth flow in the opened browser window using your\n    authenticated Google Cloud Workspace or user identity.\n\n5.  Copy the confirmation token, and paste it directly back into your terminal.\n\n6.  Follow the prompts to enter your Google Cloud Project ID.\n\n7.  Select your Google Cloud location (e.g. `global`).\n\n8.  Optionally, run the `\u002Fmodel` command to select a different Gemini model in\n    Agent Platform.\n\n### OpenClaw\n\nTo configure an OpenClaw agent to use Gemini models in Agent Platform, Follow\nthese steps.\n\n1.  [Install OpenClaw using OpenClaw's official instructions](https:\u002F\u002Fdocs.openclaw.ai\u002Finstall).\n\n⚠️ Important: OpenClaw 2026.5.28 currently has a `google-vertex` bug. Please use\n2026.5.20 for now.\n\n2.  Ensure that the runtime where OpenClaw is running (e.g. GCE VM with Service\n    Account) has the `aiplatform.user` IAM role - see Authentication and\n    Authorization section above.\n\n3.  Get the project number from the user's project ID. Outside of GCE, run:\n\n```bash\nexport PROJECT_NUMBER=$(gcloud projects describe \"$PROJECT_ID\" --format=\"value(projectNumber)\")\necho \"Project number: $PROJECT_NUMBER\"\n\n```\n\nWithin a Compute Engine VM, run:\n\n```bash\nexport PROJECT_NUMBER=$(curl \"http:\u002F\u002Fmetadata.google.internal\u002FcomputeMetadata\u002Fv1\u002Fproject\u002Fproject-id\" -H \"Metadata-Flavor: Google\")\necho \"Project number: $PROJECT_NUMBER\"\n```\n\n4.  From outside the GCE instance, generate `GOOGLE_APPLICATION_CREDENTIALS`\n    using the Google Cloud project number. Then, `scp` these credentials to the\n    GCE VM.\n\n```bash\nmkdir -p ~\u002F.config\u002Fgcloud\ngcloud iam service-accounts keys create ~\u002F.config\u002Fgcloud\u002Fapplication_default_credentials.json --iam-account=\"${PROJECT_NUMBER}-compute@developer.gserviceaccount.com\"\n```\n\n> ⚠️ **Troubleshooting Policy Constraints on New Orgs**: New Google\n> Cloud organizations (created on or after May 4th, 2024) enforce a [legacy Organization Policy, restricting Service Account Key Creation](https:\u002F\u002Fdocs.cloud.google.com\u002Forganization-policy\u002Frestrict-service-accounts.md.txt). To complete this step, this Org Policy must be temporarily disabled.\n> An Organization Policy Admin must set this policy to Inactive. \n> To the agent: Check if this policy is enforced, and if it is: pause, and \n> prompt the user to disable it at this Console link: \n> https:\u002F\u002Fconsole.cloud.google.com\u002Fiam-admin\u002Forgpolicies\n\n\n5.  Edit the configuration file that's usually located at:\n    `~\u002F.openclaw\u002Fopenclaw.json`. Ensure you prefix the Gemini model with\n    `google-vertex\u002F`.\n\n> ⚠️ Important: Do not use Gemini 3.5 models, since OpenClaw's `google-vertex`\n> provider does not support it yet. Older models work. When using the\n> [Gemini 3 Flash Preview](https:\u002F\u002Fdocs.cloud.google.com\u002Fgemini-enterprise-agent-platform\u002Fmodels\u002Fgemini\u002F3-flash)\n> model in Agent Platform, always set the location to `global`, NOT a regional\n> endpoint.\n\n```json\n{\n  \"env\": {\n    \"vars\": {\n      \"GOOGLE_CLOUD_PROJECT\": \"PROJECT_ID\",\n      \"GOOGLE_CLOUD_LOCATION\": \"global\",\n      \"GOOGLE_APPLICATION_CREDENTIALS\": \"~\u002F.config\u002Fgcloud\u002Fapplication_default_credentials.json\"\n    }\n  },\n  \"agents\": {\n    \"defaults\": {\n      \"model\": {\n        \"primary\": \"google-vertex\u002Fgemini-3-flash-preview\"\n      },\n      \"workspace\": \"~\u002F.openclaw\u002Fworkspace\",\n      \"compaction\": {\n        \"mode\": \"safeguard\"\n      },\n      \"heartbeat\": {\n        \"model\": \"google-vertex\u002Fgemini-3-flash-preview\"\n      }\n    },\n    \"list\": [\n      {\n        \"id\": \"main\",\n        \"workspace\": \"~\u002F.openclaw\u002Fworkspace\",\n        \"model\": \"google-vertex\u002Fgemini-3-flash-preview\"\n      }\n    ]\n  },\n  \"session\": {\n    \"dmScope\": \"per-channel-peer\"\n  },\n  \"tools\": {\n    \"profile\": \"coding\"\n  }\n}\n\n```\n\n6.  Restart OpenClaw.\n\n```bash\nopenclaw gateway restart\n\n```\n\n7.  Verify the OpenClaw connection to Agent Platform:\n\n```bash\nopenclaw models status\nopenclaw agent --agent main --message \"Hello world!\"\n\n```\n\n--------------------------------------------------------------------------------\n\n## Additional Resources\n\n*   [Google Cloud Free Trial Features & Limits](https:\u002F\u002Fdocs.cloud.google.com\u002Ffree\u002Fdocs\u002Ffree-cloud-features.md.txt)\n*   [Migrate from Google AI Studio to Gemini Enterprise Agent Platform](https:\u002F\u002Fdocs.cloud.google.com\u002Fgemini-enterprise-agent-platform\u002Fmodels\u002Fmigrate\u002Fmigrate-google-ai.md.txt)\n*   [Gemini Enterprise Agent Platform - Models](https:\u002F\u002Fdocs.cloud.google.com\u002Fgemini-enterprise-agent-platform\u002Fmodels\u002Fgoogle-models.md.txt)\n*   [Agent Development Kit Documentation - Connect to Models in Agent Platform](https:\u002F\u002Fadk.dev\u002Fagents\u002Fmodels\u002Fagent-platform\u002F#agent-platform-setup)\n*   [OpenClaw Documentation - Connect to Google models](https:\u002F\u002Fdocs.openclaw.ai\u002Fproviders\u002Fgoogle)\n*   [Google Cloud Budget Alerts - Setup Guide](https:\u002F\u002Fdocs.cloud.google.com\u002Fbilling\u002Fdocs\u002Fhow-to\u002Fbudgets#steps-to-create-budget.md.txt)\n",{"name":5,"metadata":24,"description":7},{"category":25},"AiAndMachineLearning","main","be3de0244dc1a57e323d8160787ebb40fb64930e","public\u002Fapi\u002Fskills\u002Fgoogle\u002Fcloud\u002Fagent-platform-migrate-from-ai-studio","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main","https:\u002F\u002Fskills.x402.wtf","https:\u002F\u002Fgithub.com\u002FSolizardking","https:\u002F\u002Fmusebook.trade","Got a mile high and never came down","2026-10-08 23:20:13",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add Solizardking\u002Fskillhub-main --skill agent-platform-migrate-from-ai-studio",{"tool":41,"command":42},"bunx","bunx skills add Solizardking\u002Fskillhub-main --skill agent-platform-migrate-from-ai-studio",{"tool":44,"command":45},"pnpm","pnpm dlx skills add Solizardking\u002Fskillhub-main --skill agent-platform-migrate-from-ai-studio","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fgoogle\u002Fcloud\u002Fagent-platform-migrate-from-ai-studio\u002FSKILL.md",true,[49,55],{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"metadata.json","REFERENCE","参考文档",559,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fgoogle\u002Fcloud\u002Fagent-platform-migrate-from-ai-studio\u002Fmetadata.json",{"path":56,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":57,"sourceHtmlUrl":58},"verification.json",1278,"https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fpublic\u002Fapi\u002Fskills\u002Fgoogle\u002Fcloud\u002Fagent-platform-migrate-from-ai-studio\u002Fverification.json",[60,67,74,81,88,96],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M78E0TGCAMNPS207BA3G07S7","zkrouter","Self-hosted OpenAI-compatible LLM router — smart tier-based routing, ZK-stamped routing decisions, mode overrides, free OpenRouter at install via the Birth bot. Save 60-80% on inference costs by routing to the cheapest capable model across 12+ OpenRouter models.","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fzkrouter\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M78E0R1Z8BDT6EDTHY17MTNB","zk","For custom ZK Solana programs and privacy-preserving applications to prevent double spending. Guide to integrate rent-free nullifier PDAs for double-spend prevention.","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fzk\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M78E0P3ZTZ1YWF8MD5MM23QE","zk-omni-messaging","Zero-knowledge omnichain messaging between Robinhood Chain and Solana using CheshireZkOmniMessenger (msgType 4) with nullifier anti-replay and the zk-omni-relayer service.","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fzk-omni-messaging\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M78E0JXZ2PNB1896VXAGDBWD","zerion-wallet-data","Use when the user asks to check a wallet's portfolio, token balances, DeFi positions, PnL, transaction history, or NFTs. Provides interpreted on-chain data across 40+ EVM chains and Solana via x402 pay-per-request or API key — no raw RPC decoding needed.","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fzerion-wallet-data\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":92,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M78E0G14FH9GRRTQYMKD5E59","youtube-clipper","YouTube 视频智能剪辑工具。下载视频和字幕，AI 分析生成精细章节（几分钟级别）， 用户选择片段后自动剪辑、翻译字幕为中英双语、烧录字幕到视频，并生成总结文案。 使用场景：当用户需要剪辑 YouTube 视频、生成短视频片段、制作双语字幕版本时。 关键词：视频剪辑、YouTube、字幕翻译、双语字幕、视频下载、clip video","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fyoutube-clipper\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fyoutube-clipper\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":19},"01M78E0C2ZYA99CFFDNB7ZMK5S","yield-optimization","Multi-chain yield optimization via yield.xyz (StakeKit). Discover 2,988+ yield opportunities across 75+ blockchains, build deposit\u002Fwithdrawal transactions with shell scripts, and sign them with a MoonPay wallet. Use when the user wants to earn yield, find the best lending or staking rate, enter\u002Fexit a position, or check portfolio balances.","https:\u002F\u002Fgithub.com\u002FSolizardking\u002Fskillhub-main\u002Fblob\u002Fmain\u002Fskills\u002Fyield-optimization\u002FSKILL.md",[],[]]