CloudBrum
CloudBrum · Cloud decision-support platform
Google Cloud AI and machine learning

Gemini Enterprise Agent PlatformLast reviewedReading time~12 minLevelBeginner to advanced

Google Cloud · AI and machine learning · Model training and hosting

Google’s one place for models, from a scikit-learn script to Gemini. You train in custom jobs or AutoML, keep versions in a registry and serve them from endpoints. Google renamed Vertex AI to the Gemini Enterprise Agent Platform in April 2026 and added agent tooling on top, but the machine learning tools carry on, and the API, the gcloud ai commands and the Python package still say Vertex AI or aiplatform. As elsewhere, an endpoint that sits idle is where money quietly leaks.

On this page (17 sections)

    Mind map: Gemini Enterprise Agent Platform at a glance

    Gemini Enterprise Agent Platform mind map Gemini Enterprise Agent Platform at a glance: Build: Workbench notebooks, Colab Enterprise, BigQuery data; Train: Custom jobs, Spot and Flex-start, GPUs and TPUs; AutoML & tuning: AutoML, Hyperparameter tuning, Ray on Vertex; Serve: Online endpoints, Traffic split, Batch prediction; MLOps: Pipelines, Model Registry, Experiments; Models: Model Garden, Gemini tuning, Prebuilt containers; Govern: Model Monitoring, Explainable AI, Evaluation; Pricing: Machine node-hours, Endpoints bill while up, Committed use. Gemini Enterprise Agent Platform (Vertex AI) at a glance Training, serving and MLOps on Google Cloud: the main building blocks and decisions CloudBrum Cloud decision-support platform CloudBrum Workbench notebooks Colab Enterprise BigQuery data Build Custom jobs Spot and Flex-start GPUs and TPUs Train AutoML Hyperparameter tuning Ray on Vertex AutoML & tuning Online endpoints Traffic split Batch prediction Serve Pipelines Model Registry Experiments MLOps Model Garden Gemini tuning Prebuilt containers Models Model Monitoring Explainable AI Evaluation Govern Machine node-hours Endpoints bill while up Committed use Pricing Vertex AI17-point analysis CloudBrum· 17-point cloud service analysis cloudbrum.com
    CloudBrum Vertex AI at a glance · 17-point analysis Build Workbench notebooks Colab Enterprise BigQuery data Train Custom jobs Spot and Flex-start GPUs and TPUs AutoML & tuning AutoML Hyperparameter tuning Ray on Vertex Serve Online endpoints Traffic split Batch prediction MLOps Pipelines Model Registry Experiments Models Model Garden Gemini tuning Prebuilt containers Govern Model Monitoring Explainable AI Evaluation Pricing Machine node-hours Endpoints bill while up Committed use CloudBrum · cloudbrum.com

    Free to share. The downloaded image includes the CloudBrum link.

    Key features (summary)

    • Notebooks next to your dataWorkbench instances and Colab Enterprise notebooks both reach BigQuery and Cloud Storage with your own identity, so there’s little to set up before you can explore data.
    • Custom training without servers to manageDescribe the machines and a container (or a Python script with a prebuilt image) and Vertex AI creates them, runs the job, writes the model to Cloud Storage and removes the machines.
    • GPUs, TPUs and cheaper capacityAttach GPUs or TPUs to a job, run on Spot VMs for a discount, or use Flex-start to queue for scarce GPUs until they’re available.
    • AutoML and tuningAutoML builds models for tables, images, text and video from labelled data. Hyperparameter tuning, backed by Vizier, runs many trials to find settings that score best.
    • Endpoints that scaleDeploy models to an endpoint with a minimum and maximum replica count, split traffic between versions, and use batch prediction when you don’t need an answer straight away.
    • Pipelines and a model registryPipelines are written with the Kubeflow Pipelines SDK and run as managed jobs. The Model Registry keeps versions and aliases that deployments can point to.
    • Model Garden and GeminiA catalogue of Google, open and partner models you can try, deploy or tune, next to the Gemini models and the agent tools the platform now leads with.
    • Watching and explaining modelsModel Monitoring spots skew and drift in live traffic, and Explainable AI shows which inputs pushed a prediction up or down.

    Basic concepts

    Custom job
    A training run you define: machine types, replica count, a container or script, and an output location. Vertex AI creates and removes the machines.
    Training pipeline
    A custom job plus the step that turns its output into a registered model. AutoML uses the same idea.
    Prebuilt container
    A maintained image for common frameworks (scikit-learn, XGBoost, TensorFlow, PyTorch) for training or prediction, so you don’t build your own.
    Model Registry
    The place where models and their versions live, with labels, aliases and links to the jobs that produced them.
    Endpoint
    A URL for online prediction. One endpoint can hold several deployed models with a traffic split between them.
    Deployed model
    A model version running on machines in an endpoint, with a machine type and a minimum and maximum replica count.
    Replica
    One copy of a deployed model’s serving container on a machine. Autoscaling moves the count between your minimum and maximum.
    Batch prediction
    A job that scores a file or table without an endpoint and writes results out, charging only while it runs.
    Service account
    The identity a job or endpoint runs as. Its roles decide which buckets, tables and secrets the code can touch.
    Pipeline
    A graph of steps defined with the Kubeflow Pipelines SDK and run as a managed job with caching and lineage.
    Workbench
    Managed JupyterLab instances for development. They bill while running, and can be set to shut down when idle.
    Spot VM
    Spare capacity at a discount that Google can reclaim, so training must checkpoint.
    Flex-start
    A scheduling option that queues a job until the GPU capacity it needs is available.
    Model Garden
    A catalogue of Google, open and partner models you can try in the console, deploy to an endpoint or tune.

    How to create & configure it

    Run your first training job and endpoint in the Google Cloud console

    1. Pick a project, enable the API and choose a RegionCreate or choose a project with billing attached, enable the Vertex AI API, and choose a Region near your data and users (Mumbai asia-south1 or Delhi asia-south2 for India). Everything below lives in that Region.
    2. Check quotaIn IAM and Admin, Quotas, look at custom training and GPU lines for the Region. A new project may start with low or zero GPU quota, and requests take time.
    3. Make a bucket and a service accountCreate a Cloud Storage bucket in the same Region for data, staging and model output. Create a service account for training and give it access to that bucket and to Vertex AI only.
    4. Open a notebookStart a Workbench instance or a Colab Enterprise notebook, check the idle shutdown setting, and explore the data. Write a training script that saves its model to the directory in the AIP_MODEL_DIR environment variable.
    5. Run a custom training jobUnder Training, create a custom job with a prebuilt scikit-learn or XGBoost container, your script, a small machine type and the service account. Use Spot VMs if the job can restart.
    6. Upload the modelImport the model from Cloud Storage into the Model Registry with the matching prebuilt prediction container, and add labels that say where it came from.
    7. Deploy to an endpointCreate an endpoint, deploy the model with a machine type, a minimum of one replica and a maximum that fits your budget, and route all traffic to it.
    8. Send a test requestUse the console’s test panel or the command line with a body such as {"instances": [[34, 2, 79.5, 1]]}, and check the response and the endpoint’s metrics.
    9. Set alarms and clean upAdd alerts on error rate and latency, set a budget, and undeploy and delete test endpoints the same day, since an endpoint bills while its replicas run.

    Tip: when the console steps feel familiar, put them in a script or in code (gcloud, the Python SDK, Terraform, see the code references) so the same setup can be rebuilt in another project and reviewed like any change.

    Common issues after configuration

    SymptomLikely causeWhat to check / fix
    403 with aiplatform.endpoints.predict deniedThe caller’s identity lacks the permission on that endpointGrant the role roles/aiplatform.user (or a custom role with that permission) to the service account or user making the call, on the project or endpoint.
    RESOURCE_EXHAUSTED or a quota error when you start a jobThe Region has no quota left for that machine type or GPUCheck the quota page for the exact metric named in the error, ask for an increase, try another Region or machine, or use Flex-start so the job waits for capacity.
    Job fails with the replica exiting with a non-zero statusYour training code raised an error or ran out of memoryOpen the job’s logs in Cloud Logging, find the stack trace before the exit, and rerun locally in the same container. Raise the machine memory if the job was killed.
    The model deploys but never becomes readyThe serving container didn’t start or the artifact isn’t in the layout it expectsRead the endpoint’s logs. For a prebuilt container the artifact folder must hold the file name it expects (such as model.joblib for scikit-learn). Check the container version matches the framework.
    INVALID_ARGUMENT on deploy for the machine typeThat machine type or accelerator isn’t offered in the Region or for that containerCheck the supported machine types for online prediction in the docs, and pick one in your Region.
    Requests fail with an error for the first call after a quiet periodThe endpoint is configured to scale to zero, or replicas are being addedAdd client-side retries with backoff, or keep a minimum of one replica where latency matters.
    The request body is rejectedIt doesn’t match the container’s formatPrebuilt containers expect {"instances": [...]} with rows in the order the model was trained. Check the request against the model’s input.
    Training can’t read the data in Cloud StorageThe job’s service account lacks access, or the bucket is in a different RegionGive the service account roles/storage.objectViewer on the bucket, and keep data and training in the same Region.
    A Spot job keeps being interruptedNo checkpointing, so it restarts from zero each timeSave checkpoints to Cloud Storage regularly and load the newest when the script starts, or move to standard VMs for that run.
    Old samples fail with import or class errorsThe Python SDK and the renamed products moved onPin the google-cloud-aiplatform version your sample was written for, and compare with the current reference. Names in the console and docs now say Agent Platform in several places.
    The bill shows charges with no jobs runningA deployed endpoint, a Workbench instance or an unattached diskList endpoints, notebooks and disks in each Region. Undeploy what you don’t use, and use Billing reports grouped by SKU and label.

    Use cases: when and where to use it

    Good fit

    • Teams already using BigQuery and Cloud Storage that want training next to the data
    • Training from a notebook script to a hosted model with managed machines and a clear registry
    • Tuning, evaluating and serving Gemini and open models from the same project as your classic ML
    • Scheduled retraining with Kubeflow Pipelines style workflows and lineage
    • GPU or TPU training with a way to queue for scarce capacity
    • Scoring large tables overnight with batch prediction

    Consider something else

    • Training a simple model inside your data warehouse → BigQuery ML, with no separate platform
    • Off-the-shelf APIs for images, speech or text → the Google Cloud AI APIs
    • Calling hosted Gemini, Claude or open models without training anything → the Gemini API and Model Garden page
    • Searching and chatting over your own documents without writing model code → the platform’s agent and search tools
    • A small model that fits in a function → Cloud Run functions, without an endpoint
    • The same job on other clouds → compare Amazon SageMaker and Azure Machine Learning

    Pros: why consider it?

    Why teams choose it

    • One platform for classic machine learning and Google’s generative AI models
    • Managed training that creates and removes machines for each run
    • Spot VMs and Flex-start give two different ways to get hold of capacity
    • Close to BigQuery, Cloud Storage and Looker, so data doesn’t have to be copied around
    • Open tooling: Kubeflow Pipelines, Ray, standard containers and framework-native prediction images
    • Endpoints can be tuned to scale between a minimum and a maximum, and can run with a minimum of zero

    Trade-offs to weigh

    • The rename is recent, so documentation, console labels and blog posts disagree on what to call things
    • Online endpoints bill by node-hour while deployed
    • Quotas for GPUs and custom training catch new projects
    • Sub-products have been renamed and reorganised, and some modules carry their own deprecation dates
    • Cold starts on scale-to-zero endpoints can fail or lag the first request
    • Cost spreads over several SKUs (training, prediction, storage, generative), which takes effort to read

    Common threats, vulnerabilities & risks

    RiskSeverityWhy it mattersMitigation
    A deployed endpoint nobody usesHighReplicas bill by the node-hour, and an accelerator-backed endpoint costs real money every day.Budget alerts, an owner label on every endpoint and a weekly list of what is deployed.
    Training service account with the Editor roleHighThe code in the job can then read and change nearly everything in the project.A dedicated service account with only the buckets, tables and secrets the job needs.
    Sensitive data in notebooks and buckets without controlsHighNotebooks pull in whole tables, and buckets get shared too widely.Private buckets, CMEK where required, VPC Service Controls, and no external IPs on notebooks.
    Prediction endpoints open to the public internetMediumA public endpoint with broad permissions invites abuse and cost.Use private endpoints or Private Service Connect where you can, and grant aiplatform.user narrowly.
    Unreviewed model versions deployedMediumA model uploaded from a notebook can go live if the process allows it.Promote only registry versions produced by a pipeline, and require review before changing an endpoint.
    Drift and skewMediumThe data in production moves away from the training data, and accuracy slides.Turn on Model Monitoring with alerts, and retrain on a schedule or when drift crosses a threshold.
    Unpinned containers and packagesMediumPrebuilt image tags and pip installs change under you.Fix the package versions, build images in a pipeline and let Artifact Registry scan them.
    Bias in predictionsLow–MedTraining data carries history with it, and a model fitted to it can repeat unfair patterns.Evaluate across slices before release, and keep the results with the registered model.
    Data residencyLow–MedResources created in the wrong Region can break data location rules.Use organisation policy to limit locations, and set the Region in every command and client.

    Performance optimisation

    • Pick the machine type from a test. Many tabular models run well on a small CPU machine, and a GPU only pays off when your framework uses it.
    • Keep data and compute in one Region, and read from Cloud Storage or BigQuery directly rather than copying files onto every worker.
    • For large models, go distributed (multiple workers, TPUs or Ray), and check the network and input pipeline before adding machines.
    • Tune hyperparameters with early stopping so poor trials end quickly, and cap the parallel and total trial counts.
    • Set endpoint autoscaling on CPU or accelerator use, load-test it, and keep the minimum above zero where first-request delay hurts.
    • Send batches of instances in one request when the model allows it.
    • Optimised prediction containers and quantised models cut latency and machine size.
    • Use batch prediction for large offline scoring rather than looping over an online endpoint.

    Reduce monthly cost

    FinOps is the habit of managing cloud spend together with engineering. These are the FinOps checks that matter most for Gemini Enterprise Agent Platform.

    • Run restartable training on Spot VMs with checkpoints, and pick Flex-start when you need GPUs and can wait.
    • Undeploy and delete test endpoints the same day. They bill by node-hour while replicas run.
    • Set a sensible maximum replica count, and consider a minimum of zero for traffic that comes in bursts, with retries on the client.
    • Score on a schedule with batch prediction, so no machines run between jobs.
    • Shut down Workbench instances when idle, using the idle shutdown setting, and delete the disks you no longer need.
    • Right-size machines from monitoring graphs, and move to a smaller type when the use is low.
    • Look at committed use discounts for steady GPU or CPU usage once you know your baseline.
    • Try a smaller or tuned model before a bigger one. For generative models, watch token use as its own cost line.
    • Keep training data in compact formats such as Parquet and clear out old staging buckets, artifacts and model versions.
    • Put labels on jobs, endpoints and notebooks, and build billing reports and budgets per label.

    Take the prices and offers here as illustrations from Google's public pages. Machine type, Region and time all move them, so confirm current numbers first (see Pricing).

    Security optimisation

    • Run jobs and endpoints as dedicated service accounts, with narrow roles on the buckets, datasets and secrets they use. Avoid the Editor role.
    • Wrap Vertex AI, Cloud Storage and BigQuery in VPC Service Controls to limit data exfiltration, and serve predictions over Private Service Connect or private endpoints.
    • Turn off external IP addresses on notebooks and training machines where you can, and use Private Google Access.
    • Where policy requires it, encrypt models, datasets and endpoints with customer-managed keys (CMEK).
    • Grant roles/aiplatform.user on named projects or endpoints, and keep admin roles for the few people who manage them.
    • Build custom containers in a pipeline from pinned packages, store them in Artifact Registry and scan them.
    • Restrict locations, external IPs and service account key creation with organisation policies.
    • Enable Cloud Audit Logs (including data access logs for Vertex AI where needed) and review who created, deployed and called what.
    • Monitor models and evaluate them, and keep the results with the registered model version.
    • Scan training sets with Sensitive Data Protection to find personal data before it is used.

    Governance & compliance

    Guardrails

    • Label rules for jobs, endpoints and notebooks (owner, project, data class, cost centre) checked at creation
    • An organisation policy that restricts Regions, external IP addresses and service account keys
    • A starter pipeline for new projects that already includes evaluation, registration and a deployment gate
    • An approved list of machine types and accelerators, with larger ones going through review

    Continuous checks (Security Command Center and organisation policy)

    • “constraints/gcp.resourceLocations” to restrict where resources can be created
    • “constraints/compute.vmExternalIpAccess” to stop external IPs on machines
    • “constraints/iam.disableServiceAccountKeyCreation” for service account keys
    • Security Command Center findings for public buckets and over-broad roles
    • A scheduled report of endpoints that have been deployed longer than a set time

    Use Cloud Audit Logs to see who started jobs and changed endpoints, Cloud Asset Inventory and Security Command Center for configuration and posture, Dataplex for data catalogue and lineage, and the Compliance resource centre for reports. The split of duties is the usual one: Google runs the platform, and you are responsible for the data, how the model behaves, who can access it and how changes are reviewed.

    Reduce carbon footprint

    • Train less often, on a schedule that matches how fast your data really changes.
    • Try a smaller model, or a tuned small model, before a large one. It costs less and uses less energy.
    • Use batch prediction and scale-to-zero settings so accelerators aren’t idling.
    • Use Spot VMs and Flex-start, which run on capacity that would otherwise sit unused.
    • Choose a Region with lower carbon intensity for training that no one is waiting on. Google Cloud publishes carbon-free energy percentages for each Region.
    • Distillation and quantisation shrink the machine every request needs, so do them before deployment.
    • Carbon Footprint in the Cloud Console gives account-level estimates. See how it treats Vertex AI before you quote a number from it.

    Pricing

    Purchase options

    Notebooks Per machine-hour

    Workbench and Colab Enterprise runtimes bill for the machines and disks while they’re running. Set an idle timeout.

    Training Per node-hour

    Custom jobs bill by machine type and accelerators for the time they run. Spot VMs cost less, and AutoML has its own node-hour rates.

    Online prediction Per node-hour

    A deployed endpoint bills for each replica’s machine while it’s deployed, whether or not requests arrive, unless you scale it to zero.

    Batch and generative Per use

    Batch prediction bills for the machines during the job. Generative models are priced by usage, such as characters or tokens, on separate SKUs.

    What you actually pay for

    • Machine and accelerator time for notebooks, training jobs, AutoML and deployed endpoints, by machine type and hour
    • Cloud Storage and BigQuery for data, artifacts and staging
    • Artifact Registry for container images
    • Network egress between Regions or out to the internet
    • Generative model usage, tuning jobs, Feature Store and monitoring, which have their own SKUs

    Prices depend on the Region and machine type and change over time. Check the official Vertex AI pricing page and the Google Cloud Pricing Calculator for current figures, and read the Google Cloud Free Program page for what new accounts get.

    Important code references

    The same churn example on Google Cloud: a CSV in Cloud Storage, a custom job, the registry, then an endpoint. The gcloud and Python tabs run each step with the scikit-learn prebuilt containers; the Terraform tab builds the supporting pieces (a service account, a bucket and an empty endpoint), and the C# tab calls the deployed endpoint. The container tags change, so check the current list of prebuilt containers first. Undeploy and delete the endpoint when you’ve finished, because it bills while deployed.

    # Names are examples. Mumbai is the example Region; the commands expect an authenticated gcloud.
    PROJECT=my-project
    REGION=asia-south1
    BUCKET=acme-ml-my-project
    SA=trainer@$PROJECT.iam.gserviceaccount.com
    # Prebuilt containers: check the current tags in the Vertex AI docs
    TRAIN_IMAGE=us-docker.pkg.dev/vertex-ai/training/sklearn-cpu.1-0:latest
    PREDICT_IMAGE=us-docker.pkg.dev/vertex-ai/prediction/sklearn-cpu.1-5:latest
    
    gcloud services enable aiplatform.googleapis.com --project=$PROJECT
    
    # 1. Train: src/train.py reads --data and saves model.joblib under --model-dir (both are gs:// paths)
    gcloud ai custom-jobs create --project=$PROJECT --region=$REGION \
      --display-name=churn-train \
      --service-account=$SA \
      --worker-pool-spec=machine-type=n1-standard-4,replica-count=1,executor-image-uri=$TRAIN_IMAGE,local-package-path=src,script=train.py \
      --args=--data=gs://$BUCKET/churn/train.csv,--model-dir=gs://$BUCKET/churn/model
    
    # 2. Put the model in the registry (training wrote it to gs://$BUCKET/churn/model/)
    gcloud ai models upload --project=$PROJECT --region=$REGION \
      --display-name=churn-model \
      --artifact-uri=gs://$BUCKET/churn/model/ \
      --container-image-uri=$PREDICT_IMAGE
    
    MODEL_ID=$(gcloud ai models list --project=$PROJECT --region=$REGION \
      --filter="displayName=churn-model" --format="value(name)" | head -n 1 | xargs basename)
    
    # 3. An endpoint, then deploy the model to it
    gcloud ai endpoints create --project=$PROJECT --region=$REGION --display-name=churn-ep
    ENDPOINT_ID=$(gcloud ai endpoints list --project=$PROJECT --region=$REGION \
      --filter="displayName=churn-ep" --format="value(name)" | head -n 1 | xargs basename)
    
    gcloud ai endpoints deploy-model $ENDPOINT_ID --project=$PROJECT --region=$REGION \
      --model=$MODEL_ID --display-name=blue \
      --machine-type=n1-standard-2 --min-replica-count=1 --max-replica-count=3 \
      --traffic-split=0=100
    
    # 4. Score one customer
    echo '{"instances": [[34, 2, 79.5, 1]]}' > request.json
    gcloud ai endpoints predict $ENDPOINT_ID --project=$PROJECT --region=$REGION --json-request=request.json
    
    # 5. Stop the meter: undeploy everything, then delete the endpoint
    DEPLOYED_ID=$(gcloud ai endpoints describe $ENDPOINT_ID --project=$PROJECT --region=$REGION \
      --format="value(deployedModels[0].id)")
    gcloud ai endpoints undeploy-model $ENDPOINT_ID --project=$PROJECT --region=$REGION --deployed-model-id=$DEPLOYED_ID
    gcloud ai endpoints delete $ENDPOINT_ID --project=$PROJECT --region=$REGION --quiet
    # Supporting pieces: a service account, a bucket and an empty endpoint. Assumes the google provider version 5 or later.
    # Training, model upload and deployment are done with the gcloud or Python tabs.
    variable "project" { type = string }
    variable "region"  { default = "asia-south1" }
    
    provider "google" {
      project = var.project
      region  = var.region
    }
    
    resource "google_project_service" "aiplatform" {
      service            = "aiplatform.googleapis.com"
      disable_on_destroy = false
    }
    
    resource "google_service_account" "trainer" {
      account_id   = "trainer"
      display_name = "Vertex AI training and serving"
    }
    
    resource "google_project_iam_member" "trainer_vertex" {
      project = var.project
      role    = "roles/aiplatform.user"
      member  = "serviceAccount:${google_service_account.trainer.email}"
    }
    
    resource "google_storage_bucket" "ml" {
      name                        = "acme-ml-${var.project}"
      location                    = var.region
      uniform_bucket_level_access = true
      public_access_prevention    = "enforced"
    }
    
    # Read and write objects in this bucket only
    resource "google_storage_bucket_iam_member" "trainer_objects" {
      bucket = google_storage_bucket.ml.name
      role   = "roles/storage.objectAdmin"
      member = "serviceAccount:${google_service_account.trainer.email}"
    }
    
    # The endpoint name must be numeric (up to 10 digits) when you choose it yourself
    resource "google_vertex_ai_endpoint" "churn" {
      name         = "4100000001"
      display_name = "churn-ep"
      description  = "Churn model endpoint"
      location     = var.region
    
      labels = {
        owner = "data-science"
      }
    
      depends_on = [google_project_service.aiplatform]
    }
    # pip install google-cloud-aiplatform
    from google.cloud import aiplatform
    
    PROJECT = "my-project"
    REGION = "asia-south1"
    BUCKET = "acme-ml-my-project"
    SA = "trainer@my-project.iam.gserviceaccount.com"
    TRAIN_IMAGE = "us-docker.pkg.dev/vertex-ai/training/sklearn-cpu.1-0:latest"        # check current tags
    PREDICT_IMAGE = "us-docker.pkg.dev/vertex-ai/prediction/sklearn-cpu.1-5:latest"
    
    aiplatform.init(project=PROJECT, location=REGION, staging_bucket=f"gs://{BUCKET}")
    
    
    def train():
        """Run src/train.py on a managed machine. The script saves model.joblib to AIP_MODEL_DIR."""
        job = aiplatform.CustomJob.from_local_script(
            display_name="churn-train",
            script_path="src/train.py",
            container_uri=TRAIN_IMAGE,
            requirements=["pandas"],
            machine_type="n1-standard-4",
            replica_count=1,
            base_output_dir=f"gs://{BUCKET}/churn",
        )
        job.run(service_account=SA, sync=True)
    
    
    def register():
        """Add the trained artifact to the Model Registry with a matching prediction container."""
        return aiplatform.Model.upload(
            display_name="churn-model",
            artifact_uri=f"gs://{BUCKET}/churn/model/",
            serving_container_image_uri=PREDICT_IMAGE,
        )
    
    
    def deploy(model):
        """One endpoint, one deployed model that scales between one and three replicas."""
        endpoint = aiplatform.Endpoint.create(display_name="churn-ep")
        model.deploy(
            endpoint=endpoint,
            deployed_model_display_name="blue",
            machine_type="n1-standard-2",
            min_replica_count=1,
            max_replica_count=3,
            traffic_percentage=100,
        )
        return endpoint
    
    
    if __name__ == "__main__":
        train()
        endpoint = deploy(register())
        try:
            # tenure, support calls, monthly charge, contract type
            print(endpoint.predict(instances=[[34, 2, 79.5, 1]]).predictions)
        finally:
            # Undeploying and deleting is what stops the billing
            endpoint.undeploy_all()
            endpoint.delete()
    // Program.cs: score one row on a deployed Vertex AI endpoint
    // NuGet package: Google.Cloud.AIPlatform.V1
    // Credentials come from Application Default Credentials (gcloud auth application-default login, or the service account the code runs as)
    using Google.Cloud.AIPlatform.V1;
    using ProtoValue = Google.Protobuf.WellKnownTypes.Value;   // Vertex has its own Value type, so alias the protobuf one
    
    const string project = "my-project";
    const string location = "asia-south1";
    var endpointId = Environment.GetEnvironmentVariable("VERTEX_ENDPOINT_ID")
        ?? throw new InvalidOperationException("Set VERTEX_ENDPOINT_ID to the endpoint's numeric ID");
    
    // Regional service address: the location must match the endpoint's
    var client = new PredictionServiceClientBuilder
    {
        Endpoint = $"{location}-aiplatform.googleapis.com"
    }.Build();
    
    // One row: tenure, support calls, monthly charge, contract type
    var row = ProtoValue.ForList(ProtoValue.ForNumber(34), ProtoValue.ForNumber(2), ProtoValue.ForNumber(79.5), ProtoValue.ForNumber(1));
    
    var request = new PredictRequest
    {
        EndpointAsEndpointName = EndpointName.FromProjectLocationEndpoint(project, location, endpointId),
        Instances = { row }
    };
    
    PredictResponse response = await client.PredictAsync(request);
    foreach (var prediction in response.Predictions)
    {
        Console.WriteLine($"Prediction: {prediction}");
    }

    Best videos to explore

    Short walkthrough videos for this service are being prepared. They will appear here and load only when you press play. Until then, follow CloudBrum on YouTube for new videos.

    Introduction to Vertex AI and the Agent PlatformVideo coming soon · Beginner
    Custom training jobs on Vertex AIVideo coming soon · Intermediate
    Deploying and scaling Vertex AI endpointsVideo coming soon · Intermediate
    Pipelines, Model Registry and monitoring on Vertex AIVideo coming soon · Advanced

    Interview questions

    BasicWhat is Vertex AI, and what is the Gemini Enterprise Agent Platform?

    Vertex AI is Google Cloud’s managed platform for machine learning: notebooks, training, a model registry, endpoints and pipelines. In April 2026 Google renamed it the Gemini Enterprise Agent Platform and added agent tooling, but the machine learning features continue, and the API, gcloud ai commands and Python package still use the older names.

    BasicWhat is the difference between a custom job and AutoML?

    A custom job runs training code that you write, in a container or a script on prebuilt images, on machines you choose. AutoML takes labelled data and picks and tunes the model for you. Custom gives control, and AutoML gives a quick baseline with no model code.

    BasicWhat does an endpoint do?

    It gives a deployed model a URL for online predictions. You deploy a model to it with a machine type and a minimum and maximum replica count, send requests with the SDK or REST, and can split traffic between several deployed models.

    IntermediateHow can you reduce the cost of training on Vertex AI?

    Use Spot VMs with checkpoints, or Flex-start for GPUs you can wait for. Pick the smallest machine that finishes in a sensible time, stop notebooks when idle, tune with early stopping and a trial cap, and compare batch and online options before deploying anything always-on.

    IntermediateHow do you give a training job only the access it needs?

    Run it as a dedicated service account that has roles on the specific bucket and datasets, plus aiplatform.user if it needs to talk to Vertex AI. Don’t reuse the default compute account with Editor, and put the project inside VPC Service Controls where data rules require it.

    IntermediateWhat does scale to zero do on an endpoint, and what is the catch?

    With a minimum replica count of zero, an endpoint with no traffic runs no replicas, so it stops billing for machines. The catch is the next request: scaling up takes time, and requests that arrive meanwhile can fail, so clients need retries and latency-sensitive services should keep at least one replica.

    AdvancedA deployment succeeds but the endpoint never becomes healthy. How do you debug it?

    Read the endpoint’s logs in Cloud Logging for the container start-up. With a prebuilt prediction container, check that the artifact folder holds the file name it expects and that the container version matches the framework version used in training. With a custom container, run it locally and confirm it answers the health and predict routes on the port Vertex AI expects.

    AdvancedHow would you design retraining with approval before anything reaches production?

    A Vertex AI pipeline that pulls fresh data, trains, evaluates against the current model and registers the new version. A human or automated check approves it by moving an alias in the registry, and a separate deployment pipeline updates the endpoint with a traffic split, watched by Model Monitoring with an automatic rollback if alerts fire.

    AdvancedYou need 32 GPUs for a job but the Region keeps running out. What are your options?

    Request quota ahead of time, use Flex-start so the job queues until all the GPUs can start together, try another Region or accelerator type that the data rules allow, and consider reserved capacity for regular needs. Make the training resumable from checkpoints so partial runs aren’t wasted.

    AdvancedYour model is accurate in testing but poor in production. Where do you look first?

    Training-serving skew. Compare the features the endpoint receives with those used in training, including preprocessing and missing values. Turn on Model Monitoring for skew and drift, log a sample of requests and responses, and check that the container and library versions are the same in both places.

    Similar or alternative services on other clouds

    CapabilityAWSAzureGoogle Cloud
    ServiceAmazon SageMakerAzure Machine LearningGemini Enterprise Agent Platform (Vertex AI)
    NotebooksSageMaker Studio and JupyterLab spacesCompute instances and studio notebooksWorkbench and Colab Enterprise
    A training runTraining jobCommand jobCustom job or training pipeline
    Cheaper capacityManaged spot trainingLow-priority and spot VMsSpot VMs, plus Flex-start for queued GPUs
    No-code and automated modelsCanvas and Autopilot style AutoMLAutomated ML in the studioAutoML
    Ready-made modelsJumpStartModel catalogModel Garden
    Serving stylesReal-time, serverless, asynchronous and batchManaged online, batch and Kubernetes endpointsOnline endpoints and batch prediction
    Watching live modelsModel Monitor and ClarifyModel monitoring and the Responsible AI dashboardModel Monitoring and Explainable AI

    The platform sits beside simpler options. If your data already lives in BigQuery and the model is a standard one, BigQuery ML trains it with SQL and no separate platform. For quick wins with no training, the Google Cloud AI APIs cover vision, speech and language, and training data for custom work usually starts in Cloud Storage.

    Did you find this article helpful?

    Your answer helps us improve this page for the next reader.

    Sources and further reading

    CloudBrum wrote this page in its own words, using the provider’s public documentation listed below as the reference. Features, limits, names and prices change, so confirm anything that matters on the provider’s own pages before you decide.