Make Vertex AI one step in a real pipeline.

Vertex AI serves the Gemini models. Kestra runs everything around the call: schedule it, retry it, rate-limit a batch, branch on the result, and chain it with your warehouse and storage, so model inference is a governed step with one execution history, not a notebook script.

Blueprints for Vertex AI orchestration.

A raw Vertex AI call has no scheduler, no retry on a 429, no batch fan-out, and no cost guardrail. Kestra adds all of it: it batch-enriches BigQuery rows under a concurrency limit, keeps a RAG index fresh from GCS documents with Gemini embeddings, classifies Pub/Sub events inline, and caps spend with an automated If on the token-count metric. The model call becomes one observable, retryable step.

Batch-enrich BigQuery rows with Vertex AIOpen blueprint
Nightly RAG ingestion with Gemini embeddingsOpen blueprint
Classify Pub/Sub events with an automated guardrailOpen blueprint
Browse all 51 Vertex AI blueprints

Production scaffolding for model inference.

Vertex AI runs the models, the regions, and the IAM. Kestra runs the steps around the call: what triggers it, how a batch is rate-limited, what it is chained with, and how cost is capped.

Scheduling, retries, and rate limits

A raw SDK call has no cron, no backoff on a 429, and no per-step retry. Kestra triggers io.kestra.plugin.gcp.vertexai.ChatCompletion on a Schedule or an event and wraps it with retry and timeout, so transient quota errors recover automatically instead of failing the run.

Batch enrichment with rate control

Enriching thousands of rows means looping model calls without tripping quotas. Kestra reads rows from BigQuery, fans them out with ForEach whose concurrencyLimit caps the request rate, calls Vertex AI per row, and writes the result back, all as one scheduled, retryable batch.

RAG ingestion kept fresh

A retrieval index goes stale unless something rebuilds it. Kestra ingests documents on a Schedule, chunks them, embeds them with a Gemini model via io.kestra.plugin.ai.rag.IngestDocument, and writes the vectors to a store, so a RAG app always retrieves grounded, current context.

Cost guardrails, enforced automatically

LLM spend runs away quietly inside a loop. Vertex AI tasks emit total.token.count as a metric, and Kestra branches on it with an automated If to stop a batch when a threshold is crossed. The guardrail is code, not a person watching a dashboard.

Inline classification and routing

Some pipelines need a model decision per event. Kestra classifies a Pub/Sub message with Vertex AI, then routes on the label with an automated If, escalating high-priority events and logging the rest, in milliseconds, with no human gate on routine routing.

Chained with the whole stack

Vertex AI does not own the warehouse rows it reads, the GCS documents it embeds, or the dbt models downstream. Kestra runs the read, the model call, and the write-back as steps in one flow, so inference plugs into the data stack instead of sitting in a separate notebook.

How teams use Vertex AI and Kestra

Patterns AI and data engineering teams run in production today. Each one shows the flow end to end, with the real plugin classes in play.

Batch enrich

Enrich BigQuery rows with Vertex AI on a schedule

Rows need an LLM-generated label or summary. Kestra selects the unenriched rows from BigQuery, fans them out with a ForEach whose concurrency caps the request rate, calls a Gemini model per row, and writes the result back. Email confirms the batch.

Concurrency is rate control

concurrencyLimit caps in-flight calls so the batch stays under quota.

Write back in place

Each enriched value updates its row, so the table fills in incrementally.

Scheduled, not manual

A Schedule runs the batch nightly with retries, not a notebook.

Query icon
bigquery query
select rows
ForEach icon
for each
rate-limited
ChatCompletion icon
vertex ai
enrich row
MailSend icon
email
on complete
RAG

Keep a RAG index fresh from GCS documents

A retrieval index must track the latest source content. Kestra pulls documents from GCS, chunks them, and embeds them with a Gemini model into a vector store on a schedule, so a RAG application always retrieves current, grounded context. Slack confirms each reindex.

Embeddings on a cadence

Rebuilding nightly means retrieval reflects the latest documents.

Swap the vector store

Use the KV store for a demo, Qdrant or PGVector to scale.

Gemini family

Vertex AI serves the same Gemini models used for the embeddings.

Schedule icon
schedule
nightly
Downloads icon
gcs downloads
pull docs
IngestDocument icon
ingest + embed
Gemini embeddings
SlackIncomingWebhook icon
slack
on reindex
Classify

Classify and route events in real time

Events need a model decision the moment they arrive. The Pub/Sub RealtimeTrigger starts a run per event, Vertex AI assigns a label, and an automated If escalates the high-priority ones to an audit table and Discord. No human gate on routine routing.

Decision per event

Each message is classified and routed in its own governed run.

Automated guardrail

An If on the label routes, never a human Pause.

Deterministic labels

A tight prompt forces a single-token label the branch can trust.

RealtimeTrigger icon
pubsub trigger
per event
ChatCompletion icon
vertex ai
classify
If icon
guardrail
route on label
DiscordIncomingWebhook icon
discord
escalate
Cost control

Cap LLM cost before a batch overruns

A large enrichment batch can burn budget unnoticed. Kestra reads the batch from BigQuery, calls Vertex AI under a concurrency limit, and an automated If on the emitted total.token.count metric halts the run when spend crosses a threshold. Email reports the cap.

Token count as a metric

Vertex AI tasks emit total.token.count for the guardrail to read.

Automated stop

An If halts the batch when cost crosses the threshold.

No surprise bills

Spend is bounded by the flow, not discovered on the invoice.

Query icon
bigquery query
select batch
ForEach icon
for each
rate-limited
ChatCompletion icon
vertex ai
enrich
If icon
cost gate
halt on threshold
Training

Run a Vertex AI custom training job as a step

Model training belongs in the pipeline, not a separate console. Kestra uploads the training data to GCS, runs CustomJob to train on Vertex AI while streaming logs and waiting for completion, then loads the results into BigQuery. Slack confirms.

Training in the DAG

CustomJob streams logs and waits, so downstream steps run after it.

Data in, results out

GCS staging and a BigQuery load bracket the training step.

Retried and logged

A failed job retries and lands in execution history like any task.

Upload icon
gcs upload
training data
CustomJob icon
custom job
train + wait
Load icon
bigquery load
load results
SlackIncomingWebhook icon
slack
on complete

Kestra vs the orchestration alternatives Vertex AI teams evaluate

Capability
Vertex AI Pipelines
Cloud Composer
Airflow
Schedule and retry model calls
Schedule + per-task retry
Pipeline runs, Python SDKCron + PythonCron + Python
Batch enrichment with rate control
ForEach concurrencyLimit
Custom componentDynamic tasks, PythonDynamic tasks, Python
RAG ingestion to a vector store
Native ai.rag tasks
Custom componentPython operatorsPython operators
Cost guardrail on token usage
If on token-count metric
Custom codePython logicPython logic
Chain with warehouse, GCS, dbt
Native plugins
ML-focused, customOperators, PythonOperators, Python
Declarative YAML, no Python
Pure YAML
Python SDKPython DAGsPython DAGs
Self-hosted or air-gapped option
Open source, self-hosted
GCP-managedGCP-managedSelf or managed

Vertex AI & Kestra: common questions

Find answers to your questions right here, and don't hesitate to Contact Us if you couldn't find what you're looking for.

See How

Ready to orchestrate your Vertex AI workloads?

Batch-enrich warehouse rows, keep a RAG index fresh, classify events inline, and cap cost with automated guardrails in one flow. Open source, self-hosted, event-driven.