mngr GCP Provider [experimental]
GCP Compute Engine provider backend plugin for mngr. Runs agents in Docker containers on Google Compute Engine (GCE) VMs.
This plugin is experimental. The shared
mngr_vpsmachinery underneath it is well-tested, but GCP-specific defaults and the IAM permission set may change. Treat the security defaults (see "GCP-specific configuration") as a starting point: review the firewall rule, image choice, service account, andauto_shutdown_secondsbefore pointing this at production resources.
See mngr_vps for the base architecture and shared infrastructure.
Setup
Credentials are resolved via Google Application Default Credentials (ADC); they are not configurable in mngr.toml. Any of the following works:
gcloud auth application-default loginGOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account-key.json- Attached service account / metadata server (when running on GCE / Cloud Run / GKE)
No config fields are strictly required. The one identifier the provider needs is project_id — a plain, non-secret value — and when omitted it falls back to the project ADC resolves (the active gcloud config set project or the GOOGLE_CLOUD_PROJECT env var). Set project_id explicitly to pin a specific project; mngr create logs which project it inferred when relying on the fallback.
[providers.gcp]
backend = "gcp"
project_id = "my-gcp-project" # optional; falls back to the gcloud/ADC default
default_region = "us-west1"
default_zone = "us-west1-a" # GCE VMs are zonal
default_machine_type = "e2-small" # machine type (~2 vCPU / 2GB)
# default_source_image defaults to the global Debian 13 family; override only if needed:
# default_source_image = "projects/debian-cloud/global/images/family/debian-13"
# Inbound CIDRs for tcp/22 and the container SSH port on the firewall rule.
# Default '0.0.0.0/0' (a warning is logged; tighten for production).
# Use [] for no ingress (no rule created; instance unreachable).
allowed_ssh_cidrs = ["203.0.113.4/32"]
# Optional boot-disk sizing
root_disk_size_gb = 30
boot_disk_type = "pd-balanced"
One-time firewall setup: mngr gcp prepare
GCE firewall creation is privileged. The rule is created once by an operator, so the regular mngr create path needs no firewall-management role. Run once per project + network:
mngr gcp prepare --project my-gcp-project --allowed-ssh-cidr 203.0.113.4/32
This creates a network-scoped, tag-targeted rule (mngr-gcp-ssh by default) opening tcp/22 and the container SSH port to the given CIDRs for instances tagged mngr-ssh. It is idempotent. With no --allowed-ssh-cidr, it falls back to the config's allowed_ssh_cidrs (default 0.0.0.0/0) and logs a warning. After this, mngr create --provider gcp resolves the rule read-only and errors with a pointer back to prepare if it is missing. Setting allowed_ssh_cidrs = [] creates no rule, leaving the instance unreachable from outside its VPC.
prepare and cleanup read their defaults from the [providers.<name>] block selected with --provider (default gcp), and CLI flags override that. For example, with a [providers.gcp-eu] block pinning a network and CIDRs:
mngr gcp prepare --provider gcp-eu # uses that block's network + CIDRs, no flags needed
Teardown: mngr gcp cleanup
mngr gcp cleanup deletes the mngr-gcp-ssh firewall rule, returning the project to its pre-prepare state.
mngr gcp cleanup --project my-gcp-project
It refuses (deletes nothing) if any mngr-managed instance still exists anywhere in the project, so it can never strand a running agent's SSH access. Destroy those first with mngr destroy <agent>, then re-run. It is idempotent.
Multiple zones / regions
Each provider instance is bound to a single zone. To work across zones, configure one provider instance per zone and pick the right one at create time:
[providers.gcp-west]
backend = "gcp"
project_id = "my-gcp-project"
default_zone = "us-west1-a"
allowed_ssh_cidrs = ["203.0.113.4/32"]
[providers.gcp-central]
backend = "gcp"
project_id = "my-gcp-project"
default_zone = "us-central1-a"
allowed_ssh_cidrs = ["203.0.113.4/32"]
mngr create my-west-agent --provider gcp-west
mngr create my-central-agent --provider gcp-central
Usage
mngr create my-agent --provider gcp
mngr create my-agent --provider gcp -b --gcp-machine-type=e2-medium -b --gcp-zone=us-west1-b
mngr create my-agent --provider gcp -b --gcp-spot # run on (preemptible) GCE Spot capacity
mngr create my-agent --provider gcp -b --gcp-image=projects/my-proj/global/images/family/custom # per-host boot image
mngr list
mngr exec my-agent "echo hello"
mngr stop my-agent
mngr start my-agent
mngr destroy my-agent
GCE VMs are zonal, so the placement knob is --gcp-zone= (e.g. us-west1-b), not a region. When default_region is set explicitly, the chosen zone must belong to it; otherwise the region is derived from the zone.
mngr stop stops the agent's container and the GCE VM, so a paused agent costs only disk storage — compute billing ends and the boot disk (with all state) persists. mngr start resumes it, rebinding to the fresh ephemeral external IP. An idle agent self-stops the same way. A stopped VM still appears in mngr list and resolves by name. mngr destroy deletes the VM.
GCP-specific configuration
These fields extend the base VpsProviderConfig (see mngr_vps):
| Field | Default | Description |
|---|---|---|
backend |
gcp |
Provider backend (always 'gcp' for this type) |
project_id |
gcloud/ADC default | GCP project ID (a plain identifier, not a credential). When unset, the project is taken from Application Default Credentials (the active 'gcloud config set project' or the GOOGLE_CLOUD_PROJECT env var); set it explicitly to pin a specific project. |
default_region |
derived from zone | GCE region (e.g., 'us-west1'). Used only to validate the resolved zone; when unset, derived from the resolved zone. Set it to catch a mismatched default_zone typo. |
default_zone |
gcloud compute/zone, else us-west1-a |
Zone for new instances (GCE VMs are zonal). When unset, taken from the active 'gcloud config get compute/zone'. Must lie in default_region when both are set explicitly. |
default_machine_type |
e2-small |
GCE machine type. |
default_source_image |
projects/debian-cloud/global/images/family/debian-13 |
GCE VM boot-disk image (distinct from the base default_image, the Docker container image run inside the VM). |
boot_disk_size_gb |
None |
Deprecated alias of root_disk_size_gb (the boot disk size in GB); set root_disk_size_gb instead. |
boot_disk_type |
pd-balanced |
Boot disk type. |
network |
default |
VPC network for the instance NIC and firewall rule. |
subnetwork |
None |
Optional explicit subnetwork (required for custom-mode VPCs); None lets GCE pick for auto-mode networks. |
firewall_name |
mngr-gcp-ssh |
Name of the network-scoped firewall rule mngr gcp prepare creates to allow SSH ingress. |
firewall_target_tag |
mngr-ssh |
Network tag bound to the firewall rule; every instance is tagged with it. |
associate_external_ip |
true |
Assign an ephemeral external IPv4 to instances. Required for the current mngr-from-developer-laptop SSH access model; for a more secure deployment, set to False and run mngr from a bastion inside the VPC. |
service_account_email |
None |
Optional service account email attached to launched instances. When None, GCE applies its normal default for an unspecified service account. |
service_account_scopes |
("https://www.googleapis.com/auth/cloud-platform",) |
OAuth scopes for the attached service account (only used when service_account_email is set). |
state_bucket_name |
None |
GCS bucket where mngr stores a stopped instance's offline host_dir mirror so it is readable without starting the instance. When None, named 'mngr-state-<project_id>'. The bucket is provisioned by mngr gcp prepare and only used when is_offline_host_dir_enabled is on; the host + agent records still live in GCE instance metadata regardless. |
is_offline_host_dir_enabled |
true |
When on (default), a stopped instance's host_dir is readable without starting it, so mngr event / mngr transcript / mngr file work against it. mngr gcp prepare sets up the GCS bucket it needs. Set False to turn it off. |
service_account_key_json |
None |
Full JSON contents of a GCP service-account key. When set, credentials are built from it directly (bypassing Application Default Credentials) and its embedded project_id is used as the resolved-project fallback. Used by the Imbue Studio bring-your-own-account paste flow. Leave unset to use ADC. |
root_disk_size_gb |
30 |
Size of the VM's root disk in GB (the EBS root volume on AWS, the boot disk on GCP, the OS managed disk on Azure). With container isolation the agent's data lives on a loop file carved from this disk minus outer_disk_reserved_gb. |
allowed_ssh_cidrs |
("0.0.0.0/0",) |
Inbound CIDR blocks allowed on tcp/22 and the container SSH port in the security group / NSG / firewall rule the provider's prepare command creates. Default ('0.0.0.0/0',) allows any IP; use e.g. ('203.0.113.4/32',) to restrict to your own, or () for no ingress (no rule is created, so the instance is unreachable from outside its network). A warning is logged when the effective range is 0.0.0.0/0 or empty. Replaced, not merged, across config layers. |
auto_shutdown_seconds |
None |
When set, the host OS halts itself after about this many seconds (rounded up to whole minutes, the granularity shutdown accepts) -- a hard max-lifetime cap, distinct from the activity-based default_idle_timeout. Whether the halt stops, terminates, or deletes the instance is provider-specific (see the provider's README). |
Required IAM permissions
mngr gcp prepare (operator, once per project):
compute.firewalls.get, compute.firewalls.create,
storage.buckets.create, storage.buckets.get
mngr gcp cleanup (operator, teardown), additionally:
compute.instances.list, compute.firewalls.delete,
storage.buckets.get, storage.buckets.delete,
storage.objects.list, storage.objects.delete
mngr create --provider gcp (developer, per host):
compute.instances.create, compute.instances.delete, compute.instances.get,
compute.instances.list, compute.instances.stop, compute.instances.start,
compute.firewalls.get, compute.zoneOperations.get, compute.machineTypes.get
When is_offline_host_dir_enabled is on (default), the runtime stop/start
path additionally needs storage.objects.create, storage.objects.get,
storage.objects.list, and storage.objects.delete on the state bucket so
mngr stop can write the captured host_dir and offline reads can serve
files from it.
If service_account_email is set, the caller also needs iam.serviceAccounts.actAs on that service account.
Limitations
- No host snapshot workflow: restore from a fresh
mngr createrather than rehydrating a killed host. - A stopped VM releases its ephemeral external IP and gets a fresh one on resume (mngr rebinds known_hosts automatically); there is no stable static-IP option yet.
- Spot VMs (
--gcp-spot) can be preempted by GCE at any time with ~30s notice and are deleted (not stopped) on preemption. Use for ephemeral / experimental agents.
Metadata
Release files for imbue-mngr-gcp 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| imbue_mngr_gcp-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for imbue_mngr_gcp-0.2.1-py3-none-any.whl |
Release files / imbue_mngr_gcp-0.2.1-py3-none-any.whl
| Download URL | imbue_mngr_gcp-0.2.1-py3-none-any.whl |
|---|---|
| Size | 52.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1d48d11e2c60322c894615c7873b65a858823ee5dc9d015e4297e07c9f9038ba
|
|
BLAKE2b-256 checksum How to use checksums |
6a027237055506ad72d3eef7cba0c942098829b3b6e100e37378058d95bad1b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.
Transparency logSecurity for imbue-mngr-gcp 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
1 file in this release has been uploaded with provenance metadata.
Attestation for imbue_mngr_gcp-0.2.1-py3-none-any.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.