How to Manage Vertex AI Agent Builder Deployments with Skills

Use the agent-platform-deploy skill in the google/skills repository to automate the full lifecycle of Vertex AI Agent Platform deployments through a four-phase workflow that includes authentication, model discovery, cost-aware confirmation, and safe deployment with gcloud CLI commands.

Managing Vertex AI Agent Builder (now called Vertex AI Agent Platform) deployments requires careful coordination of authentication, resource selection, cost estimation, and cleanup procedures. The google/skills repository provides a dedicated agent-platform-deploy skill that encapsulates these operations into a structured, safety-gated workflow. This guide walks through the technical implementation found in the skill's source files, demonstrating how to deploy open-weights models from Model Garden while enforcing cost controls and safety tiers.

Understanding the agent-platform-deploy Skill Architecture

The skill is located at skills/cloud/agent-platform-deploy/ within the google/skills repository and follows a strict four-phase process defined in SKILL.md. Each phase maps to specific gcloud CLI operations and safety checks:

  1. Prerequisites & Authentication – Validates gcloud credentials and project configuration
  2. Model Discovery – Lists available Model Garden models and fetches deployment configurations
  3. Cost Estimation & Confirmation – Computes hourly costs and enforces explicit user confirmation
  4. Deployment, Verification, and Cleanup – Executes asynchronous deployment with endpoint testing and managed teardown

The skill implements Tier M (mutating) and Tier D (destructive) safety gates to prevent accidental resource modifications or deletions without explicit confirmation.

Prerequisites and Authentication

Before executing any deployment commands, the skill requires active authentication and project configuration. According to skills/cloud/agent-platform-deploy/SKILL.md, you must run these commands to establish credentials:

gcloud auth login
gcloud auth application-default login
gcloud config set project $PROJECT_ID

These commands ensure the gcloud SDK has both user credentials and application-default credentials required for Vertex AI API interactions. The skill validates this state before proceeding to model discovery to prevent mid-workflow authentication failures.

Model Discovery and Selection

The discovery phase identifies deployable models and their hardware requirements. The skill queries Model Garden to list available models and retrieve specific deployment configurations:


# List all models in Model Garden

gcloud ai model-garden models list

# Get deployment config for a specific model

gcloud ai model-garden models list-deployment-config \
    --model="<PUBLISHER>/<FAMILY>@<VERSION-ID>"

This step returns critical parameters including required machine types (e.g., g2-standard-48), accelerator specifications (e.g., NVIDIA_L4), and accelerator counts. The skill captures these values to populate the deployment script templates and cost estimation calculations.

Cost Estimation and Safety Confirmation

Calculating Hourly Costs

The skill implements a three-tier cost estimation strategy as defined in skills/cloud/agent-platform-deploy/SKILL.md. It first attempts a live price lookup via the estimate_cost tool, falls back to the bundled Python script scripts/calculate_cost.py, and finally references the official pricing page if needed:

python3 scripts/calculate_cost.py --machine-type=g2-standard-48

The estimated hourly cost is presented with a disclaimer that it reflects list pricing and may differ from the actual bill. This transparency prevents unexpected charges before resource provisioning begins.

Understanding Tier M Safety Gates

Because deployment is a Tier M (mutating) operation, the skill enforces explicit user confirmation before executing any gcloud ai model-garden models deploy command. This safety mechanism, embedded in the SKILL file logic, requires affirmative user input to proceed with resource creation, protecting against accidental deployments.

Deploying Models to Vertex AI Agent Platform

Asynchronous Deployment Commands

The skill generates a deployment script using placeholders discovered in previous phases. The deployment runs asynchronously to prevent terminal blocking during the provisioning process:

PROJECT_ID=$(gcloud config get-value project)
LOCATION_ID="us-central1"               # adjust as needed

MODEL_ID="<PUBLISHER>/<FAMILY>@<VERSION-ID>"   # replace with live ID

gcloud ai model-garden models deploy \
    --project=$PROJECT_ID \
    --region=$LOCATION_ID \
    --model=$MODEL_ID \
    --machine-type="g2-standard-48" \
    --accelerator-type="NVIDIA_L4" \
    --accelerator-count=4 \
    --endpoint-display-name="my-open-model-deployment" \
    --asynchronous

The --asynchronous flag immediately returns an operation ID, allowing the workflow to continue with status monitoring rather than waiting for the full provisioning cycle.

Monitoring Deployment Status

To track the asynchronous operation, the skill provides commands to inspect the deployment progress:

gcloud ai operations describe YOUR_OPERATION_ID --region=$LOCATION_ID

