Traditional cloud workloads typically rely on
[service accounts](https://docs.cloud.google.com/iam/docs/service-account-overview.md.txt) to
authenticate deterministic applications, batch jobs, and backend services.
Generative AI agents introduce distinct security and governance requirements
because they act like *digital workers* rather than static workloads.

An agent can plan, reason dynamically, execute multi-step workflows, and call
external tools either on its own authority or on behalf of human users. Reusing
shared, long-lived service account credentials for agents increases the risk of
credential exfiltration, over-permissioned workloads, and ambiguous audit
trails.

[Agent Identity](https://docs.cloud.google.com/iam/docs/agent-identity-overview.md.txt) provisions a
dedicated, lifecycle-bound cryptographic identity for each agent. The following
table compares standard service accounts and agent identities:

| Characteristic | Service accounts | Agent identities (Agent Identity) |
|---|---|---|
| Identity model | Shared workload identity that is often reused across multiple instances or microservices. | Unique, cryptographically attested [SPIFFE ID](https://docs.cloud.google.com/iam/docs/agent-identity-overview.md.txt#spiffe-identity) provisioned for each deployed agent. |
| Workload role | Designed for deterministic backend services, background batch processing, and server-to-server APIs. | Designed for autonomous agents that perform reasoning, multi-turn conversations, and external tool execution. |
| Credential security | Relies on bearer tokens or downloadable, long-lived service account keys that can be intercepted or exfiltrated. | Uses ephemeral, certificate-bound tokens protected by Context-Aware Access policies for Google Cloud APIs and OpenID Connect (OIDC) ID tokens for external services, preventing token replay outside the trusted runtime environment. |
| Human user delegation | Frequently relies on [service account impersonation](https://docs.cloud.google.com/iam/docs/service-account-impersonation.md.txt), which grants broad privileges and can obscure the initiating user in audit trails. | Uses explicit user-delegated authority through 3-legged OAuth (3LO) brokered by [Agent Identity auth manager](https://docs.cloud.google.com/iam/docs/auth-manager-overview.md.txt). Avoids impersonation and preserves the user's identity. |
| Tool credential mediation | Applications manage API keys, client secrets, and third-party tokens directly within application code, environment variables, or secret vaults. | Agent Identity auth manager stores and brokers API keys and OAuth tokens, and [Agent Gateway](https://docs.cloud.google.com/gemini-enterprise-agent-platform/govern/gateways/agent-gateway-overview.md.txt) enforces outbound access policies, keeping raw secrets and refresh tokens out of the model runtime. |
| Auditability and governance | Audit logs record the service account as the principal, requiring manual correlation to determine which user or request initiated an action. | Audit logs record the agent's unique SPIFFE identity for autonomous actions and capture dual attribution for delegated actions, logging both the agent identity and the delegating user. |
| Access boundaries | Grants Identity and Access Management (IAM) roles to a shared service account across all workloads that attach or impersonate that account. | Enforces least privilege by granting IAM roles to each specific agent identity, integrated with Principal Access Boundary (PAB) policies and [Agent Registry](https://docs.cloud.google.com/agent-registry/overview.md.txt). |

## What's next

- [Agent Identity overview](https://docs.cloud.google.com/iam/docs/agent-identity-overview.md.txt)

- [Identity delegation architecture](https://docs.cloud.google.com/iam/docs/identity-delegation-architecture.md.txt)

- [Service accounts overview](https://docs.cloud.google.com/iam/docs/service-account-overview.md.txt)

- [Authenticate to Google Cloud using an agent's own identity](https://docs.cloud.google.com/iam/docs/auth-agent-own-identity.md.txt)

- [Agent Identity auth manager overview](https://docs.cloud.google.com/iam/docs/auth-manager-overview.md.txt)