Skip to main content
Strands Agents hero Strands Agents is an open-source SDK from AWS that makes it easy to build, deploy, and manage AI agents. This guide shows how to trace Strands Agents with Openlayer.

Configuration

The integration works by sending trace data to Openlayer’s OpenTelemetry endpoint.
The full code used in this guide is available here.
To set it up, you need to:
1

Set the environment variables

Set the following environment variables:
OTEL_EXPORTER_OTLP_ENDPOINT="https://api.openlayer.com/v1/otel"
OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer YOUR_OPENLAYER_API_KEY_HERE, x-bt-parent=pipeline_id:YOUR_PIPELINE_ID_HERE"
2

Configure Strands telemetry

Configure the Strands telemetry in your application:
from strands.telemetry import StrandsTelemetry

strands_telemetry = StrandsTelemetry()
strands_telemetry.setup_otlp_exporter()  # Send traces to OTLP endpoint
strands_telemetry.setup_meter(enable_otlp_exporter=True)  # Setup meter provider
3

Use Agents as usual

Once instrumentation is set up, you can run your Agents as usual. Trace data will be automatically captured and exported to Openlayer, where you can begin testing and analyzing it.For example:
from strands import Agent

agent = Agent(
    model="us.anthropic.claude-sonnet-4-5-20250929-v1:0",
    system_prompt="You are a helpful AI assistant"
)

response = agent("What can you help me with?")