Decorator-based LLM tracing package with OpenAI and Anthropic client instrumentation.
Project description
freesolo
freesolo is a Python tracing package for LLM apps.
It is built for the lowest-friction integration possible:
- Install the package
- Set
FREESOLO_API_KEY - Start a trace once
- Add
@trace()to your functions - Optionally wrap your OpenAI or Anthropic client for automatic provider spans
Current provider support
freesolo currently supports automatic client instrumentation for:
- OpenAI
- Anthropic
Install
Install the package plus the provider SDK you use:
pip install freesolo openai
or
pip install freesolo anthropic
Environment
FREESOLO_API_KEY
Quickstart
from openai import OpenAI
from freesolo import instrument_openai, start_trace, trace
client = instrument_openai(OpenAI())
@trace()
def run_agent(question: str) -> str:
result = client.chat.completions.create(
model="gpt-4.1-mini",
messages=[
{"role": "user", "content": question},
],
)
return result.choices[0].message.content or ""
with start_trace("support-agent-run"):
print(run_agent("How do I reset my password?"))
What Gets Stored
- Trace metadata if you explicitly pass it to
start_trace(..., metadata=...) - Decorator spans from
@trace() - OpenAI and Anthropic request + response payloads
- Token usage when available
- Image inputs summarized safely instead of storing full base64 blobs
Notes
- If you only add
@trace(), you still get useful spans. - Use
start_trace(trace_id=...)when you want multiple decorated functions to land in one trace. - If you also wrap the LLM client, you get automatic provider/model spans.
- Delivery is best-effort by default. Trace ingestion failures do not break your app.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file freesolo-0.1.1.tar.gz.
File metadata
- Download URL: freesolo-0.1.1.tar.gz
- Upload date:
- Size: 37.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1808b172ba58b7b88a506d38679a0530b34079b62edff8ea62a81d91c513ea50
|
|
| MD5 |
cdb69fa588728063e4b9786308639749
|
|
| BLAKE2b-256 |
bf1940e9d98c0aff1fa728b1cf048b641522087592dc37575ac5d3ea4afe8b2d
|
File details
Details for the file freesolo-0.1.1-py3-none-any.whl.
File metadata
- Download URL: freesolo-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d825988e24eac8dd68c03f623ca1f27846da6c8ed00138ab82542156dc16c35
|
|
| MD5 |
db6d783aec193de0de10849ca4de7279
|
|
| BLAKE2b-256 |
5f5f5f281cea93029a577a41e09200e1b997a0b97f00b7f054708d7c33c7092f
|