Configuring Google Cloud

Prev Next

This page lists what you prepare in Google Cloud for the Google Cloud Policy Orchestration Point (POP), including:

  • The enabled Google APIs
  • A service account for PlainID
  • A read-only custom role, granted on the project that holds your agents
  • A JSON key for the service account
  • The project ID

You complete each step in Google Cloud, then enter the values in the POP. The POP only reads from Google Cloud, so the service account never needs write access.

Prerequisites

Before you start, ensure you have:

  • A Google Cloud project with the AI agents you want to discover.
  • Permission to create service accounts and service account keys, for example the Service Account Admin and Service Account Key Admin roles.
  • Permission to create custom roles and grant roles on the project, for example the Role Administrator and Project IAM Admin roles.
  • A PlainID Environment with a Policies Workspace. The Environment must support the Google Cloud agent attributes (Resource Name, Project, Region, Service Account, and Framework) in the AI Agent Registry. In an Environment without them, Test Connection succeeds but every discovery run fails. Contact PlainID Support if you aren't sure your Environment supports them.

Step 1: Enable the Google APIs

Enable these APIs in the project that owns the service account. That project can differ from the project that holds the agents.

API Required
Cloud Resource Manager API Always
Cloud Asset API Optional. Speeds up discovery and is required for GKE agents.
Vertex AI API To discover Agent Runtime agents
Cloud Run Admin API To discover Cloud Run agents
Discovery Engine API To detect Gemini Enterprise
Agent Registry API To discover Gemini Enterprise agents and enrich other agents
Dialogflow API To discover Dialogflow CX and ES agents
Customer Engagement Suite API To discover CX Agent Studio agents

When a product's API is off, Test Connection reports the product as skipped and discovery leaves out its agents.

See Enabling an API in your Google Cloud project for the steps.

Step 2: Create a Service Account

Create a service account for PlainID, for example plainid-agent-discovery. It can live in any of your projects, and one service account can serve several POPs.

See Create service accounts for the steps.

Step 3: Create the Custom Role

Create a custom role that holds the read-only permissions below. Save this definition as plainid-gcp-agents-role.yaml:

title: PlainID AI Agent Discovery
description: Read-only access for PlainID to discover AI agents
stage: GA
includedPermissions:
- resourcemanager.projects.get
- cloudasset.assets.searchAllResources
- aiplatform.reasoningEngines.list
- aiplatform.reasoningEngines.get
- aiplatform.reasoningEngineRuntimeRevisions.list
- aiplatform.reasoningEngineRuntimeRevisions.get
- run.services.list
- run.services.get
- run.revisions.list
- run.revisions.get
- container.clusters.list
- container.deployments.list
- discoveryengine.engines.list
- discoveryengine.engines.get
- discoveryengine.assistants.get
- agentregistry.locations.list
- agentregistry.agents.list
- agentregistry.agents.get
- agentregistry.agents.search
- agentregistry.mcpServers.list
- agentregistry.mcpServers.get
- dialogflow.agents.list
- dialogflow.agents.get
- dialogflow.agents.search
- dialogflow.webhooks.list
- dialogflow.playbooks.list
- dialogflow.tools.list
- ces.apps.list
- ces.apps.get
- ces.agents.list
- ces.agents.get
- ces.tools.list
- ces.toolsets.list
- ces.toolsets.get

Then create the role in the project that holds the agents:

gcloud iam roles create plainidAgentDiscovery \
  --project=<agents-project-id> \
  --file=plainid-gcp-agents-role.yaml

To reuse one role across several projects, create it at the organization level with --organization=<organization-id> instead of --project.

See Create and manage custom roles for more information. See Google Cloud Permissions for what each permission allows.

Step 4: Grant the Role on the Agents Project

Grant the custom role to the service account from Step 2 on the project that holds the agents:

gcloud projects add-iam-policy-binding <agents-project-id> \
  --member="serviceAccount:<service-account-email>" \
  --role="projects/<agents-project-id>/roles/plainidAgentDiscovery"

For an organization-level role, use --role="organizations/<organization-id>/roles/plainidAgentDiscovery".

See Manage access to projects, folders, and organizations for more information.

The POP discovers a product only when the service account holds the product's whole permission set on the project. Granting the role on a folder or the organization also works, because the POP counts inherited grants, but each POP still reads only the project you name in it.

Step 5: Create a JSON Key

