Python SDK for observability, tracing, and evaluation of LLM applications
Project description
Tracewise
Tracewise is a Python SDK for observability, tracing, and evaluation of LLM applications, designed to be embedded directly into your codebase as a git submodule.
It provides:
- End-to-end tracing for LLM calls and agent workflows
- Unified evaluation across popular LLM evaluation frameworks
- Lightweight HTTP exporters
- Scalable storage with ClickHouse and Postgres
- First-class integrations with LangChain-based LLMs
Why Tracewise?
- 🧩 Submodule-first: Version observability alongside your application code
- 🔍 Deep tracing: Automatic instrumentation for LLM calls and workflows
- 📊 Evaluation-native: Built-in support for multiple evaluation frameworks
- ⚡ Low overhead: Async, HTTP-based exporters
- 🧠 LLM-aware: Native wrappers for LangChain + Groq / OpenAI
Features
Tracing
- Automatic tracing via decorators
- LLM call metadata (model, tokens, latency)
- Workflow and agent-level traces
Evaluation
Integrated support for:
- DeepEval
- Ragas
- Arize Phoenix
- Tracewise Evaluation (agent & tool-based evaluation)
Storage
- ClickHouse → traces, spans, metrics
- PostgreSQL → users, projects, API keys
LLM Integrations
- LangChain-compatible wrappers
- Supported providers:
- Groq
- OpenAI
- Azure OpenAI
Installation (Git Submodule – Recommended)
Tracewise is intended to be used as a git submodule, not as a standalone pip dependency.
git submodule add https://github.com/your-org/tracewise.git tracewise
Quick Start
from tracewise.llm.langchain import ChatGroq
from tracewise import observe, init_observability
from tracewise.llm.openai import OpenAI, AzureOpenAI
# Use the observe decorator
@observe(agent_name)
def my_llm_function(prompt: str) -> str:
# Your LLM logic here
# Langchain
llm = ChatGroq(model="openai/gpt-oss/120b", temperature=0)
response = llm.invoke("Hi")
# OpenAI
llm = OpenAI()
response = llm.responses.create(
model="gpt-4o",
messages=[{
"role": "assistant", "content": "You're a helpful agent",
"role": "user", "content": "Hi"
}]
)
# Azure OpenAI
llm = AzureOpenAI(api_key="", azure_endpoint="", api_version="")
response = llm.chat.completions.create(
model=<deployment_name>,
messages=[{
"role": "assistant", "content": "You're a helpful agent",
"role": "user", "content": "Hi"
}]
)
return response
Configuration
Configure via environment variables:
export TRACEWISE_URL=http://localhost:8000
export TRACEWISE_API_KEY=your-api-key
Or programmatically:
init_observability(url="http://localhost:8000", api_key="your-api-key")
Git Submodule Usage
This repository can be used as a git submodule in your project:
git submodule add https://github.com/your-org/tracewise.git path/to/tracewise
Then install as an editable package:
pip install -e path/to/tracewise
Development
Setup
# Clone the repository
git clone https://github.com/your-org/tracewise.git
cd tracewise
# Install dependencies
pip install -e .
Testing
pytest
Linting
ruff check .
mypy src/
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 tracewise_ai-0.1.0.tar.gz.
File metadata
- Download URL: tracewise_ai-0.1.0.tar.gz
- Upload date:
- Size: 247.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9ed3fee07c0255d25f7751381ea56f7efbcc0aa79c41e57b851e021c4e3d3d7
|
|
| MD5 |
f8e064f400213f6a89fc6baaee9b7b92
|
|
| BLAKE2b-256 |
d622049ce431b80f630dfafe53bf696e8fc475c77d03de088c8ec3d51e3c3ce2
|
Provenance
The following attestation bundles were made for tracewise_ai-0.1.0.tar.gz:
Publisher:
publish.yml on arash-arora/tracewise
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tracewise_ai-0.1.0.tar.gz -
Subject digest:
d9ed3fee07c0255d25f7751381ea56f7efbcc0aa79c41e57b851e021c4e3d3d7 - Sigstore transparency entry: 2062340526
- Sigstore integration time:
-
Permalink:
arash-arora/tracewise@48bda7b26c64a709d8e8f9e8dcde6b86f5395902 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/arash-arora
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@48bda7b26c64a709d8e8f9e8dcde6b86f5395902 -
Trigger Event:
release
-
Statement type:
File details
Details for the file tracewise_ai-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tracewise_ai-0.1.0-py3-none-any.whl
- Upload date:
- Size: 52.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09f931edc8174719ee5813bbbddaad3104cd80f5e8d1f2d6d3985a9f9b24f246
|
|
| MD5 |
0868ae77887c21c83c56b2ecf96e9e53
|
|
| BLAKE2b-256 |
018a3194b97b704fa40dda1c2a8a8d065feca9535ee0d99de1c37f0900e526c3
|
Provenance
The following attestation bundles were made for tracewise_ai-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on arash-arora/tracewise
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tracewise_ai-0.1.0-py3-none-any.whl -
Subject digest:
09f931edc8174719ee5813bbbddaad3104cd80f5e8d1f2d6d3985a9f9b24f246 - Sigstore transparency entry: 2062340658
- Sigstore integration time:
-
Permalink:
arash-arora/tracewise@48bda7b26c64a709d8e8f9e8dcde6b86f5395902 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/arash-arora
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@48bda7b26c64a709d8e8f9e8dcde6b86f5395902 -
Trigger Event:
release
-
Statement type: