Skip to main content

respan-instrumentation-smolagents

Respan instrumentation plugin for smolagents. Wraps OpenInference's smolagents instrumentor and translates spans into the Respan tracing shape automatically.

Configuration

1. Install

pip install respan-ai respan-instrumentation-smolagents

2. Set Environment Variables

Variable Required Description
RESPAN_API_KEY Yes Your Respan API key. Authenticates trace export.
RESPAN_BASE_URL No Defaults to https://api.respan.ai/api.

Quickstart

import os

from dotenv import load_dotenv
from respan import Respan
from respan_instrumentation_smolagents import SmolagentsInstrumentor
from smolagents import CodeAgent, LiteLLMModel

load_dotenv()

respan_api_key = os.environ["RESPAN_API_KEY"]
respan_base_url = os.getenv("RESPAN_BASE_URL", "https://api.respan.ai/api")

respan = Respan(
    api_key=respan_api_key,
    base_url=respan_base_url,
    instrumentations=[SmolagentsInstrumentor()],
)

model = LiteLLMModel(
    model_id="openai/gpt-4o-mini",
    api_key=respan_api_key,
    api_base=respan_base_url,
)
agent = CodeAgent(tools=[], model=model)

print(agent.run("Return a one-sentence explanation of recursion."))
respan.flush()

Further Reading

See the Respan example projects for runnable scripts.

Metadata

Release files for respan-instrumentation-smolagents 0.1.2

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

Source distribution (sdist)

Source distribution for respan-instrumentation-smolagents 0.1.2
File Size Uploaded Provenance Actions
respan_instrumentation_smolagents-0.1.2.tar.gz 8.4 kB Without provenance Details for respan_instrumentation_smolagents-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for respan-instrumentation-smolagents 0.1.2
File Interpreter ABI Platform Actions
respan_instrumentation_smolagents-0.1.2-py3-none-any.whl Python 3 none any Details for respan_instrumentation_smolagents-0.1.2-py3-none-any.whl

Total release size: 18.7 kB

Release files / respan_instrumentation_smolagents-0.1.2.tar.gz

Download URL respan_instrumentation_smolagents-0.1.2.tar.gz
Size 8.4 kB
Tags Source
SHA-256 checksum
How to use checksums
91494f237f88d3e575b8df05e07453ce9666fb757a58d5ff7e76dc06664a7bc3
BLAKE2b-256 checksum
How to use checksums
5391b18a3537d520bd082a32680873bf69f9421a846f35cdb213e833f6118b8c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / respan_instrumentation_smolagents-0.1.2-py3-none-any.whl

Download URL respan_instrumentation_smolagents-0.1.2-py3-none-any.whl
Size 10.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4d1b1c974c854daeb5b3beb30ee835124b3a56cffbfa6486e71a11fb35fbcd2c
BLAKE2b-256 checksum
How to use checksums
b50fa15de6dbeb2f2ea5e1f828c2b3a097801687891059c28f8f97253a9c7664
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Security for respan-instrumentation-smolagents 0.1.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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