In an agent-based workspace, create an agent once before sending traces. Use agent addressing to select its identifier and environment. If an integration requires
project_name, use the selected environment’s tracer_session_name as a compatibility value.Installation
Install LangSmith with Strands Agents support:Setup
1. Configure environment variables
Set your LangSmith API key and the agent identifier and environment. If you use Amazon Bedrock as the model provider for Strands Agents, also configure AWS credentials with your preferred AWS authentication method.The Strands Agents integration uses the standard OpenTelemetry OTLP exporter. Configure the LangSmith endpoint and headers before calling
setup_langsmith_telemetry().2. Enable Strands Agents telemetry
Callsetup_langsmith_telemetry() once when your process starts, before creating or invoking agents:
console=True to also print transformed spans to stdout:
3. Create and run your agent
Once configured, Strands Agents traces are exported to LangSmith automatically:View traces in LangSmith
After running your agent, select your agent and environment in LangSmith, then open Tracing to view traces that include:- Agent invocation spans
- Event loop cycle spans
- LLM call spans with prompts, completions, and token usage
- Tool call spans with tool inputs and outputs when your agent uses tools
Customize the OTLP exporter
If you need to pass custom options to the underlying OpenTelemetry exporter, create aLangSmithSpanExporter with create_langsmith_exporter() and attach it to the Strands tracer provider manually:
Resources
Connect these docs to your agent of choice via MCP for real-time answers.

