> ## Documentation Index
> Fetch the complete documentation index at: https://docs.spojit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Cloud Agent Platform

> Run workflow steps and Miraxa on Gemini, Claude and other Model Garden models in your own Google Cloud project (formerly Vertex AI), with no key to store.

Add your Google Cloud project to run workflow steps and Miraxa on the models Agent Platform (formerly Vertex AI) offers there: Gemini, Claude from Model Garden, and Model Garden's managed open models such as Llama, DeepSeek, Qwen and gpt-oss. Google bills your project for what they run. See [Your own AI providers](https://docs.spojit.com/ai-providers/overview.md) for how providers work.

Only want Gemini on an AI Studio key? Use [Google Gemini](https://docs.spojit.com/ai-providers/gemini.md) instead.

## How Spojit gets in

There is no key to create or paste. You add a small **workload identity pool** to your project that trusts Spojit for this one connection, and give it the **Agent Platform User** role (`roles/aiplatform.user`, called Vertex AI User before Google renamed Vertex AI). Each time a step runs, Google checks that the request really comes from Spojit and is for this connection, then gives Spojit a sign-in that lasts an hour. Nothing secret is stored anywhere.

* Spojit can call models in the project and nothing else there: Agent Platform User is the only role it gets.
* The pool lets in only Spojit, and only for this connection. Another Spojit workspace can't use it, even if it knows your project.
* To take access away, delete the pool's provider (see [Remove access](#remove-access)). Calls appear in your project's Cloud Audit Logs.

## Before you start

* **Roles.** You need the **Owner** role on the project, or both **Workload Identity Pool Admin** and **Project IAM Admin**, plus **Service Usage Admin** to turn on APIs.
* **Claude.** To use Claude, enable each Claude model in [Model Garden](https://console.cloud.google.com/vertex-ai/model-garden) for your project first. Some Claude models also ask you to turn on data sharing with Anthropic; Model Garden shows this on the model's page.
* **Other Model Garden models.** Enable each one in Model Garden for your project the same way.
* **Organization policy.** If your organization limits which identity providers a pool may trust (the `iam.workloadIdentityPoolProviders` policy), ask your admin to allow `https://accounts.google.com`. Most organizations don't set it.

## Add it in Spojit

1. Open **Settings → AI providers** and select **Add provider**.
2. Choose **Google Cloud Agent Platform**.
3. Give it a name, enter your **project id** (for example `my-project`), and pick the **location** your models run in. **Global** serves the most models. The **United States** and **Europe** multi-regions are there too. A tuned model always runs in its own location, whichever you pick here.
4. Select **Continue**. The provider's card now shows **Setup needed**, with the setup for this connection.

Then do the setup in your project, either with Cloud Shell or in the Google Cloud console. Both do the same thing.

## Option 1: Cloud Shell

1. On the provider's card, select the **Cloud Shell** tab and copy the script. It already has this connection's values in it.
2. Select **Open Cloud Shell**. It opens a terminal in your browser with nothing to install.
3. Paste the script and press Enter. If Cloud Shell asks to authorize, allow it.
4. At the end the script prints your **project number**. Copy it.

The script:

* turns on the Vertex AI, IAM and Security Token Service APIs;
* creates the pool `spojit`, or reuses it if another connection already made it;
* adds this connection's provider to the pool, with its issuer, allowed audience, attribute mapping and condition;
* gives the pool the Agent Platform User role on the project.

It's safe to run again. It changes nothing else in your project.

## Option 2: Google Cloud console

On the provider's card, select the **Google Cloud console** tab. It lists each value with a copy button and a link to the right console page.

1. **Turn on the APIs.** In **APIs & Services → Library**, enable the **Agent Platform API** (formerly the Vertex AI API), the **Identity and Access Management (IAM) API** and the **Security Token Service API**. Skip any that are already on.
2. **Create the pool.** In **IAM & Admin → Workload Identity Federation**, select **Create pool**. Name it, and give it the pool ID `spojit`. If an earlier connection already made it, open it instead. If it was deleted in the last 30 days, turn on **Show deleted pools and providers** and restore it.
3. **Add the provider.** In the pool, select **Add provider** and choose **OpenID Connect (OIDC)**. After a Reconnect, edit the provider that's already there instead.
   * **Provider name and ID:** the value shown on the card, which starts with `spojit-`.
   * **Issuer (URL):** `https://accounts.google.com`.
   * **Audiences:** choose **Allowed audiences** and paste the audience from the card.
   * **Attribute mapping:** map **google.subject** to **assertion.sub**.
   * **Attribute condition:** paste the condition from the card. It names Spojit's identity.
4. **Let the pool use Vertex AI.** In **IAM**, select **Grant access**. Paste the principal from the card as the new principal, with your project number in it, and give it the **Agent Platform User** role (search for it by that name).
5. **Find your project number.** It's on the project's [dashboard](https://console.cloud.google.com/home/dashboard), under **Project info**.

## Check the connection

1. Paste the project number on the provider's card.
2. Select **Check**.

Spojit signs in to your project the way your workflows will. When it works, the card turns active and you can add models. If it doesn't, the card says which part to fix: a value in the pool's provider, the role, or an API that is off.

> [!NOTE]
>
> Google can take a few minutes to apply a new role. If Check says the pool lacks the Agent Platform User role right after you ran the setup, wait a minute or two and check again.

## Choose models

**Add model** lists the models Model Garden offers, so you can pick one rather than type it. Use the id as Model Garden shows it:

| Model | Example id |
| - | - |
| Gemini | `gemini-2.5-flash` |
| Claude | `claude-sonnet-4-6`, or with a version such as `claude-haiku-4-5@20251001` |
| A managed open model | `meta/llama-4-maverick-17b-128e-instruct-maas`, `openai/gpt-oss-120b-maas` |

The list shows what Model Garden offers, not what your project has enabled. Adding a model runs a short Test in your project. If it says to enable the model in Model Garden, do that for the same location, then test again.

## Tuned Gemini models

If you've tuned Gemini in your project with supervised tuning, use the tuned model through the same connection. The connection's Agent Platform User role already covers it, so there is nothing more to set up.

* **Add model** lists your project's tuned models first, by the name you gave the tuning job. A job also keeps an endpoint for each earlier checkpoint; those aren't listed, but you can paste one's full name.
* Spojit looks for them in the connection's location, the **United States** and **Europe** multi-regions (where Gemini 3 and later are tuned) and `us-central1`. For a tuned model elsewhere, paste its endpoint's full name, such as `projects/my-project/locations/europe-west4/endpoints/1234567890`. In the console, open **Model Registry**, pick the region the model was tuned in (Gemini 3 and later are under the **us** or **eu** multi-region, which the Tuning page doesn't list), and open the model. **Deploy and test** lists its endpoints by ID, one per checkpoint; the one updated last is the finished model. Its full name is `projects/<project>/locations/<region>/endpoints/<ID>`.
* A tuned model runs in its own location, whatever location the connection is set to, and only endpoints in this connection's project can be added.
* Google bills a tuned model per use, at its base model's rate. Nothing runs between calls.

If the Test says the tuned endpoint is blocked because its base model isn't allowlisted for your project, your project can no longer use that base model, so a model tuned from it can't be served. Tune a current Gemini model instead.

## Models you deployed

A model you deployed on an endpoint in your project, such as an open model from Model Garden served with vLLM, works through the same connection, as long as it answers in OpenAI's chat format (Model Garden's vLLM deployments do).

* **Add model** lists the endpoints in your project that have a model deployed, by the endpoint's name, from the same places as tuned models. For one elsewhere, paste the endpoint's full name, such as `projects/my-project/locations/us-central1/endpoints/mg-endpoint-1234`. It's under **Endpoints** in the console.
* Spojit calls it at the endpoint's own address. Model Garden puts new deployments on a dedicated endpoint, which Google answers only there.
* Model Garden's deployment doesn't turn on tool calling, so the Test marks such a model as one that can only chat. It can write text in workflow steps and chat with Miraxa, but agent steps that use tools, and Miraxa building or changing workflows, need tool calling. To have it, deploy with vLLM's tool calling on (its `--enable-auto-tool-choice` and `--tool-call-parser` options, with the parser for your model), then select **Test** again.

> [!WARNING]
>
> Google bills a deployed model's machine for as long as it stays deployed, whether or not anything calls it. Undeploy it in the console when you no longer need it.

## Reconnect

**Reconnect** on the card gives the connection a new allowed audience, so the rule in your project stops matching until you run the setup again. Running it again (or editing the provider's allowed audience in the console) updates the same provider, so the old audience stops being accepted. A sign-in Google already gave Spojit stays valid until it ends, within the hour. Use it to rotate access, or if the pool's provider was changed or deleted.

## Remove access

Removing the provider in Spojit deletes it and its models here. Your project keeps the pool until you delete it there:

* In **IAM & Admin → Workload Identity Federation**, open the `spojit` pool and delete this connection's provider. Spojit loses access within an hour at the latest.
* Delete the pool too when no other Spojit connection uses the project.

Or run this in Cloud Shell, with the provider id from the card:

```bash theme={null}
gcloud iam workload-identity-pools providers delete PROVIDER_ID \
  --project PROJECT_ID --location global --workload-identity-pool spojit
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.