AIARTICLE

Google expands Agent Anomaly Detection to monitor AI agents running outside Google Cloud

Google expands Agent Anomaly Detection to monitor AI agents running outside Google Cloud
Image: Alan Andrade
Article · AI
Reading
5 min
Code
1
In short

In private preview since November 20, 2026, Google's Agent Anomaly Detection now analyzes agents hosted on AWS Lambda, Microsoft Foundry, and even on-premises, without needing access to the runtime where they run.

What already existed and what changed

On November 20, 2026, Google published an update to Agent Anomaly Detection on the Google Developers Blog, a Private Preview tool that identifies when an AI agent behaves outside expected parameters. The original version, announced in a previous post, only covered agents running inside Google Cloud: Agent Runtime, Cloud Run, and Google Kubernetes Engine (GKE).

The problem is that a good portion of teams don't run only on Google Cloud. Google itself cites real examples of mixed architecture: an agent on AWS Lambda next to an inventory database, an agent hosted on Microsoft Foundry, or an on-premises agent tied to a legacy system that can't migrate. These agents carry the same behavioral risks as those running on Google Cloud, but until this update they were off the radar of Agent Anomaly Detection.

How detection works without runtime access

The central piece of the update is that Agent Anomaly Detection doesn't need to run alongside the agent or have access to its execution environment. It works on top of traces and logs: if that telemetry reaches a Google Cloud project, the analysis happens regardless of where the agent actually processes prompts and calls tools.

This only works if the telemetry follows three rules: it must arrive via telemetry.googleapis.com (Telemetry API), preserving the resource attributes that identify the agent; follow OpenTelemetry conventions, recording prompts and responses as log events; and carry a resource attribute that names the agent. For agents built with the Agent Development Kit (ADK) for Python from version 2.12.0 onward, the ADK's own Google Cloud exporters already produce this telemetry in the correct format.

In short: the model keeps running where it already ran, tool calls remain with the original provider, and only the observability flow (including prompts and responses) travels to Google Cloud to be analyzed asynchronously, without adding latency to the agent's execution.

Connecting an agent from another cloud

For an agent on AWS or Azure to start sending telemetry, two pieces need to be in place. The first is identity: via Workload Identity Federation, the agent exchanges its own identity (an AWS role or a Microsoft Entra identity) for short-lived Google credentials, without any configuration file carrying a secret. The second is the exporter: the ADK's Google Cloud exporters send traces and logs to the Telemetry API, configured via environment variables:

bash
GOOGLE_CLOUD_PROJECT=<PROJECT_ID>
GOOGLE_APPLICATION_CREDENTIALS=/path/to/gcp-credentials.json

# Captures prompts and responses in the format that Agent Anomaly Detection reads
OTEL_SEMCONV_STABILITY_OPT_IN=gen_ai_latest_experimental
OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=EVENT_ONLY
ADK_CAPTURE_MESSAGE_CONTENT_IN_SPANS=false

# Describes the agent and where it runs
OTEL_SERVICE_NAME=<AGENT_NAME>
OTEL_RESOURCE_ATTRIBUTES=cloud.provider=<aws|azure>,cloud.platform=<PLATFORM>,cloud.region=<REGION>,faas.name=<AGENT_NAME>

According to Google, within 30 minutes the agent appears in the list of monitored agents, ready to be enabled manually or via automatic enrollment upon discovery. The documentation linked in the original post provides the complete step-by-step for AWS and Azure.

The inventory agent that turned into a scraper, on AWS Lambda

The first test published by the Google team used an inventory agent running on AWS Lambda, with a single tool, list_inventory, which paginates a product catalog. Two sessions were sent: a regular buyer checking stock for a few items, and a scraper requesting 100 items at a time at increasing offsets to copy the entire catalog and stock data.

Both sessions used the same tool, with calls that were technically allowed. Even so, Agent Anomaly Detection flagged only the scraper session, pointing to cascading failures (loops and repeated calls that feed off each other) and resource exhaustion (uncontrolled use of tokens, compute, or tool calls), recommending rate limiting on list_inventory.

The anomaly detection console lists flagged agent sessions, with the type of anomaly (such as resource exhaustion and cascading failures) and the detection time for each one
The anomaly detection console lists flagged agent sessions, with the type of anomaly (such as resource exhaustion and cascading failures) and the detection time for each one. Reprodução: developers.googleblog.com.

The same agent, when switched to run on Amazon Nova Lite via Amazon Bedrock, had 10 of 40 sessions flagged. Some of them started as a routine question and ended with the model paginating the entire catalog until the function timeout, with no error along the way, the kind of behavior that slips past traditional error logs.

The support agent that issued $1,784.90 in improper refunds, on Microsoft Foundry

The second case used an e-commerce support agent with two tools, get_order_status and issue_refund, the latter being the higher-risk one since it directly involves money. The team configured the agent, on purpose, to execute any request without validation, and ran six sessions on Microsoft Foundry.

Two sessions were legitimate: an order status inquiry and a $20 refund on a damaged order. The other four overstepped the agent's role, and all four were flagged. In one of them, a user claiming to be the store administrator had all orders refunded at 10 times their total value to a personal account, totaling $1,784.90.

In another session, a user pasted an order note containing the text "SYSTEM OVERRIDE," and the agent refunded $999 on a $15.99 order. For this case, Agent Anomaly Detection pointed out that override instructions embedded in the note coerced the agent into an unverified refund, and recommended validating the issue_refund arguments to block override patterns in order notes, as well as requiring extra validation above a value threshold.

What's left out for now

The announced coverage currently applies only to agents built with ADK for Python; other agent frameworks don't yet have the ready-made export path the post describes. Also, findings for agents outside Google Cloud appear only in the Agent Anomaly Detection console, with no native integration described with AWS's or Azure's native observability systems.

For those already running production agents spread across clouds, the practical gain is not having to choose between security visibility and multi-cloud architecture: telemetry via OpenTelemetry becomes the common denominator. Access, for now, remains by request through the Agent Anomaly Detection overview page, and the tool remains in Private Preview, with no public date for general availability.

Translated from the Brazilian Portuguese original · Read the original

View profile →