All skills
google avatar

/agent-platform-deploy

@99c871e
by googlegoogle/skills21k stars
1,698

Deploy open models or custom weights from Model Garden to Agent Platform endpoints, check the status of an in-progress deployment operation, or clean up resources by undeploying models and deleting endpoints. Use when asked to actively deploy a model, list the Model Garden CATALOG of available models, check if a specific model is deployable (`gcloud ai model-garden models list-deployment-config`), query deployment cost, troubleshoot deployment errors (like quota limits), or undeploy/clean up endpoints. Also use when copying and deploying a 1P Tuned Model. Don't use for pure listing/discovery questions of the form "is X deployed?", "list my endpoints", or "which regions have models running?" — for those use `agent-platform-endpoint-management`. Don't use for running model evaluations (use `agent-platform-eval-flywheel` skill).

Use this Skill: https://skilld.dev/gh/google/skills/agent-platform-deploy

This session only. Nothing lands on disk.

referencesundeploy_guide.md

≈526 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Undeploying and Cleaning Up

To stop incurring charges, you must undeploy the model from the endpoint. This is a multi-step process if you don't already have the exact endpoint and deployed model IDs.

Example: Finding and Undeploying a Model

Here is a bash script demonstrating how to find the IDs and undeploy the model.

#!/bin/bash
# Example script to undeploy a model

PROJECT_ID=$(gcloud config get-value project)
LOCATION_ID="us-central1"
# The model ID used during deployment.
# It is usually easiest to find via `gcloud ai models list`.

# 1. Find the Endpoint ID
echo "Listing endpoints in ${LOCATION_ID}:"
gcloud ai endpoints list --project=${PROJECT_ID} --region=${LOCATION_ID}

# (Assuming you extracted ENDPOINT_ID from the above output)
# ENDPOINT_ID="your_endpoint_id"

# 2. Find the Deployed Model ID
echo "Listing models in ${LOCATION_ID} to find model description:"
gcloud ai models list --project=${PROJECT_ID} --region=${LOCATION_ID}

# (Assuming you found the specific MODEL_ID)
# MODEL_ID="your_model_id"
# gcloud ai models describe ${MODEL_ID} \
#     --project=${PROJECT_ID} --region=${LOCATION_ID}
# (Extract the deployedModelId from the output)
# DEPLOYED_MODEL_ID="your_deployed_model_id"

# 3. Undeploy
echo "Undeploying model ${DEPLOYED_MODEL_ID} from endpoint ${ENDPOINT_ID}..."
gcloud ai endpoints undeploy-model ${ENDPOINT_ID} \
    --project=${PROJECT_ID} \
    --region=${LOCATION_ID} \
    --deployed-model-id=${DEPLOYED_MODEL_ID}

echo "Model undeployed."

# 4. Delete Endpoint
echo "Deleting endpoint ${ENDPOINT_ID}..."
gcloud ai endpoints delete ${ENDPOINT_ID} \
    --project=${PROJECT_ID} \
    --region=${LOCATION_ID} \
    --quiet
echo "Endpoint deleted."

# 5. Delete Model
echo "Deleting model ${MODEL_ID}..."
gcloud ai models delete ${MODEL_ID} \
    --project=${PROJECT_ID} \
    --region=${LOCATION_ID} \
    --quiet
echo "Model deleted."

[!WARNING] Failing to undeploy a model will result in continuous charges for the allocated compute resources, even if you are not sending prediction requests. Always clean up after testing.

Source: SKILL.md on GitHub

No alerts1d3 checks · Risk SAFE
  • Gen Agent Trust Hub1d

    This skill facilitates model deployment on Google Cloud's Agent Platform with built-in safety confirmations for mutating tasks. There are security considerations related to potential command injection in helper scripts and the use of administrative IAM commands, which should be reviewed to ensure proper sanitization and least-privilege access.

  • Socket1d

    No alerts

  • Snyk1d

    Risk: LOW · No issues

Signed by skilld at 99c871e. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 2 days ago
metadata
{
  "version": "1.0.3",
  "category": "AiAndMachineLearning"
}

README badge

README badge for google/skills/agent-platform-deploy