Gemini Vertex AI Setup with Workcell

August 5, 2026 ยท View on GitHub

Use this pattern when Gemini should authenticate through Vertex instead of a plain Gemini API key.

1. Create the Gemini env file

GOOGLE_GENAI_USE_VERTEXAI=true
GOOGLE_CLOUD_PROJECT=my-project
GOOGLE_CLOUD_LOCATION=us-central1

If you need ADC, export a reviewed copy. Keep it as a separate credential file in Workcell operator state.

2. Create the injection policy

version = 1

[credentials]
gemini_env = "/Users/example/.config/workcell/gemini-vertex.env"
gcloud_adc = "/Users/example/.config/workcell/gcloud-adc.json"

3. What Workcell does with this

  • seeds ~/.gemini/.env inside the session
  • treats ADC as a supplemental input rather than a standalone auth mode
  • derives the matching regional aiplatform.googleapis.com allowlist entry for strict-mode launches when a location is present
  • reports the gcloud_adc path as vertex-supplement with manual bootstrap support in workcell auth status, workcell --auth-status, and workcell why

4. Launch

workcell --prepare --agent gemini --workspace /path/to/repo