Skip to main content

HuggingFace Smolagents OpenTelemetry Integration

Overview

This integration provides support for using OpenTelemetry with the HuggingFace Smolagents framework. It enables tracing and monitoring of applications built with HuggingFace Smolagents.

Installation

  1. Install traceAI Smolagents
pip install traceAI-smolagents

Set Environment Variables

Set up your environment variables to authenticate with FutureAGI

import os

os.environ["FI_API_KEY"] = FI_API_KEY
os.environ["FI_SECRET_KEY"] = FI_SECRET_KEY

Quickstart

Register Tracer Provider

Set up the trace provider to establish the observability pipeline. The trace provider:

from fi_instrumentation import register
from fi_instrumentation.fi_types import ProjectType

trace_provider = register(
    project_type=ProjectType.OBSERVE,
    project_name="smolagents_app"
)

Configure Smolagents Instrumentation

Instrument the Smolagents client to enable telemetry collection.

from traceai_smolagents import SmolagentsInstrumentor

SmolagentsInstrumentor().instrument(tracer_provider=trace_provider)

Create Smolagents Components

Set up your Smolagents client with built-in observability.

from smolagents import (
    CodeAgent,
    DuckDuckGoSearchTool,
    OpenAIServerModel,
    ToolCallingAgent,
)

model = OpenAIServerModel(model_id="gpt-4o")
agent = ToolCallingAgent(
    tools=[DuckDuckGoSearchTool()],
    model=model,
    max_steps=3,
    name="search",
    description=(
        "This is an agent that can do web search. "
        "When solving a task, ask him directly first, he gives good answers. "
        "Then you can double check."
    ),
)
manager_agent = CodeAgent(
    tools=[DuckDuckGoSearchTool()],
    model=model,
    managed_agents=[agent],
)
manager_agent.run(
    "How many seconds would it take for a leopard at full speed to run through Pont des Arts? "
    "ASK YOUR MANAGED AGENT FOR LEOPARD SPEED FIRST"
)

Metadata

Release files for traceAI-smolagents 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for traceAI-smolagents 0.1.7
File Size Uploaded Provenance Actions
traceai_smolagents-0.1.7.tar.gz 10.1 kB With provenance Details for traceai_smolagents-0.1.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for traceAI-smolagents 0.1.7
File Interpreter ABI Platform Actions
traceai_smolagents-0.1.7-py3-none-any.whl Python 3 none any Details for traceai_smolagents-0.1.7-py3-none-any.whl

Total release size: 20.4 kB

Release files / traceai_smolagents-0.1.7.tar.gz

Download URL traceai_smolagents-0.1.7.tar.gz
Size 10.1 kB
Tags Source
SHA-256 checksum
How to use checksums
78946f88114889a83c37c0764de79c4cced0c39161d28d53b6dcba14cd019067
BLAKE2b-256 checksum
How to use checksums
fee6391962c177d088e60995b0995518215220351ae17f98edff07fd83696e45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

Release files / traceai_smolagents-0.1.7-py3-none-any.whl

Download URL traceai_smolagents-0.1.7-py3-none-any.whl
Size 10.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a71712ac3f560924e0c332972aeef514f9fbf1c6e00c3f59f3c8fa563420a5cb
BLAKE2b-256 checksum
How to use checksums
6e108313fddeb59bc5037661e2c26c8400e64dfb15fedc14f702ba2f6bc10c73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

Security for traceAI-smolagents 0.1.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for traceai_smolagents-0.1.7.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page