Skip to content

Strands (Python)

Strands Agents is an AI agent framework developed by AWS. It has native OpenTelemetry support, making SideSeat integration seamless.

  1. Start SideSeat

    Terminal window
    npx sideseat
  2. Install dependencies

    Terminal window
    pip install strands-agents sideseat
  3. Add telemetry

    from sideseat import SideSeat, Frameworks
    from strands import Agent
    SideSeat(framework=Frameworks.Strands)
    agent = Agent()
    response = agent("What is the capital of France?")
    print(response)
  4. View runs

    Open http://localhost:5388 to see your runs.

  1. Start SideSeat

    Terminal window
    npx sideseat
  2. Set the endpoint

    Terminal window
    export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:5388/otel/default
  3. Install dependencies

    Terminal window
    pip install 'strands-agents[otel]'
  4. Add telemetry

    from strands.telemetry import StrandsTelemetry
    from strands import Agent
    telemetry = StrandsTelemetry()
    telemetry.setup_otlp_exporter()
    telemetry.setup_meter(enable_otlp_exporter=True)
    agent = Agent()
    response = agent("What is the capital of France?")
    print(response)
  5. View runs

    Open http://localhost:5388 to see your runs.

See the Strands (TypeScript) page for setup instructions using the SideSeat TypeScript SDK.

SideSeat shows a trace timeline with:

  • A parent span for the agent run
  • Child spans for each LLM call with model, tokens, and cost
  • Child spans for each tool execution with inputs and outputs

Strands automatically traces tool calls. Define tools normally:

from strands import Agent, tool
@tool
def get_weather(location: str) -> str:
"""Get weather for a location."""
return f"Weather in {location}: Sunny, 72F"
agent = Agent(tools=[get_weather])
response = agent("What's the weather in Paris?")

Group related traces using trace attributes:

agent = Agent(
trace_attributes={
"session.id": "conversation-123",
"user.id": "user-456",
}
)

These attributes appear in SideSeat and enable filtering. All turns with the same session.id are grouped under one session.