How to Stay SAFE and Productive With Antigravity Agent Swarms Using Isolated Google Cloud VMs for Under $5/Month!
Important Cost Warning: Before spinning up cloud infrastructure, be sure to read the section on the prohibitive idle costs of using a Google Cloud Workstations instance over a raw Compute Engine VM, where a hidden cluster control-plane meter can quietly bill you $144+/month even while your agents are completely asleep. When you configure a raw Compute Engine VM properly instead, you can keep your cloned repository safely stored in the cloud for as little as $0 to $3 per month during dormant periods.
Part 1: Are There Ongoing Cloud Storage Costs When the Agent Swarm Is Dormant?
Check personal history. We were discussing using Antigravity with one option being Google Cloud hosted instances for security since the agent swarm can't touch local resources.
You mentioned the costs of the agent swarm's consumption of compute units via agent requests, correct me if I am wrong. I get that.
But I am wondering if there is a cost to hosting my source files in the cloud instance. So let's say I have a typical medium-sized GitHub repo cloned into the instance so the agents aren't accessing my GitHub account, they just have a copy of the repo files. Is there a charge for those files being hosted in the Google Cloud, or not? And if there is a charge, is it a trivial charge like AWS charges for S3 or Glacier storage? Or is it a significant expense that accrues costs as long as the files are in Google's cloud, even if the agent swarm is currently dormant?
Yes, there is a charge to keep your cloned repository files sitting on a Google Cloud instance, and whether it is trivial (pennies a month) or an expensive idle meter ($144+/month) depends entirely on which Google Cloud hosting mechanism you use.
First, to clarify the billing boundary from our previous discussion: your Google AI Pro ($19.99/mo) subscription covers the Antigravity agent quotas (the 5-hour and weekly agent reasoning/swarm limits). However, Google Cloud infrastructure sits on a completely separate GCP Cloud Billing account. Even when the Antigravity agent swarm is 100% dormant, your GCP storage and infrastructure meters keep ticking.
1. Standard Compute Engine VM (The S3/Glacier-Equivalent Cost)
If you spin up a standard Compute Engine VM (e.g., an e2-medium or e2-standard-2 Linux box) and clone your medium-sized GitHub repo onto its attached Persistent Disk, the storage cost for the files themselves is trivial:
- How GCP bills disks: Google charges for the total provisioned volume size per month (even when the VM is powered off/stopped), not the exact megabytes of your repo.
- Standard Persistent Disk: ~$0.04 to $0.044 per GB/month. A minimal 20 GB boot/workspace volume costs ~$0.80 to $0.88 per month.
- Balanced Persistent Disk (SSD-backed default): ~$0.10 to $0.11 per GB/month. A 20 GB volume costs ~$2.00 to $2.20 per month (or $5.00/month for 50 GB).
- Always Free Tier: GCP includes 30 GB-months of Standard Persistent Disk in select US regions (
us-west1,us-central1,us-east1) under its Always Free tier, which can bring the disk cost down to $0.00/month if you stay within those bounds. - The Catch: You must Stop (shut down) the VM when the swarm is dormant. If you leave a basic
e2-standard-2VM running idle 24/7, the compute fee adds ~$48.92/month. Stopped, compute drops to $0 and you only pay the ~$1–$2/month disk fee.
2. Cloud Workstations (The Hidden Fixed-Cost Trap)
If you use Google Cloud Workstations (Google's managed browser/remote-IDE container environments) to host the repo instead of a raw Compute Engine VM, there is a major idle expense that catches developers off guard:
- Persistent Home Disk: A 50 GB balanced disk still costs only ~$5.00/month (~$0.16/day).
- Cluster Control Plane Fee: Cloud Workstations charges a fixed $0.20 per cluster-hour, billed 24/7 whether any workstation is running or asleep.
- Dormant Cost: Even with auto-sleep turned on and zero agent activity, leaving a Workstations cluster alive costs $144.00/month (~$4.80/day) just to keep the control plane standing. To stop that charge, you have to tear down the cluster completely when you are done.
Cost Comparison While Antigravity Swarm Is Dormant
| Hosting Approach | Where Repo Files Live | Dormant Compute Cost | Dormant Storage / Base Cost |
|---|---|---|---|
| Compute Engine VM (Stopped) | Attached Persistent Disk (20–30 GB) | $0.00/mo | $0.00 – $3.30/mo |
| Compute Engine VM (Left Running) | Attached Persistent Disk (20–30 GB) | ~$24.46 – $48.92/mo (e2-medium / e2-standard-2) |
$0.88 – $3.30/mo |
| Cloud Workstations (Asleep) | Persistent Home Directory (50 GB) | $0.00/mo (auto-sleeps) | ~$149.00/mo ($144 cluster + $5 disk) |
| GCS Bucket (Cold Storage Only) | Cloud Storage Standard | $0.00/mo (no VM) | ~$0.02/GB-mo (pennies for a repo) |
Practical Takeaway for Your Isolation Setup
To keep your local workstation isolated without paying an idle tax, use a standard Compute Engine VM rather than Cloud Workstations. Clone your repo onto a small 20–30 GB Persistent Disk (without storing any GitHub SSH keys or PATs on the VM—just clone via HTTPS from a public repo or push/pull via a disposable deploy key/patch bundle), and issue a gcloud compute instances stop command whenever you wrap up a session. Your files remain intact on the disk for roughly $1 to $3 a month until you boot the VM back up.
Part 2: Can You Accidentally Provision a Cloud Workstation Instead of a Raw VM?
"If you use Google Cloud Workstations (Google's managed browser/remote-IDE container environments) to host the repo instead of a raw Compute Engine VM, there is a major idle expense that catches developers off guard:"
When setting up an agent swarm with its own file storage, how easy is it to accidentally set up a Google Cloud Workstation when a "raw Google Compute Engine" VM will suffice?
It is virtually impossible to set up a Google Cloud Workstation by accident. They are two completely separate GCP products with different console menus, CLI namespaces (gcloud workstations vs. gcloud compute instances), and multi-step setup rituals—you only end up with a Cloud Workstation if you deliberately go looking for a managed browser IDE.
Why You Won't Confuse Them in the Console or CLI
| Dimension | Raw Compute Engine VM | Google Cloud Workstations |
|---|---|---|
| GCP Console Menu | Compute Engine → VM instances → Create instance | Cloud Workstations → Cluster management |
| CLI Command | gcloud compute instances create ... |
gcloud workstations clusters create ... |
| Setup Steps | 1 step: Pick machine type + boot disk, click Create. | 3 distinct layers: 1. Create a Workstation Cluster (provisions the $0.20/hr gateway/controller) → 2. Create a Workstation Configuration (container image + disk template) → 3. Create & start the Workstation. |
| What It Hands You | A bare Linux OS (ssh access) where you install Git/tools yourself. |
A managed HTTPS subdomain (*.cloudworkstations.dev) serving browser-based Code OSS / JetBrains IDEs. |
Where Developers Actually Slip Into Cloud Workstations
While you cannot stumble into it during normal VM creation, there are three specific traps where a developer ends up paying that $0.20/hr cluster control-plane fee without realizing it:
- Following "Remote IDE / Browser Dev Environment" Tutorials: If you search Google Cloud docs for "how to run VS Code / Antigravity in the cloud", Google's documentation steers you directly toward Cloud Workstations (because it natively hosts Code OSS in the browser) rather than teaching you how to SSH into a raw Compute Engine VM.
- Clicking One-Click "Open in Cloud" Buttons: Certain GCP developer portals and Firebase/IDX-style templates offer a "Launch Workstation" quickstart that silently spins up a default Workstation Cluster behind the scenes.
- Thinking "Stop Workstation" Stops All Billing: When you use Cloud Workstations, shutting down your individual workstation stops the underlying ephemeral VM and management fee (
$0.05 × vCPUs/hr), which makes it look like everything is off. However, the parent Workstation Cluster (the routing gateway and controller) stays alive in the background at $0.20/hr ($144/month) until you explicitly delete the cluster.
How to Be 100% Certain You Are on a Raw VM
As long as you create your instance under Compute Engine → VM instances (or via gcloud compute instances create), you are strictly on raw Compute Engine infrastructure. You can double-check by opening Cloud Workstations in the left navigation menu of the GCP Console—if it asks you to "Enable the Cloud Workstations API" or shows 0 Clusters, that $144/month meter cannot run.
Part 3: Is a Raw Compute Engine VM Sufficient for Node.js & Python Agent Swarms?
To have the agents cooperate on a clone of a Node.js or Python repository, is a raw Compute Engine VM sufficient for most application contexts that the repository represents? What use cases will drive you into a Cloud Workstation context?
Yes—for a solo developer running an agent swarm on a Node.js or Python repository, a raw Compute Engine VM is sufficient for virtually every standard software context, and it gives you the exact same runtime environment as a local Linux machine without exposing your local disks or credentials.
Antigravity connects to a raw Compute Engine VM over standard SSH. Once connected, the agent swarm operates directly against the VM's filesystem and shell—running npm/pnpm, pytest, virtual environments, build scripts, and local databases—while your local workstation acts strictly as a thin display client.
1. Why a Raw Compute Engine VM Covers Almost All Node.js & Python Contexts
- Full OS and Root Control: On a standard Ubuntu or Debian VM, you have
sudoaccess to install any combination of Node versions (nvm), Python toolchains (venv,uv,conda), C/C++ build dependencies (build-essential), or local services (SQLite, DuckDB, Redis, Postgres) via Docker or rootless Podman. - Parallel Agent Execution: Agent swarms frequently run linters, type-checkers, and test suites concurrently. On a raw VM, you can size the machine specifically for parallel CPU/RAM bursts (for example, an
e2-standard-4with 4 vCPUs and 16 GB RAM at ~$0.134/hr so parallel Node workers don't trigger out-of-memory kills) and shut it down when finished. - Port Forwarding for Web Apps: If your Node.js or Python repository serves a local web dashboard, API, or frontend, SSH local port forwarding (
ssh -L 3000:localhost:3000 ...) lets you view and test the remote app in your local browser while keeping the code and execution locked inside the VM. - Optional GPU Attachment: If a Python repository requires CUDA, PyTorch, or local model inference, you can attach an NVIDIA GPU (such as an L4 or T4) directly to a Compute Engine VM—something that is significantly more rigid to customize in managed workstation wrappers.
The few Node.js / Python edge cases that require minor extra setup on a raw VM:
- Headless Browser Testing / Extension DOM Inspection: Because a cloud VM has no physical monitor, repositories using Puppeteer, Playwright, or Chrome extension testing require installing headless Chromium and
xvfb(virtual framebuffer) so agents can render and inspect pages. - Physical Hardware / Local Peripheral Dependencies: Repositories that talk directly to local USB devices (depth cameras, serial/parallel interfaces, local audio hardware) cannot test those hardware paths natively in a cloud VM without mock layers.
2. What Use Cases Actually Drive You Into Cloud Workstations?
Google Cloud Workstations is an enterprise fleet-governance and network-perimeter product, not a capability upgrade for running code. You only need Cloud Workstations when organizational security policies prohibit raw VMs:
| Driving Use Case | Why a Raw Compute Engine VM Fails the Requirement | How Cloud Workstations Solves It |
|---|---|---|
| Zero-SSH / Locked Corporate Firewalls | Corporate networks or locked-down thin clients (e.g., Chromebooks) block outbound SSH (port 22) and forbid local IDE binaries. | Streams the entire IDE (Code OSS or JetBrains) and terminal purely over HTTPS (*.cloudworkstations.dev) via Identity-Aware Proxy (IAP). |
| Immutable "Golden Image" Compliance (50+ Devs) | Giving dozens of developers root access on raw VMs causes configuration drift and unpatched OS vulnerabilities. | Boots every user/agent into an ephemeral, centrally maintained Docker container from Artifact Registry that resets cleanly on reboot. |
| VPC Service Controls (Data Exfiltration Perimeters) | Regulated enterprises (banking, healthcare) ban external IPs, block scp/file downloads, and enforce strict perimeter auditing. |
Operates natively inside VPC-SC perimeters with centralized IAM access controls and disabled local file exfiltration. |
| Self-Service IT Provisioning at Scale | Platform engineering teams do not want to grant hundreds of developers roles/compute.instanceAdmin to create and manage raw VMs. |
Admins define one template configuration and let developers click a single button to launch standardized environments with enforced idle timeouts. |
Bottom Line for Your Architecture
If your goal is security isolation—keeping an autonomous agent swarm away from your local filesystem, browser profiles, GitHub credentials, and LAN—you do not need any of Cloud Workstations' enterprise fleet machinery. A raw Compute Engine VM with no stored GitHub tokens, locked-down firewall rules, and local port forwarding handles Node.js and Python repositories cleanly for pennies a day in dormant disk storage.

Comments
Post a Comment