Learn how to instrument SmolAgents applications with LangWatch.
@langwatch.trace()
decorator:
langwatch.setup()
: Initializes the LangWatch SDK, which includes setting up an OpenTelemetry trace exporter. This exporter is ready to receive spans from any OpenTelemetry-instrumented library in your application.
SmolagentsInstrumentor()
: The OpenInference instrumentor automatically patches SmolAgents components to create OpenTelemetry spans for their operations, including:
@langwatch.trace()
to add additional context and metadata to your traces, but it’s not required for basic functionality.
langwatch.setup()
handles everything.instrumentors
list.@langwatch.trace()
decorator is optional - the OpenInference instrumentor will capture all SmolAgents activity automatically.LANGWATCH_API_KEY
is set in the environment.langwatch.setup()
and that your agent code is being executed.