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
respan_instrumentation_smolagents-0.1.2.tar.gz 8.4 kB Details

Built distribution (wheel)

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

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

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

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