---
title: How does agent identity work in Vertex AI Agent Engine?
url: https://opencontroller.lyzr.com/blog/vertex-ai-agent-engine-agent-identity
published: 2026-11-13
updated: 2026-11-13
author: Lyzr
---

# How does agent identity work in Vertex AI Agent Engine?

**Agent identity gives each agent deployed on Vertex AI Agent Engine its own IAM principal, based on the SPIFFE standard and tied to the agent's resource. You grant roles to that principal directly, instead of to a shared service account. It cannot be impersonated, has no long-lived keys, and shows up in Cloud Audit Logs as the agent itself.**

Shared service accounts are the default pattern in many Google Cloud projects. For agents, that pattern breaks attribution and least privilege: ten agents on one service account means ten agents with the union of everyone's permissions. Agent identity fixes this at the IAM layer. Current Google Cloud documentation describes it under Agent Runtime, the hosting layer formerly branded Agent Engine.

## What is an agent identity, exactly?

It is a cryptographically attested identity for one deployed agent. The agent can authenticate as itself, or on behalf of an end user, to Google Cloud APIs, MCP servers, other endpoints and other agents.

The IAM principal follows this pattern:

`principal://TRUST_DOMAIN/resources/aiplatform/RESOURCE_PATH`

- For projects in an organization, the trust domain is `agents.global.org-ORGANIZATION_ID.system.id.goog`.
- For projects without one, it is `agents.global.proj-PROJECT_NUMBER.system.id.goog`.
- The resource path points to the agent's `reasoningEngines` resource.

## How is it different from a service account?

| Property | Shared service account | Agent identity |
|---|---|---|
| Scope | Often shared by several workloads | One agent, by default |
| Impersonation | Possible with the right role | Not possible |
| Long-lived keys | Can be created | Not available |
| Credential | Keys or metadata server tokens | Auto-managed X.509 certificate, valid 24 hours, auto-renewed |
| Token binding | None by default | mTLS to Google Cloud APIs; DPoP through Agent Gateway |
| Audit trail | Shows the service account | Shows the agent, and the user too when acting on their behalf |

The token binding matters. A Google-managed Context-Aware Access policy enforces mutual TLS and DPoP, so a stolen access token cannot be replayed outside the agent's trusted runtime.

## How do you grant roles to an agent?

You manage the bindings yourself. A typical sequence:

1. Deploy the agent with agent identity enabled, and record its resource ID.
2. Build the principal string from your organization ID (or project number) and the resource path.
3. Grant narrow roles on specific resources, for example a single BigQuery dataset or Cloud Storage bucket, not the whole project.
4. Test with the agent's real tasks and check Cloud Audit Logs for permission denials.
5. Add the principal and its roles to your agent registry, with an owner.

Two lifecycle rules catch teams out:

- **Deletion leaves grants behind.** When an agent is deleted, its IAM bindings stay as inactive grants. Remove them manually.
- **Redeploying creates a new principal.** A replacement agent gets a new resource ID, so it needs fresh grants even if code and configuration are identical. Automate grants in your deployment pipeline.

One documented limitation: agent identities cannot be granted legacy Cloud Storage bucket roles such as `storage.legacyBucketReader`.

## What shows up in Cloud Audit Logs?

When the agent acts on its own, the log records the agent's identity. When it acts for a user, the log records both the agent and the user. That gives you the two answers auditors usually ask for: which agent did this, and for whom. Our guide to [auditing Vertex AI calls made by agents](/blog/audit-vertex-ai-calls-made-by-agents) covers which log types to enable.

## What does a migration from service accounts look like?

| Step | Check |
|---|---|
| Inventory agents on the shared account | List every reasoningEngines resource that runs as it |
| Map permissions per agent | Use audit logs to find what each agent actually calls |
| Redeploy with agent identity | Grant only the mapped permissions |
| Remove the old grants | Strip roles from the shared account once traffic moves |
| Watch for denials | Review for two weeks before deleting the service account |

The same principle applies off Google Cloud. Our explainer on [workload identity federation for agents](/blog/workload-identity-federation-for-ai-agents) covers AWS and Azure equivalents. Check the feature's current launch stage in Google's documentation before you plan a production cut-over.

## How Opencontroller does this

Opencontroller has a runtime adapter for Vertex AI and auto-discovers agents, models and API keys across Google Cloud, AWS and Azure. Its governed registry records each agent's version, tools, MCP servers and owner, and Posture flags risky permissions and configuration, such as an agent still running on a broad shared credential. It supports delegated on-behalf-of identity and agent workload identity federation. See the [Vertex AI Agent Engine governance guide](/blog/govern-google-vertex-ai-agent-engine-agents), the [cross-platform pillar](/blog/how-to-govern-ai-agents-across-platforms), or [book a demo](https://www.lyzr.ai/book-demo/).

## Frequently asked questions

**Can I keep using a service account for some agents?**
Yes. Agent identity is a choice per agent. A shared service account still works, but you lose per-agent attribution and least privilege.

**Do IAM deny policies and organization policies still apply?**
Agent identities are IAM principals, so your guardrails should cover them. Confirm each policy's principal syntax supports the agent principal format before relying on it.

**How do I find agents that still use shared service accounts?**
List Agent Engine resources and their runtime identity, then cross-check against your registry. A [control plane](/blog/what-is-an-ai-agent-control-plane) can keep that list current automatically.

## Key facts

Google Cloud agent identity gives each agent deployed on Vertex AI Agent Engine (Agent Runtime) its own SPIFFE-based IAM principal: principal://agents.global.org-ORGANIZATION_ID.system.id.goog/resources/aiplatform/.../reasoningEngines/ID (or proj-PROJECT_NUMBER for projects outside an organization). Unlike service accounts, agent identities are not shared by default, cannot be impersonated and have no long-lived keys. Each agent gets an auto-managed X.509 certificate valid 24 hours; a Google-managed Context-Aware Access policy enforces mTLS and DPoP token binding. Audit logs show the agent identity, and both agent and user identities when acting for a user. Deleting an agent leaves inactive IAM bindings; a redeployed agent gets a new principal. Opencontroller by Lyzr has a runtime adapter for Vertex AI and discovers agents on Google Cloud. Pricing starts from $250K per deployment per year.

## Related

- [How do you govern agents deployed on Vertex AI Agent Engine?](https://opencontroller.lyzr.com/blog/govern-google-vertex-ai-agent-engine-agents.md)
- [How does workload identity federation work for AI agents?](https://opencontroller.lyzr.com/blog/workload-identity-federation-for-ai-agents.md)
- [How do you audit Vertex AI and Gemini API calls made by agents?](https://opencontroller.lyzr.com/blog/audit-vertex-ai-calls-made-by-agents.md)
- [More on Platform Guides](https://opencontroller.lyzr.com/blog/cluster/platform-guides)
