{"slug": "monitor-on-premises-and-multi-cloud-ai-agents-with-agentcore-observability", "title": "Monitor on-premises and multi-cloud AI agents with AgentCore Observability", "summary": "Amazon Web Services (AWS) announced that Amazon Bedrock AgentCore Observability now supports monitoring AI agents deployed on-premises or in multi-cloud environments, including Google Cloud Platform (GCP) and Microsoft Azure, in addition to AWS services. The solution uses the AWS Distro for OpenTelemetry (ADOT) auto-instrumentation to route telemetry to the AgentCore Observability dashboard, enabling detection of hallucinations, monitoring of harmful responses, and tracking token usage for cost governance.", "body_md": "[Artificial Intelligence](/blogs/machine-learning/)\n\n# Monitor on-premises and multi-cloud AI agents with AgentCore Observability\n\nWhen you deploy AI agents built with frameworks like Strands Agents, LangGraph, and CrewAI, you need observability into their performance. This holds true whether they run on Amazon Elastic Kubernetes Service (Amazon EKS), Amazon Elastic Container Service (Amazon ECS), AWS Lambda, on-premises, or another cloud provider such as Google Cloud Platform (GCP) or Microsoft Azure.\n\n[Amazon Bedrock AgentCore](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/what-is-bedrock-agentcore.html) is a platform to build, connect, and optimize agents at scale, with any framework or model. Although [Amazon Bedrock AgentCore Observability](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/observability.html), a capability of Amazon Bedrock AgentCore, provides native tracing, monitoring, and analytics that local cloud monitoring tools don’t offer out of the box, it natively supports only agents deployed on AgentCore runtime in the AWS Cloud. If your agents run anywhere else, you need additional configuration to send telemetry to the dashboard.\n\nIn this post, we show you how to set up observability for agents running outside AWS. You learn how to configure the AWS Distro for OpenTelemetry (ADOT) auto-instrumentation in non-AWS environments, route telemetry to the AgentCore Observability dashboard, and validate the setup end to end.\n\nThe following diagram shows the end-to-end observability pipeline and how telemetry flows from agents to the AgentCore Observability dashboard.\n\n## Solution overview\n\nThe solution uses the [AWS Distro for OpenTelemetry (ADOT)](https://aws-otel.github.io/) running in-process with the agent application. ADOT auto-instruments the agent framework and captures generative AI semantic convention spans, then exports the telemetry directly to the Amazon CloudWatch OpenTelemetry Protocol (OTLP) endpoint using SigV4 authentication with AWS Identity and Access Management (IAM) credentials.\n\nSending telemetry from your AI agent to Amazon Bedrock AgentCore Observability requires three core components:\n\n**ADOT auto-instrumentation**: The AWS Distro for OpenTelemetry handles the complexities of exporting telemetry from non-AWS environments.** IAM credentials**: The ADOT uses these access keys to authenticate with CloudWatch and forward your agent’s telemetry (traces, metrics, and logs) to the AgentCore Observability dashboard.**Environment variables**: These contain specific OpenTelemetry settings related to routing and authentication.\n\nAs seen in the following diagram, this cross-platform observability solution integrates several AWS services. Amazon CloudWatch serves as the foundation, handling telemetry ingestion and storage. Amazon Bedrock AgentCore Observability adds specialized monitoring dashboards for AI agents. AWS Distro for OpenTelemetry (ADOT) provides the cross-platform instrumentation capabilities. IAM secures the authentication between your external environments and AWS.\n\nObservability is a foundational pillar of responsible AI. By routing telemetry to AgentCore Observability, you gain visibility into agent reasoning chains, tool invocations, and model outputs. This allows you to detect hallucinations, monitor for harmful or off-topic responses, track token usage for cost governance, and audit agent behavior across environments. This is especially critical for agents running outside AWS, where problematic outputs might go unnoticed without centralized observability.\n\n## Prerequisites\n\nBefore you begin, verify that you have:\n\n- An AWS account:\n- with Amazon Bedrock model access configured (this walkthrough uses\n[Claude Haiku](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-anthropic-claude-haiku-4-5.html)). For model availability by AWS Region, refer to[supported models by AWS Region](https://docs.aws.amazon.com/bedrock/latest/userguide/models-region-compatibility.html)in Amazon Bedrock. - for designated AgentCore Observability and designated log group(s).\n\n- with Amazon Bedrock model access configured (this walkthrough uses\n[CloudWatch Transaction Search](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Enable-TransactionSearch.html)turned on in your account (one-time setup)- Python 3.10 or later installed on your non-AWS environment.\n- IAM user credentials (access key ID and secret access key) with permissions for:\n`bedrock:InvokeModel`\n\n.`logs:CreateLogGroup`\n\n,`logs:CreateLogStream`\n\n,`logs:PutLogEvents`\n\n.`xray:PutTraceSegments`\n\n,`xray:PutTelemetryRecords`\n\n,`xray:GetSamplingRules`\n\n, and`xray:GetSamplingTargets`\n\n.`cloudwatch:PutMetricData`\n\n.\n\n- Outbound HTTPS access to AWS endpoints from your environment.\n\n## Turn on CloudWatch Transaction Search\n\nIf you haven’t turned on Transaction Search, run the following (one-time per account):\n\nVerify it’s active:\n\n## How it works\n\nThe ADOT auto-instrumentation (`aws-opentelemetry-distro`\n\n) handles the complexity of exporting telemetry from non-AWS environments to CloudWatch:\n\n**Auto-instrumentation**: The`opentelemetry-instrument`\n\ncommand injects the ADOT into the Python runtime. It automatically patches`boto3`\n\n(for Amazon Bedrock calls) and the Strands framework (for agent reasoning spans) to emit OpenTelemetry traces.**SigV4 authentication**: The`aws_configurator`\n\nuses the`boto3`\n\ncredential chain to sign OTLP export requests with SigV4. From non-AWS environments, this uses the`AWS_ACCESS_KEY_ID`\n\nand`AWS_SECRET_ACCESS_KEY`\n\nenvironment variables.**CloudWatch OTLP endpoint**: The ADOT exports traces and logs to the CloudWatch native OTLP ingestion endpoint. The`OTEL_EXPORTER_OTLP_LOGS_HEADERS`\n\nheader directs logs to the specific AgentCore log group, which is how CloudWatch indexes the data under the generative AI observability dashboard. For details on how the CloudWatch OTLP endpoint URL is determined and configured, see[CloudWatch OTLP endpoint](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-OTLPEndpoint.html).**Generative AI semantic conventions**: The Strands`[otel]`\n\npackage emits spans following the[OpenTelemetry generative AI semantic conventions](https://opentelemetry.io/docs/specs/semconv/gen-ai/), including agent reasoning steps, tool invocations, and model calls with token usage.\n\nThe following diagram shows how telemetry export through ADOT auto-instrumentation works from non-AWS environments to CloudWatch.\n\n## Walkthrough\n\nFollow these steps to configure and run a Strands agent in a non-AWS environment, with telemetry routed to AgentCore Observability.\n\n### Step 1: Install dependencies\n\nOn your non-AWS environment (on-premises server, GCP VM, Azure VM, or a compute with internet access):\n\nThe `aws-opentelemetry-distro`\n\npackage includes the ADOT auto-instrumentation with OTLP exporters specific to AWS and the `aws_configurator`\n\nthat handles SigV4 authentication. The `strands-agents[otel]`\n\npackage provides OpenTelemetry trace emission from the Strands framework.\n\n### Step 2: Configure AWS credentials\n\nSet your IAM user credentials as environment variables.\n\n**Security note**: For production deployments, consider using [IAM Roles Anywhere](https://docs.aws.amazon.com/rolesanywhere/latest/userguide/introduction.html) instead of long-lived access keys. With IAM Roles Anywhere, on-premises workloads can obtain temporary credentials using X.509 certificates.\n\n### Step 3: Set OpenTelemetry environment variables\n\nThese environment variables configure the [ADOT to route telemetry to the AgentCore Observability](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/observability-get-started.html#enabling-observability-non-runtime-hosted) dashboard:\n\nKey configuration details:\n\n`AGENT_OBSERVABILITY_ENABLED=true`\n\nactivates generative AI-specific telemetry processing in the ADOT.`OTEL_PYTHON_DISTRO=aws_distro`\n\nand`OTEL_PYTHON_CONFIGURATOR=aws_configurator`\n\nactivate the OpenTelemetry configuration specific to AWS, including SigV4 signing for the CloudWatch OTLP endpoint.`OTEL_RESOURCE_ATTRIBUTES`\n\nwith`aws.log.group.names`\n\ntells CloudWatch to index the telemetry under the AgentCore Observability dashboard. Without this, traces go to generic Amazon CloudWatch Logs.`OTEL_EXPORTER_OTLP_LOGS_HEADERS`\n\nwith`x-aws-metric-namespace=bedrock-agentcore`\n\nroutes metrics in[embedded metric format](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Embedded_Metric_Format.html)to the correct CloudWatch namespace.\n\n### Step 4: Create the agent application\n\nCreate a file named `agent_test.py`\n\nwith a Strands agent:\n\n### Step 5: Run with ADOT auto-instrumentation\n\nThe `opentelemetry-instrument`\n\ncommand wraps your Python process with the ADOT, automatically instrumenting Amazon Bedrock calls and Strands framework operations:\n\nThe agent’s response appears in the terminal. Behind the scenes, the ADOT captures traces, spans, and logs, and exports them to CloudWatch.\n\n### Step 6: Verify in AgentCore Observability\n\nYou see telemetry data within two to three minutes of execution. Open the Amazon CloudWatch console:\n\n- Choose\n**GenAI Observability**, then** Bedrock AgentCore**. - In the\n**Agents** tab, look for`my-external-agent`\n\n. - Choose the agent to view sessions, traces, and span metrics.\n\nThe following screenshot shows the telemetry from the Strands agent (`my-external-agent`\n\n) running in a non-AWS environment, as seen in the AgentCore Observability dashboard in CloudWatch.\n\nThe console shows:\n\n**Agent name**:`my-external-agent`\n\n.**Sessions**: at least one session.** Traces**: trace spans showing the agent’s reasoning and Amazon Bedrock model invocations.** Span details**:`invoke_agent`\n\n,`chat`\n\n,`execute_event_loop_cycle`\n\n, and`chat.us.anthropic.claude-haiku`\n\nspans with latency and token metrics.\n\nThe following screenshot shows a successful trace from the Strands agent (`my-external-agent`\n\n) with four spans, model information, and latency and token details in the AgentCore Observability dashboard.\n\n### Validating from Google Cloud Platform\n\nTo confirm the solution works from a third-party cloud provider, we tested the same setup from Google Cloud Shell, a browser-based terminal running on GCP infrastructure.\n\nSet up the environment on Google Cloud Shell:\n\nRun the agent from GCP:\n\nThe following screenshot shows the Strands agent (`gcp-hosted-agent`\n\n) running on Google Cloud Shell (GCP) and returning a successful response.\n\n### Verify cross-cloud telemetry\n\nWithin two to three minutes of execution, the `gcp-hosted-agent`\n\nappears in the AgentCore Observability dashboard alongside agents running on AgentCore runtime or other environments.\n\nThe following screenshot shows a successful trace from the Strands agent (`gcp-hosted-agent`\n\n) running on GCP with four spans, model information, and latency and token details in the AgentCore Observability dashboard.\n\nThe telemetry is identical to what an AgentCore runtime-hosted agent produces. Sessions, traces, span metrics, token usage, and latency are all visible in the same dashboard, regardless of where the agent runs.\n\nAlthough this walkthrough uses Strands Agents, the same ADOT-based pattern applies to other OpenTelemetry-compatible agent frameworks.\n\nWhen choosing how to deploy your AI agents, understanding the observability trade-offs between different runtime environments helps you make the right architectural decision. Agents deployed directly on Amazon Bedrock AgentCore runtime benefit from automatic observability configuration. Agents running in non-AWS environments require additional manual setup but offer greater deployment flexibility. The following comparison highlights the key differences in telemetry collection, credential management, and use cases to help you determine the best approach for your requirements.\n\nAspect |\nNon-AWS Runtime |\nAgentCore runtime |\n| Telemetry supported | ADOT – manual OTEL variables required | ADOT – Automatic in-built OTEL variables |\n| Credential management | IAM access key/secret or IAM Roles Anywhere | Automatic (IAM role) |\n| Best for | Agents on-premises, GCP, Azure, or a non-AWS environment | Agents deployed on AWS with AgentCore |\n\n## Validated environments\n\nWe tested the ADOT auto-instrumentation approach across two non-AWS environments:\n\nEnvironment |\nPlatform |\nResult |\n| On-premises (simulated) | Standalone server running in non-AWS environment | Strands agent reporting telemetry (sessions, traces, spans) in AgentCore Observability |\n| Google Cloud Shell (GCP) | Browser-based terminal running on Google Cloud Platform | Strands agent reporting telemetry (sessions, traces, spans) in AgentCore Observability |\n\n## Best practices\n\nBased on our testing, we recommend the following when setting up cross-platform AgentCore Observability:\n\n**Use consistent naming**: The`service.name`\n\nin`OTEL_RESOURCE_ATTRIBUTES`\n\nbecomes the agent name on the dashboard. Use descriptive names that identify the environment (for example,`prod-onprem-support-agent`\n\nand`staging-gcp-research-agent`\n\n).**Verify with**: Before running the agent, confirm that your credentials work by running`get-caller-identity`\n\nfirst`python -c \"import boto3; print(boto3.client('sts').get_caller_identity())\"`\n\n. If this fails, the ADOT also fails silently.**Use Python 3.10 or later**: The ADOT requires Python 3.10 or later. We recommend Python 3.12 for the best compatibility with all dependencies.** Set session IDs for multi-turn conversations**: Use the OpenTelemetry baggage API to propagate session IDs:\n\n**Rotate credentials regularly**: For production deployments, avoid long-lived access keys. Consider[IAM Roles Anywhere](https://docs.aws.amazon.com/rolesanywhere/latest/userguide/introduction.html)for on-premises workloads, or use your cloud provider’s identity federation to assume AWS IAM roles.\n\n## Clean up\n\nTo remove the resources created during this walkthrough:\n\nThis walkthrough uses Amazon Bedrock, Amazon CloudWatch, and AWS X-Ray, which incur costs. See the respective pricing pages for details.\n\n## Conclusion\n\nAmazon Bedrock AgentCore Observability isn’t limited to agents running on AgentCore runtime or within AWS. Using ADOT auto-instrumentation with IAM credentials and the correct OpenTelemetry environment variables, you can send telemetry from your choice of environment with internet access. Your agents can run on-premises, on GCP, on Azure, or anywhere else and still report to the same AgentCore Observability dashboard.\n\nThe setup requires a `pip install`\n\nand a set of environment variables. The resulting telemetry is identical to what AgentCore runtime-hosted agents produce: sessions, traces, span metrics, and token usage, all in one unified view.\n\nTo get started, clone the [sample code from GitHub](https://github.com/aws-samples/sample-external-agents-telemetry-on-agentcore-observability) and follow the instructions in the README to configure and run the agent in your environment.\n\nFor agents already running on AWS but outside AgentCore runtime (EKS, ECS, Lambda), refer to the [AgentCore Observability for EKS-hosted agents](https://github.com/awslabs/agentcore-samples/tree/main/03-integrations/agents-hosted-outside-runtime) tutorial. For agents on AgentCore runtime, observability is configured automatically. See [Add observability to your AgentCore resources](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/observability-configure.html).", "url": "https://wpnews.pro/news/monitor-on-premises-and-multi-cloud-ai-agents-with-agentcore-observability", "canonical_source": "https://aws.amazon.com/blogs/machine-learning/monitor-on-premises-and-multi-cloud-ai-agents-with-agentcore-observability/", "published_at": "2026-08-13 16:02:10+00:00", "updated_at": "2026-08-13 16:09:31.495904+00:00", "lang": "en", "topics": ["ai-agents", "ai-infrastructure"], "entities": ["Amazon Web Services (AWS)", "Amazon Bedrock AgentCore", "Amazon Bedrock AgentCore Observability", "AWS Distro for OpenTelemetry (ADOT)", "Amazon CloudWatch", "Google Cloud Platform (GCP)", "Microsoft Azure", "Amazon EKS"], "alternates": {"html": "https://wpnews.pro/news/monitor-on-premises-and-multi-cloud-ai-agents-with-agentcore-observability", "markdown": "https://wpnews.pro/news/monitor-on-premises-and-multi-cloud-ai-agents-with-agentcore-observability.md", "text": "https://wpnews.pro/news/monitor-on-premises-and-multi-cloud-ai-agents-with-agentcore-observability.txt", "jsonld": "https://wpnews.pro/news/monitor-on-premises-and-multi-cloud-ai-agents-with-agentcore-observability.jsonld"}}