Skip to content

Strands Agents

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

  1. Install dependencies

    Terminal window
    pip install strands-agents sideseat
    # or
    uv add strands-agents sideseat
  2. Add telemetry

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

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

Strands has its own telemetry class that’s compatible with SideSeat:

from strands.telemetry import StrandsTelemetry
telemetry = StrandsTelemetry()
telemetry.setup_otlp_exporter(
endpoint="http://localhost:5388/otel/default/v1/traces"
)

The Strands TypeScript SDK doesn’t include native OpenTelemetry yet. Use the SideSeat JavaScript SDK for tracing.

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.