Strands Agent SDK Quick Start

Learn how to integrate Strands agents with Fiddler using the Fiddler Strands SDK for automatic instrumentation and comprehensive observability of your AI agent workflows.

What You'll Learn

In this guide, you'll learn how to:

  • Set up a Fiddler application for monitoring Strands agents

  • Install and configure the Strands Agents SDK

  • Instrument Strands agents with automatic telemetry

  • Use helper functions to add custom metadata

  • Verify monitoring is working correctly

  • Troubleshoot common integration issues

Time to complete: ~15 minutes

Prerequisites

Before you begin, ensure you have:

  • Fiddler Account: An active account with access to create applications

  • Python 3.10+: Verify your version:

    python --version
  • Strands Agents SDK: Install the SDK (includes Strands agents and OpenTelemetry):

    # Using uv (recommended)
    uv add fiddler-strands
    
    # Or using pip
    pip install fiddler-strands
  • OpenAI API Key: For running the example agent:

    export OPENAI_API_KEY=<your-openai-key>

If you prefer using a notebook, download it directly from GitHub or open it in Google Colab to get started.

1

Create a Fiddler Application

Fiddler GenAI Apps list page

First, create a dedicated application in Fiddler to receive your agent traces.

  1. Sign in to your Fiddler instance

  2. Navigate to Gen AI Apps in the left sidebar

  3. Click Create Application

  4. Enter the application details:

    • Name: strands-agent-monitoring

    • Project: Select a project from the dropdown or press Enter to create a new one

  5. Click Create and copy the Application UUID (you'll need this for configuration)

2

Configure Environment Variables

Set up the required environment variables for Fiddler integration. Replace the placeholder values with your actual credentials.

Instructions for generating or retrieving your personal access token can be found in the Access guide.

Tip: Save these environment variables in a .env file for easy reuse:

3

Set Up Strands Telemetry and Instrumentation

Now configure the Strands telemetry system with automatic Fiddler instrumentation using the SDK.

Create agent_monitoring.py:

Configuration Breakdown:

  • Console Exporter: Prints traces to terminal for debugging

  • OTLP Exporter: Sends traces to Fiddler via OpenTelemetry Protocol

  • StrandsAgentInstrumentor: Automatically instruments agents with proper attribute propagation and Fiddler integration

What the SDK Does Automatically:

  • Injects logging hooks into Strands agents

  • Propagates agent attributes (name, ID, system prompt) to all child spans

  • Processes spans with Fiddler-specific enhancements

  • Handles all OpenTelemetry complexity behind the scenes

4

Create and Instrument Your Agent

With telemetry configured, create a Strands agent that's fully instrumented for Fiddler monitoring.

Add to agent_monitoring.py:

Run your instrumented agent:

5

Verify Monitoring in Fiddler

After running your agent, verify that traces are appearing in Fiddler.

  1. Navigate to your application in Fiddler

  2. Click on the Traces tab

  3. You should see traces from your agent executions

  4. Click on a trace to view detailed span information

  5. Verify that agent attributes are present:

    • gen_ai.agent.name

    • gen_ai.agent.id

    • system_prompt

Success Indicators:

  • ✅ Traces appear within 30 seconds of agent execution

  • ✅ Parent and child spans are properly linked

  • ✅ Agent attributes appear on all relevant spans

  • ✅ Tool calls are captured as separate spans

  • ✅ System prompts are visible in trace metadata

Troubleshooting

Traces Not Appearing in Fiddler

Issue: No traces show up after running your agent.

Solutions:

  1. Verify environment variables:

  2. Check network connectivity:

  3. Validate authentication:

    • Ensure your access token is valid and not expired

    • Verify Application UUID matches your Fiddler application

  4. Review console exporter output:

    • Check the terminal for trace output

    • Look for error messages in console logs

Missing Agent Attributes on Child Spans

Issue: Tool calls and sub-spans don't have agent context.

Solutions:

  1. Verify SDK instrumentation is enabled:

  2. Check instrumentation status:

  3. Add custom attributes using helper functions:

OTLP Export Errors

Issue: Error messages about OTLP export failures.

Solutions:

  1. Check endpoint format:

  2. Verify headers format:

  3. Test with a minimal example:

Performance Issues

Issue: Agent response times are slower after adding monitoring.

Solutions:

  1. Use batch span processor (already default in StrandsTelemetry):

  2. Disable console exporter in production:

  3. Adjust sampling rate if needed:

Configuration Options

Basic Configuration

For most use cases, the basic configuration is sufficient:

Adding Custom Metadata with Helper Functions

The SDK provides helper functions to enrich your traces with custom business context:

Helper Functions Available:

  • set_conversation_id(agent, conversation_id) - Track multi-turn conversations

  • set_session_attributes(agent, **kwargs) - Add session-level business context

  • set_span_attributes(obj, **kwargs) - Add attributes to models, tools, or agents

  • set_llm_context(model, context) - Add background information for LLM interactions

  • get_conversation_id(agent) - Retrieve conversation ID

  • get_session_attributes(agent) - Retrieve session attributes

  • get_span_attributes(obj) - Retrieve span attributes

  • get_llm_context(model) - Retrieve LLM context

Advanced Configuration

For production deployments with custom resource metadata and batch settings:

Advanced Options Explained:

  • Custom Resource: Add service metadata for better organization

  • Batch Settings: Tune for your throughput requirements

  • Timeout Configuration: Adjust for network conditions

  • Environment Tagging: Separate dev/staging/prod traces

  • SDK Integration: Works seamlessly with custom OpenTelemetry configurations

Multi-Agent Configuration

For systems with multiple agents:

Multi-Agent Benefits:

  • ✅ Distinct agent identification in traces

  • ✅ Separate performance metrics per agent

  • ✅ Clear visualization of agent interactions

  • ✅ Easier debugging of complex workflows

Next Steps

Now that you have Strands agents integrated with Fiddler, explore these advanced capabilities:

Advanced Observability and Evaluation


Questions? Talk to a product expert or request a demo.

💡 Need help? Contact us at [email protected].