Agent Platform Migrate From AI Studio
GoogleOfficialPublished by Google
- Skill
- Workflow
- Cloud and DevOps
- Apache-2.0
- Medium risk
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a structured migration path for developers and organizations transitioning from the Google AI Studio ecosystem to the Google Cloud Agent Platform (formerly Vertex AI). It covers the necessary steps to unify inferencing pipelines, IAM security, billing, and telemetry within Google Cloud infrastructure. The guide includes specific instructions for configuring authentication, setting up billing alerts, and updating environment variables for SDKs, Agent Development Kit (ADK), and OpenClaw integrations.
What it does
- Provides a step-by-step migration path from AI Studio to Google Cloud Agent Platform.
- Explains how to configure Google Cloud IAM roles and service accounts for secure inferencing.
- Details the process for enabling the Agent Platform API and setting up billing budgets.
- Offers configuration guidance for integrating Gemini models with ADK and OpenClaw.
- Includes instructions for setting environment variables to switch SDK routing to enterprise endpoints.
- Provides mandatory usage attribution instructions for terminal commands.
When to use it
- When you need to apply Google Cloud credits to Gemini API inferencing costs.
- When you require enterprise-grade security, IAM, and compliance features.
- When you want to consolidate your AI infrastructure with existing Google Cloud services.
- When you need to move from shared rate-limited endpoints to provisioned throughput.
- When you are deploying agents on Google Cloud VMs and require unified billing.
Advantages
- Enables the use of Google Cloud credits for AI inferencing.
- Provides enterprise-level data privacy, compliance, and SLAs.
- Allows for granular IAM control and integration with existing cloud telemetry.
- Supports both global and regional inferencing endpoints.
- Facilitates a unified billing structure for all cloud infrastructure.
Usage examples
- “How do I start migrating my Gemini API project to the Agent Platform?”
- The agent will outline the prerequisites, including setting up a billing account, enabling the aiplatform API, and configuring IAM permissions.
- “Help me configure my OpenClaw agent to use Gemini on Vertex AI.”
- The agent will provide the specific configuration steps for the openclaw.json file and explain how to set up the required service account credentials.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/google/agent-platform-migrate-from-ai-studio/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip agent-platform-migrate-from-ai-studio.zip -d .agents/skills
Documentation by Google
Migrating from Gemini API in AI Studio to Agent Platform
Use this skill when you need to transition an application from the
developer-centric Google AI Studio ecosystem
(generativelanguage.googleapis.com) to the enterprise-grade Google Cloud Agent
Platform (aiplatform.googleapis.com).
Attribution
MUST READ: Before executing any gcloud, REST API, or MCP command, you
MUST read Usage Attribution. For commands executed
directly in the terminal (never in generated scripts, Terraform, or user code),
prefix gcloud with
CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:agent-platform-migrate-from-ai-studio)"
and append
agent-skills/1.0 (skill:agent-platform-migrate-from-ai-studio)
to User-Agent headers.
When to Invoke This Skill
You want to migrate an application from Google AI Studio to Agent Platform (formerly Vertex AI).
You have Google Cloud credits (e.g., the $300 Welcome Free Trial) that you want to apply toward Gemini API inferencing costs.
You need to unify your inferencing pipelines, IAM permissions, telemetry, and billing with existing Google Cloud infrastructure (Compute Engine, Cloud SQL, BigQuery).
You are deploying open-source orchestration engines (like OpenClaw or ADK agents) on Google Cloud VMs, and want the entire system to run under a unified Google Cloud billing structure.
Gemini API Comparison
| Feature / Control | Google AI Studio (Gemini Developer API) | Agent Platform (Enterprise Gemini API) |
|---|---|---|
| API Endpoint | generativelanguage.googleapis.com | aiplatform.googleapis.com |
| Target Audience | Developers, startups, students, researchers building production apps. | Enterprise production, MLOps engineers |
| GCP Credit Support | No (GCP credits/Free Trial cannot be applied) | Yes (Fully covered by Welcome or custom credits) |
| Data Privacy | Data may be reviewed to improve Google products | Prompts/responses are never used for training |
| Security & IAM | API key, OAuth | Google Cloud IAM (Service Accounts, OAuth 2.0, VPC-SC) |
| Compliance & SLAs | None (Best-effort availability) | 24/7 Enterprise Support, SLAs, HIPAA, SOC2 |
| Throughput Options | Shared / Rate-limited | Pay-as-you-go OR Provisioned Throughput |
| MLOps Ecosystem | Basic prompt management | Model Registry, Model Monitoring, Pipeline Evaluation |
| Inferencing Scope | Global endpoints only | Both Global and strict Regional endpoints |
See Google Cloud Documentation to learn more about the differences between the two offerings.
Migration Guide
Billing and Credits
Google Cloud Free Trial credits do not apply to AI Studio. To use your credits for Gemini models, you must route calls through the Agent Platform.
Create a Google Cloud billing account. You must provide a valid payment method during setup to verify identity.
If you are a new customer, ensure your $300 Welcome credit is active in the Billing Console.
Avoid Billing Surprises: To prevent automatic fallback to your standard form of payment when credits are exhausted, you should establish a budget alert:
Go to Billing -> Budgets & Alerts -> Create Budget.
Set the threshold to map to your credit limit or maximum comfortable spend.
Enable the Agent Platform API
You must explicitly enable the Agent Platform API on your target Google Cloud Project. Run the following command via your local shell:
gcloud services enable aiplatform.googleapis.com --project="{project_id}"Authentication & Authorization (IAM)
User Auth
For local debugging or script execution, authenticate using Application Default Credentials (ADC).
Option 1 - Automated Script:
bash <(curl -sSL https://storage.googleapis.com/cloud-samples-data/adc/setup_adc.sh)Option 2 - Manual Setup:
gcloud auth login
gcloud auth application-default loginGrant your user identity the required IAM role to perform inferencing calls:
gcloud projects add-iam-policy-binding "{project_id}" \
--member="user:[email protected]" \
--role="roles/aiplatform.user"Service Auth
When running your application on Google Cloud infrastructure such as a Compute Engine VM, authenticate using the machine's attached Service Account. For example, the Compute Engine Default Service Account.
Grant the virtual machine's underlying Service Account the user role:
gcloud projects add-iam-policy-binding "{project_id}" \
--member="serviceAccount:[email protected]" \
--role="roles/aiplatform.user"Compute Engine Access Scopes: Legacy access scopes can override IAM bindings. When provisioning or modifying your Compute Engine instance, you must verify that the VM access scope is configured to either Allow full access to all Cloud APIs (
https://www.googleapis.com/auth/cloud-platform) or explicitly includes the standard cloud-platform scope.
Use the Gemini API in Agent Platform
SDKs (Client Libraries)
You can continue to use the unified
Google GenAI SDK
(google-genai). This SDK works with both AI Studio and Agent Platform. You
only need to switch the routing flags via your runtime environment variables to
target the Agent Platform backend.
Set your target environment details:
export GOOGLE_CLOUD_PROJECT="{project_id}"
export GOOGLE_CLOUD_LOCATION="global" # Or your chosen regional endpoint
export GOOGLE_GENAI_USE_ENTERPRISE=TRUENow, your standard python code shifts from using AI Studio to Agent Platform without altering the core initialization blocks:
from google import genai
# The client automatically picks up the GOOGLE_GENAI_USE_ENTERPRISE=TRUE environment flag
client = genai.Client()
response = client.models.generate_content(
model='gemini-3-flash-preview',
contents='Hello world!',
)
print(response.text)Agent Development Kit (ADK)
To call Gemini models in Agent Platform from an Agent Development Kit agent, follow these steps.
Authenticate to Google Cloud.
If running an ADK agent in Google Cloud (e.g. Agent Platform Runtime), use the agent's assigned service account. Alternatively, if running ADK locally, run:
gcloud auth application-default loginSet env variables. Ensure these are set no matter if your ADK agent is running in Google Cloud or locally:
export GOOGLE_CLOUD_PROJECT="{project_id}"
export GOOGLE_CLOUD_LOCATION="global"
export GOOGLE_GENAI_USE_ENTERPRISE=TRUEInitialize the ADK agent. You can use the same model string you used with AI Studio (e.g.
gemini-3-flash-preview).
from google.adk.agents.llm_agent import Agent
def get_current_time(city: str) -> dict:
"""Returns the current time in a specified city."""
return {"status": "success", "city": city, "time": "10:30 AM"}
root_agent = Agent(
model='gemini-3-flash-preview',
name='root_agent',
description="Tells the current time in a specified city.",
instruction="You are a helpful assistant that tells the current time in cities. Use the 'get_current_time' tool for this purpose.",
tools=[get_current_time],
)To learn more about integrating ADK agents with Agent Platform, see the ADK documentation.
Antigravity CLI
Google Cloud users can now access Antigravity 2.0, including the Antigravity CLI, with Gemini Enterprise Agent Platform.
Install the Antigravity CLI to your local environment.
Start the Antigravity CLI.
agyFollow the CLI setup prompts - select Use a Google Cloud Project.
Complete the OAuth flow in the opened browser window using your authenticated Google Cloud Workspace or user identity.
Copy the confirmation token, and paste it directly back into your terminal.
Follow the prompts to enter your Google Cloud Project ID.
Select your Google Cloud location (e.g.
global).Optionally, run the
/modelcommand to select a different Gemini model in Agent Platform.
OpenClaw
To configure an OpenClaw agent to use Gemini models in Agent Platform, Follow these steps.
⚠️ Important: OpenClaw 2026.5.28 currently has a google-vertex bug. Please use
2026.5.20 for now.
Ensure that the runtime where OpenClaw is running (e.g. GCE VM with Service Account) has the
aiplatform.userIAM role - see Authentication and Authorization section above.Get the project number from the user's project ID. Outside of GCE, run:
export PROJECT_NUMBER=$(gcloud projects describe "$PROJECT_ID" --format="value(projectNumber)")
echo "Project number: $PROJECT_NUMBER"
Within a Compute Engine VM, run:
export PROJECT_NUMBER=$(curl "http://metadata.google.internal/computeMetadata/v1/project/project-id" -H "Metadata-Flavor: Google")
echo "Project number: $PROJECT_NUMBER"From outside the GCE instance, generate
GOOGLE_APPLICATION_CREDENTIALSusing the Google Cloud project number. Then,scpthese credentials to the GCE VM.
mkdir -p ~/.config/gcloud
gcloud iam service-accounts keys create ~/.config/gcloud/application_default_credentials.json --iam-account="${PROJECT_NUMBER}[email protected]"⚠️ Troubleshooting Policy Constraints on New Orgs: New Google Cloud organizations (created on or after May 4th, 2024) enforce a legacy Organization Policy, restricting Service Account Key Creation. To complete this step, this Org Policy must be temporarily disabled. An Organization Policy Admin must set this policy to Inactive. To the agent: Check if this policy is enforced, and if it is: pause, and prompt the user to disable it at this Console link: https://console.cloud.google.com/iam-admin/orgpolicies
Edit the configuration file that's usually located at:
~/.openclaw/openclaw.json. Ensure you prefix the Gemini model withgoogle-vertex/.
⚠️ Important: Do not use Gemini 3.5 models, since OpenClaw's
google-vertexprovider does not support it yet. Older models work. When using the Gemini 3 Flash Preview model in Agent Platform, always set the location toglobal, NOT a regional endpoint.
{
"env": {
"vars": {
"GOOGLE_CLOUD_PROJECT": "PROJECT_ID",
"GOOGLE_CLOUD_LOCATION": "global",
"GOOGLE_APPLICATION_CREDENTIALS": "~/.config/gcloud/application_default_credentials.json"
}
},
"agents": {
"defaults": {
"model": {
"primary": "google-vertex/gemini-3-flash-preview"
},
"workspace": "~/.openclaw/workspace",
"compaction": {
"mode": "safeguard"
},
"heartbeat": {
"model": "google-vertex/gemini-3-flash-preview"
}
},
"list": [
{
"id": "main",
"workspace": "~/.openclaw/workspace",
"model": "google-vertex/gemini-3-flash-preview"
}
]
},
"session": {
"dmScope": "per-channel-peer"
},
"tools": {
"profile": "coding"
}
}
Restart OpenClaw.
openclaw gateway restart
Verify the OpenClaw connection to Agent Platform:
openclaw models status
openclaw agent --agent main --message "Hello world!"
Additional Resources
Files
- ATTRIBUTION.mdAdded by AutoGineer892 B
- LICENSELicence file added by AutoGineer11.1 KiB
- SKILL.md14.2 KiB
- references/attribution.md1.9 KiB
ATTRIBUTION.md
Attribution
This folder is an unmodified copy of the Agent Skill "agent-platform-migrate-from-ai-studio", distributed by AutoGineer (https://autogineer.com/agent-skills).
Commit: 2194d3b8b1f31975fef2f1a0ae6b9ab55bd7ceee
Published by: Google (https://github.com/google)
Publisher: Google (https://github.com/google)
Licence: Apache License 2.0 (https://github.com/google/skills/blob/2194d3b8b1f31975fef2f1a0ae6b9ab55bd7ceee/LICENSE)
Licence evidence: repository licence LICENSE
Retrieved: 2026-11-07
The skill's own files are unmodified copies. AutoGineer is not affiliated with or endorsed by the author or the publisher.
Files added by AutoGineer
ATTRIBUTION.md: this file, written by AutoGineer
LICENSE: copied from LICENSE
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs network access, Needs an API key, Needs a command-line tool, Needs Python
Security
What our scanner noticed· Medium risk
- References to credential files
- Instructions that use the network
- Downloads piped into a shell
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Publisher
- Google (Official)
- Source
- google/skills · skills/cloud/agent-platform-migrate-from-ai-studio · commit 2194d3b
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Google.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download agent-platform-migrate-from-ai-studio.zip