Skip to main content
TrustLens connects to Google Cloud Vertex AI to discover and monitor your AI agents deployed as Reasoning Engines. In addition to agent discovery, it collects usage metrics, tool call data, and security events from Cloud Monitoring, Cloud Trace, and Cloud Logging.

What TrustLens discovers

For each Reasoning Engine (agent)

For models and datasets

TrustLens also discovers models from the Vertex AI Model Registry and managed Datasets, including basic metadata, lifecycle status, and labels.

Tool call categories

Tool calls are classified into the following categories based on the tool name:
To ensure tool calls appear in the correct category in TrustLens dashboards, name your tools following the patterns above — for example, use google_search instead of search_tool.

Required GCP APIs

Enable all six APIs in your GCP project before creating the integration: Enable all at once:
Optional — cloudasset.googleapis.com: TrustLens uses the Cloud Asset Inventory API to accelerate location discovery when scanning multi-region projects (reduces scan time from ~3–5 s to ~1–2 s). If this API is not enabled or the service account does not have roles/cloudasset.viewer, the connector automatically falls back to parallel regional probing — discovery still completes successfully but may take slightly longer. To enable:

Required IAM roles

The service account provided to TrustLens needs all seven roles:
All roles are read-only. TrustLens cannot create, modify, or delete any GCP resources.
Why a custom role for the floor setting? GCP’s predefined roles/modelarmor.viewer and roles/modelarmor.admin do not include modelarmor.floorSettings.get. That permission is only in roles/editor. Create a minimal custom role to grant it in a least-privilege way:

Custom role (strict least-privilege)

If your policy requires a single custom role instead of predefined roles, the minimum individual permissions needed are:

Step-by-step setup

1

Create a service account

2

Grant IAM roles

3

Create a JSON key

4

Configure the integration in TrustLens

Provide the following when creating the GCP integration:

Location configuration

TrustLens supports three location modes:
Do not pass a comma-separated string (e.g. "us-central1,europe-west4") — use selected_locations as a JSON array instead.

Tool call extraction — instrumented vs. non-instrumented agents

TrustLens extracts tool call data from two sources and merges the results:

Cloud Trace (OpenTelemetry-instrumented agents)

For agents built with ADK, LangChain, or LangGraph, TrustLens reads OpenTelemetry spans from Cloud Trace. These frameworks automatically emit spans with openinference.span.kind=TOOL labels, which include the tool name and invocation count.

Cloud Logging (all agents)

TrustLens also scans Cloud Logging for structured log entries containing tool call information in their JSON payload, covering agents that emit logs but not OpenTelemetry traces.

Availability by framework

Non-instrumented agents will show total_runs > 0 (from Cloud Monitoring) but all tool call counts at zero if they do not emit structured logs. This is expected behavior.

Model Armor guardrails discovery

TrustLens integrates with Google Cloud Model Armor to discover and surface your project’s AI content safety posture alongside each Vertex AI agent. Model Armor operates at the project level — policies (templates) and the floor setting apply to all agents in the project rather than being configured per agent. TrustLens discovers this data and associates it with every agent in the integration so you can assess your safety coverage in one place.

What is discovered

TrustLens reads two categories of Model Armor data:

Templates

Model Armor templates are named policy definitions that apply RAI (Responsible AI) content filters. Each template includes: filterType values: confidenceLevel values (from least to most strict):

Floor setting

The floor setting is a single project-level object that defines the minimum content safety policy enforced across all Model Armor usage in the project, regardless of what individual templates specify: When enableFloorSettingEnforcement is true, Model Armor applies the floor policy as a baseline even if a weaker template is attached to a call. TrustLens surfaces this as a project-wide safety control.

Guardrails object shape

All Model Armor data is stored on each agent’s guardrails field with the following structure: Example guardrails object for a GCP agent:

Partial access behavior

TrustLens reads templates and the floor setting independently. If your service account has roles/modelarmor.viewer but not the floor setting custom role, templates will still appear — the floor setting will show as null. Similarly, if templates are inaccessible but the floor setting is readable, the floor setting is surfaced on its own. A completely missing guardrails field means neither source was accessible.

Agents without Model Armor

If your GCP project has no Model Armor templates configured, or the service account does not have the required roles, the guardrails field will be null for all agents in the integration. TrustLens surfaces this as a missing guardrails finding.

Feature availability by permission level


Known limitations


Security considerations

  • The service account key should be stored securely. Rotate it regularly.
  • All IAM roles are read-only — TrustLens cannot modify or delete GCP resources.
  • TrustLens encrypts the service account JSON at rest.
  • For keyless authentication, Workload Identity Federation can be used in environments where storing a service account key is not permitted. Contact support for assistance.

Troubleshooting

  • Verify roles/aiplatform.viewer is granted at the project level.
  • Confirm your agents are deployed in the configured region. If using auto-discovery, set discover_all: true rather than specifying individual regions.
  • Enable the aiplatform.googleapis.com API in the project.
  • Verify roles/storage.objectViewer is granted at the project level (not just on specific buckets).
  • Confirm the agent has a pickle file URI in spec.packageSpec.pickleObjectGcsUri.
  • Verify roles/monitoring.viewer is granted.
  • Enable the monitoring.googleapis.com API.
  • Metrics may take up to 24 hours to appear for new agents.
  • Check whether the agent is built with ADK, LangChain, or LangGraph (instrumented). Custom cloudpickle agents require structured JSON log emission for tool call data.
  • Verify roles/cloudtrace.user and roles/logging.viewer are granted.
  • Enable cloudtrace.googleapis.com and logging.googleapis.com APIs.
  • Verify roles/logging.viewer is granted.
  • Enable the logging.googleapis.com API.
  • Cloud Logging entries may take a few minutes to appear after agent invocations.
Multiple agents are likely sharing the same GCS pickle file. Each agent needs its own unique pickle file to show distinct configurations.
  • Enable the modelarmor.googleapis.com API: gcloud services enable modelarmor.googleapis.com --project=YOUR_PROJECT_ID
  • Grant roles/modelarmor.viewer to the service account: gcloud projects add-iam-policy-binding YOUR_PROJECT_ID --member="serviceAccount:YOUR_SA_EMAIL" --role="roles/modelarmor.viewer"
  • Verify at least one Model Armor template exists in the GCP Console under Model Armor in the regions you have configured.
  • IAM changes can take 1–2 minutes to propagate. Trigger a resync from the integration settings page after granting permissions.
The floor setting requires modelarmor.floorSettings.get, which is not included in roles/modelarmor.viewer. Create and bind the modelArmorFloorReader custom role using the commands in the Required IAM roles section above.