Create a JSON key for the service account and download the key file. Keep the key file secure, and don't share it outside this setup.

See Create and delete service account keys for the steps.

To keep the key in your own secret store, upload the key file there and note the secret's name. See About Secret Stores for more information.

Values for the POP

When you finish, you have every value the POP asks for:

POP field Source
Project ID The ID of the project that holds the agents, from Step 4
Service Account JSON The key file from Step 5, or the name of the secret that holds it in your secret store

The POP asks for nothing else: no organization, no folder, and no region.

Next, create the POP. See POP Setup for more information.

Google Cloud Permissions

The custom role holds 34 read-only permissions, grouped by product. A product is discovered only when the service account holds the product's whole set on the project. When one permission is missing, the POP skips that product, and Test Connection names the missing permission.

Permission What it lets PlainID read Without it
Projects
resourcemanager.projects.get The project's name, ID, number, and state. The POP can't read the project, and Test Connection fails with GCP_AGENTS_PROJECT_NOT_FOUND.
Cloud Asset Inventory
cloudasset.assets.searchAllResources Google's index of what exists in the project. PlainID searches only three resource types: Agent Runtime agents, Dialogflow agents, and GKE Deployments that carry the agent label. The permission itself allows searching every resource type in the project. Optional. The POP doesn't discover GKE agents, and it reads every region for Agent Runtime and Dialogflow CX, so discovery is slower. Nothing else changes.
Agent Runtime
aiplatform.reasoningEngines.list The agents deployed in one region: name, description, labels, dates, deployment settings, and the identity or service account each agent runs as. The POP skips Agent Runtime.
aiplatform.reasoningEngines.get One agent by name, with the same fields. The POP skips Agent Runtime.
aiplatform.reasoningEngineRuntimeRevisions.list The deployed versions of an agent. PlainID keeps the latest version ID, and uses it to tell a deployed agent from a saved one. The POP skips Agent Runtime.
aiplatform.reasoningEngineRuntimeRevisions.get One deployed version by name. The POP skips Agent Runtime.
Cloud Run
run.services.list The project's Cloud Run services in all regions: name, labels, creator, URL, container image, service account, and deployment settings. PlainID keeps only the services marked as agents. The POP skips Cloud Run.
run.services.get One service by name. The POP skips Cloud Run.
run.revisions.list The revisions of a service. The POP skips Cloud Run.
run.revisions.get One revision. PlainID reads the latest ready revision of each agent service, because only the revision holds the agent identity. The POP skips Cloud Run.
GKE
container.clusters.list The project's GKE clusters. No effect on discovery. GKE agents come from Cloud Asset Inventory.
container.deployments.list The Deployments inside a cluster. No effect on discovery.
Gemini Enterprise
discoveryengine.engines.list The project's Gemini Enterprise apps: name and display name. PlainID uses it to learn whether the project uses Gemini Enterprise. The agents themselves come from the Agent Registry. Test Connection shows Gemini Enterprise as skipped, and PlainID can't warn you when a project that uses it has the Agent Registry off. Gemini Enterprise agents still arrive through the Agent Registry.
discoveryengine.engines.get One app by name. Same as the row above.
discoveryengine.assistants.get The assistant settings of an app. Same as the row above.
Agent Registry
agentregistry.locations.list The locations of the project's registry. The POP skips the Agent Registry: it doesn't discover Gemini Enterprise agents, and GKE agents get their resource name as Agent ID instead of their agent identity.
agentregistry.agents.list The registry's agent entries: name, description, URL, framework, agent identity, and the Google resource each entry points to. The POP skips the Agent Registry.
agentregistry.agents.get One entry by name. The POP skips the Agent Registry.
agentregistry.agents.search Entries found by a text search. The POP skips the Agent Registry.
agentregistry.mcpServers.list The Model Context Protocol (MCP) servers in the registry. No effect on discovery.
agentregistry.mcpServers.get One MCP server by name. No effect on discovery.
Dialogflow
dialogflow.agents.list The Dialogflow CX agents in one region: name, description, language, and settings. The POP skips Dialogflow.
dialogflow.agents.get One agent by name. The POP skips Dialogflow.
dialogflow.agents.search The project's Dialogflow ES agent. The POP skips Dialogflow.
dialogflow.webhooks.list The webhooks of an agent: the external URLs it calls. The POP skips Dialogflow.
dialogflow.playbooks.list The playbooks of an agent: its written instructions. The POP skips Dialogflow.
dialogflow.tools.list The tools of an agent: name, description, and type. PlainID keeps the names. The POP skips Dialogflow.
CX Agent Studio
ces.apps.list The CX Agent Studio apps in one location. The POP skips CX Agent Studio.
ces.apps.get One app by name, with the settings the list leaves out. PlainID reads the app's model from it. The POP skips CX Agent Studio.
ces.agents.list The agents inside an app: name, description, dates, instruction, model, and the tools and toolsets each agent uses. The POP skips CX Agent Studio.
ces.agents.get One agent by name. The POP skips CX Agent Studio.
ces.tools.list The tools of an app: name and type. PlainID keeps the names. The POP skips CX Agent Studio.
ces.toolsets.list The toolsets of an app, with the API description of each. PlainID keeps the names. The POP skips CX Agent Studio.
ces.toolsets.get One toolset by name. No effect on discovery.

