> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openlayer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Strands Agents

> Learn how to trace Strands Agents with Openlayer

<img width="700" style={{ borderRadius: "0.5rem" }} src="https://mintcdn.com/openlayer-44/ktFv0ll3KrnxZamS/images/integrations/strands_hero.png?fit=max&auto=format&n=ktFv0ll3KrnxZamS&q=85&s=ce8958be502f21726ecfe57f5ae37b37" alt="Strands Agents hero" data-path="images/integrations/strands_hero.png" />

[Strands Agents](https://strandsagents.com/) 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](/integrations/opentelemetry).

<Tip>
  The full code used in this guide is available
  [here](https://colab.research.google.com/github/openlayer-ai/openlayer-python/blob/main/examples/tracing/strands-agents/strands_agents_tracing.ipynb).
</Tip>

To set it up, you need to:

<Steps>
  <Step title="Set the environment variables">
    Set the following environment variables:

    ```bash theme={null}
    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"
    ```
  </Step>

  <Step title="Configure Strands telemetry">
    Configure the Strands telemetry in your application:

    ```python theme={null}
    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
    ```
  </Step>

  <Step title="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:

    ```python theme={null}
    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?")
    ```
  </Step>
</Steps>
