Our docs got a refresh! Check out the new content and improved navigation. For detailed API reference see our Python SDK docs and TypeScript SDK.
Description
PercivalIntegrations

Smolagents Integration

This guide shows how to instrument Smolagents with Percival/Patronus by installing the required packages and initializing the instrumentor.

pip install patronus
pip install smolagents
pip install openinference-instrumentation-smolagents
pip install opentelemetry-instrumentation-threading
pip install opentelemetry-instrumentation-asyncio

Once installed, you can import the following instrumentors:

from openinference.instrumentation.smolagents import SmolagentsInstrumentor
from opentelemetry.instrumentation.threading import ThreadingInstrumentor
from opentelemetry.instrumentation.asyncio import AsyncioInstrumentor
 
import patronus
patronus.init(integrations=[SmolagentsInstrumentor(), ThreadingInstrumentor(), AsyncioInstrumentor()])

On this page

No Headings