This command returns the current state (PENDING, RUNNING, SUCCESSFUL, or FAILED) and error details if the deployment encounters issues. The skill polls this status or provides it for manual monitoring depending on the execution mode.

Verification and Testing

Making Test Predictions via REST API

Once the endpoint is active, the skill provides commands to extract the dedicated endpoint DNS and send test requests. This verification step confirms the deployment is serving traffic correctly:

ENDPOINT_URL=$(gcloud ai endpoints describe $ENDPOINT_ID \
    --project=$PROJECT_ID --region=$LOCATION_ID \
    --format="value(dedicatedEndpointDns)")

curl -X POST \
  -H "Authorization: Bearer $(gcloud auth print-access-token)" \
  -H "Content-Type: application/json" \
  "https://${ENDPOINT_URL}/v1beta1/projects/${PROJECT_ID}/locations/${LOCATION_ID}/endpoints/${ENDPOINT_ID}/chat/completions" \
  -d '{
        "model": "'"$ENDPOINT_ID"'",
        "messages": [{"role":"user","content":"Explain quantum computing in simple terms."}]
      }'

This cURL command validates the full inference pipeline including authentication, network connectivity, and model responsiveness.

Cleanup and Undeployment

Tier M and Tier D Safety Operations

The skill provides a complete cleanup workflow to stop billing when models are no longer needed. This involves Tier M operations (undeploying) followed by Tier D (destructive) operations (deletion):


# List endpoints to find the correct ENDPOINT_ID

gcloud ai endpoints list --project=$PROJECT_ID --region=$LOCATION_ID

# List models to find the deployed model ID

gcloud ai models list --project=$PROJECT_ID --region=$LOCATION_ID

# Undeploy the model (Tier M - requires confirmation)

gcloud ai endpoints undeploy-model $ENDPOINT_ID \
    --project=$PROJECT_ID --region=$LOCATION_ID \
    --deployed-model-id=$DEPLOYED_MODEL_ID

# Delete the endpoint and model (Tier D - destructive, requires confirmation)

gcloud ai endpoints delete $ENDPOINT_ID --project=$PROJECT_ID --region=$LOCATION_ID --quiet
gcloud ai models delete $MODEL_ID --project=$PROJECT_ID --region=$LOCATION_ID --quiet

Each deletion command triggers the skill's safety tier logic, requiring explicit confirmation before removing resources and preventing accidental data loss.

Summary

  • The agent-platform-deploy skill in google/skills provides a complete workflow for managing Vertex AI Agent Platform deployments through four distinct phases.
  • Safety tiers (Tier M for mutating, Tier D for destructive) enforce explicit confirmations before executing commands that modify or delete resources.
  • Cost estimation uses a fallback chain from live pricing to scripts/calculate_cost.py to ensure users understand hourly expenses before deployment.
  • Asynchronous deployment with --asynchronous flags prevents workflow blocking while providing operation IDs for status monitoring.
  • The skill includes complete verification and cleanup scripts, ensuring users can test endpoints and stop billing when resources are no longer needed.

Frequently Asked Questions

What is the difference between Vertex AI Agent Builder and Vertex AI Agent Platform?

Vertex AI Agent Builder was the original name for Google's managed service for deploying, serving, and monitoring large language-model agents. It has been rebranded as Vertex AI Agent Platform, though the underlying infrastructure and gcloud CLI commands remain consistent. The agent-platform-deploy skill in the google/skills repository references both terms but targets the current Platform implementation.

How does the skill calculate deployment costs when live pricing is unavailable?

The skill implements a three-tier fallback system defined in skills/cloud/agent-platform-deploy/SKILL.md. It first attempts to query live pricing APIs via the estimate_cost tool. If that fails, it executes the local Python utility scripts/calculate_cost.py with parameters like --machine-type=g2-standard-48 to compute hourly costs based on predefined rates. If both automated methods fail, it directs users to the official Google Cloud pricing page for manual verification.

Why does the deployment command require explicit confirmation?

The deployment command is classified as Tier M (mutating) according to the skill's safety tier logic embedded in SKILL.md. Because deploying a model provisions billable resources including compute instances and accelerators, the skill enforces an explicit confirmation step before executing gcloud ai model-garden models deploy. This prevents accidental resource creation and unexpected cloud charges.

Can I deploy a tuned model rather than an open-weights model from Model Garden?

Yes, the skill supports deploying first-party (1P) tuned models through the workflow documented in skills/cloud/agent-platform-deploy/references/copy_deploy_guide.md. This guide describes how to copy a tuned model artifact to a new endpoint location before deployment, using the same authentication and safety mechanisms as open-weights deployments but with additional steps to handle the custom model registry.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →