FIELD NOTES / 4 MIN READ

Google's Agent Identity vs a Shared Service Account: Which Should Run Your Bot?

Google Cloud now lets a deployed agent carry its own SPIFFE-based identity instead of a shared service account. For a small team running one or two bots on Agent Runtime, the choice changes what a compromised or misconfigured bot can reach, and what breaks on redeploy.

AI-assisted editorial: researched and drafted with AI using the primary sources linked below. Check the cited evidence and any stated test scope. Illustrative examples are not measured product results. Editorial policy.

Key takeaways

  • Agent Identity gives each deployed bot its own certificate-bound principal; a default (unconfigured) deployment still falls back to a shared service account.
  • Redeploying an agent, even with identical code and name, creates a new principal — old IAM grants don't carry over, and deleted agents leave orphaned bindings behind.
  • Turn Agent Identity on once a project runs more than one bot, or once any single bot's tool access would hurt if another bot inherited it by accident.

The short answer

If you're deploying a bot to Google Cloud's managed agent runtime and it's the only bot in the project, the default service account is fine to start with — it's what the platform uses when you don't configure anything else. The moment a second bot lands in the same project, or one bot touches a tool whose misuse would actually cost you (a billing adjustment, a CRM write, a delete), turn on Agent Identity and grant permissions to that specific agent's principal instead of the shared account. The two paths diverge mainly on blast radius: a shared service account means every agent in the project inherits the same grants, while a dedicated agent identity scopes access to one bot.

What Agent Identity actually changes

Google Cloud's Agent Identity assigns each deployed agent a unique identity string, a SPIFFE ID, that is strongly attested, tied to the agent's lifecycle, and mapped directly to the resource that hosts it. That's a different model from a traditional service account, which can be attached to more than one workload and can mint long-lived keys. Unlike service accounts, agent identities are not shared by multiple workloads by default, can't be impersonated, and don't allow developers to generate long-lived service account keys; the access tokens a Google Cloud agent identity gets are cryptographically bound to that agent's own X.509 certificate, which is meant to stop a stolen token from being replayed somewhere else. On top of that, a Principal Access Boundary policy can cap what an agent can reach regardless of whatever other roles it's been granted, which gives you a second ceiling independent of the IAM bindings themselves. Agent Identity also carries its own auth manager for the credentials a bot needs for third-party tools, letting a team store API keys, OAuth client IDs and secrets, and delegated end-user tokens outside the agent's prompt or code.

Sources: Agent Identity overview | Identity and Access Management (IAM) | Google Cloud Documentation.

Illustrative example: two bots, one project

Picture a small team running two bots on Vertex AI's Agent Runtime inside one Google Cloud project, purely as an illustrative setup: a support-reply bot that drafts answers from a knowledge base, and a billing-adjustment bot that can issue account credits through an internal API. If neither bot has the identity flag configured at deployment, both keep running as the project's default service account — a Google Cloud document notes that if the identity flag isn't configured, the Agent Runtime instance continues to use service accounts, specifically to preserve backward compatibility for teams that already built infrastructure-as-code deployments around that model. That's convenient, but it also means a prompt-injection bug or a bad tool call in the support bot is running under the same account that can touch the billing API, because the account isn't scoped to either bot specifically. Turning on Agent Identity for each bot separately changes that: each agent gets access to its own logging, metrics, model access, sessions, memories and sandboxes by default, through a pair of baseline roles — roles/aiplatform.agentContextEditor and roles/aiplatform.agentDefaultAccess — that exist to give the agent basic operating permissions without open-ended project access. From there, the team grants the billing bot's specific principal access to the billing API, and nothing else gets that grant automatically.

Sources: Use Agent Identity with Agent Runtime | Gemini Enterprise Agent Platform | Google Cloud Documentation.

Two ways this breaks

The first failure path is redeployment. An agent's identity is derived from the ID of the resource hosting it, so if you delete an agent and deploy a replacement, even with the same display name, code, and configuration, the new agent receives a new resource ID and therefore a new principal identifier, and existing IAM bindings that referenced the previous identity don't apply to the new one. Practically, that means a routine redeploy of the billing bot can silently strip it of the billing-API access you granted last week, because the new deployment is a different principal as far as IAM is concerned — you have to grant the required roles to the new principal again. The second failure path is cleanup debt in the other direction: deleting an agent doesn't remove the IAM bindings that reference its principal, so those bindings remain in your policies as inactive grants that you have to manually remove as part of decommissioning an agent. Skip that step enough times across a growing fleet of bots and your IAM policy accumulates dead entries that nobody is actively auditing, which is its own quiet risk even though an inactive binding can't be exercised by anything still running.

Sources: Agent Identity overview | Gemini Enterprise Agent Platform | Google Cloud Documentation.

The decision rule

Use the default service account for a single bot in a single project with tools whose worst-case misuse is annoying, not costly — it's genuinely simpler and it's the platform's own fallback when you don't configure anything else. Switch to Agent Identity the moment any of three things is true: you're running more than one bot in the same project, one bot's tools could hurt the team if another bot inherited access to them, or you need an audit trail that shows which specific bot, not which shared account, took an action. Whichever you pick, bake two habits into your deployment process: re-check IAM bindings after every redeploy, since a redeploy mints a new principal, and treat agent deletion as a two-step job — delete the agent, then go remove its now-inactive bindings. Neither habit is automatic yet, and skipping either one is how a scoped-access setup quietly drifts back into a shared one.

Primary sources

Sources checked 2026-11-10. Standards and product documentation can change; follow the linked version when implementing.

  1. Agent Identity overview | Identity and Access Management (IAM) | Google Cloud Documentation — Google Cloud
  2. Agent Identity overview | Gemini Enterprise Agent Platform | Google Cloud Documentation — Google Cloud
  3. Use Agent Identity with Agent Runtime | Gemini Enterprise Agent Platform | Google Cloud Documentation — Google Cloud

BotBento is in development. Suggest a correction.