What the Role Can't Do

The role holds no permission to run an agent (aiplatform.reasoningEngines.query), read conversations, sessions, or memories, export a Dialogflow agent (dialogflow.agents.export), search or chat with company data in Gemini Enterprise, read who holds which role on a project, or create, change, or delete anything.

Using Google's Predefined Roles

Google's viewer roles also work, because the POP checks permissions, not role names. However, some of them hold permissions that the custom role leaves out. For example, roles/aiplatform.viewer can run agents and read their conversations. PlainID recommends the custom role.

You don't need Google's Browser role. It would also let PlainID read who holds which role on a project.

Rotating the Key

To rotate the service account key:

  1. Create a new JSON key, as in Step 5.
  2. In the POP, replace the Service Account JSON with the new key file, or update the secret in your secret store, and save.
  3. In Google Cloud, delete the old key.

Troubleshooting

Symptom Cause What to do
Test Connection or discovery fails with GCP_AGENTS_INVALID_CREDENTIALS. The file isn't a Google service account key, Google rejects the key (for example, because someone deleted or disabled it), or the key is missing from your secret store. Create a new key as in Step 5 and update the POP.
Test Connection or discovery fails with GCP_AGENTS_PROJECT_NOT_FOUND. The Project ID is wrong, the project is being deleted, or the service account doesn't hold the role on the project. Google answers the same way for a project that doesn't exist and for one the service account can't see. Check the Project ID and the role grant in Step 4.
Test Connection fails with GCP_AGENTS_NO_PRODUCT_CONNECTED. The POP can't read any product. One entry per product follows, naming the missing permission or the API that's off. Grant the missing permissions (Step 3 and Step 4) or enable the APIs (Step 1).
Test Connection succeeds with GCP_AGENTS_PRODUCT_SKIPPED for some products. The service account lacks a permission of that product, or the product's API is off. Fix the named permission or API if you want that product discovered. Otherwise, no action needed.
Test Connection reports GCP_AGENTS_PRODUCT_FAILED, or discovery fails with GCP_AGENTS_CONNECTION. Google refused a read although the service account holds the permissions (for example, an organization policy, VPC Service Controls, or billing), Google didn't answer or returned a partial answer, or the Cloud Resource Manager API is off in the service account's project. Check organization policies, VPC Service Controls perimeters, and billing for the project, and enable the Cloud Resource Manager API (Step 1). Then run discovery again.
Discovery fails with GCP_AGENTS_SCAN_TIMEOUT. Discovery took too long, usually because the POP reads every region without Cloud Asset Inventory. Grant cloudasset.assets.searchAllResources and enable the Cloud Asset API, so the POP reads only the regions that hold agents.
Test Connection succeeds but every discovery run fails. The PlainID Environment doesn't support the Google Cloud agent attributes. Contact PlainID Support.
GKE agents don't appear. The service account can't search Cloud Asset Inventory, or the Deployments don't carry the label registry.gke.io/functional-type: AGENT. Grant the Cloud Asset Inventory permission and check the Deployment labels.
A new Agent Runtime agent doesn't appear yet. Cloud Asset Inventory hasn't indexed the agent's region yet. Run discovery again later.
Agents of one product disappeared from the AI Agent Registry. The service account lost a permission of that product, or someone turned off its API. Restore the permission or API, then run discovery again.

© 2026 PlainID LTD. All rights reserved.