Strands Agents

Trace AWS Strands Agents workflows with Respan.
  1. Sign up — Create an account at platform.respan.ai
  2. Create an API key — Generate one on the API keys page
  3. Add credits or a provider key — Add credits on the Credits page or connect your own provider key on the Integrations page

Add the Docs MCP to your AI coding tool to get help building with Respan. No API key needed.

1{
2 "mcpServers": {
3 "respan-docs": {
4 "url": "https://docs.respan.ai/mcp"
5 }
6 }
7}

What is Strands Agents?

Strands Agents is an open-source SDK from AWS for building AI agents. It provides a model-driven approach to agent development with built-in support for tools, sessions, and multi-agent orchestration.

Setup

1

Install packages

$pip install respan-ai openinference-instrumentation-strands-agents strands-agents
2

Set environment variables

$export RESPAN_API_KEY="YOUR_RESPAN_API_KEY"
$export AWS_ACCESS_KEY_ID="YOUR_AWS_ACCESS_KEY_ID"
$export AWS_SECRET_ACCESS_KEY="YOUR_AWS_SECRET_ACCESS_KEY"
$export AWS_REGION="us-east-1"
3

Initialize and run

1import os
2from dotenv import load_dotenv
3
4load_dotenv()
5
6from respan import Respan
7from respan_instrumentation_openinference import OpenInferenceInstrumentor
8from openinference_instrumentation_strands_agents import StrandsAgentsInstrumentor
9from strands import Agent
10from strands.tools import tool
11
12# Initialize Respan with Strands Agents instrumentation
13respan = Respan(
14 instrumentations=[
15 OpenInferenceInstrumentor(instrumentor=StrandsAgentsInstrumentor())
16 ]
17)
18
19# Define a custom tool
20@tool
21def get_weather(location: str) -> str:
22 """Get the current weather for a location."""
23 return f"The weather in {location} is sunny, 72F."
24
25# Create and run the agent
26agent = Agent(tools=[get_weather])
27response = agent("What is the weather in Seattle?")
28print(response)
29
30respan.flush()
4

View your trace

Open the Traces page to see your Strands Agents workflow with reasoning loops, tool invocations, and LLM calls.

What gets traced

All Strands Agents operations are auto-instrumented:

  • Agent reasoning and action loops
  • Tool invocations and results
  • LLM calls with model, tokens, and input/output
  • Session and conversation state
  • Multi-agent orchestration

Traces appear in the Traces dashboard.

Learn more