AI Cloud Architect

Amazon Bedrock AgentCore Observability with Langfuse

AWSHow-to by Richa Gupta, Ishan Singh, Marc Klingen, Madhu Samhitha Vangara and Yanyan ZhangAWS Artificial Intelligence Blog

In this post, we explain how to integrate Langfuse observability with Amazon Bedrock AgentCore to gain deep visibility into an AI agent’s performance, debug issues faster, and optimize costs. We walk through a complete implementation using Strands agents deployed on AgentCore Runtime followed by step-by-step code examples.

Read the original (opens the source's page in a new tab)

AI: Summary

What it is

AgentCore agents can send OpenTelemetry traces to Langfuse, with AgentCore's default observability turned off via disable_otel, to see per-step latency, token use and cost.

Who it is for

Teams running Strands agents on AgentCore Runtime that need tracing, debugging and cost visibility for LLM calls.

Key points

  • Requires disable_otel=True at deployment and Langfuse OTEL endpoint and auth header set as environment variables.
  • Example uses Anthropic Claude 3.7 Sonnet through Amazon Bedrock; Bedrock model access in us-west-2 is a prerequisite.
  • Langfuse can be self-hosted in your own AWS account using a Terraform module.

The same at other vendors

Different approach

MicrosoftHow-to

Observe and improve agents built outside Foundry

AI:Both get tracing and evaluation for agents by sending OpenTelemetry traces from an external setup, though Microsoft's route is a built-in platform feature rather than a third-party tool.

Timeline

  1. Works withBuild trustworthy AI agents with Amazon Bedrock AgentCore Observability · AWS · How-to
  2. This postAmazon Bedrock AgentCore Observability with Langfuse

Go deeper