Skip to main content

zoroval

The Zoroval Python SDK. It sends your LLM app's traces to Zoroval as whole conversations.

  • One line to start. OpenAI and Anthropic calls are traced automatically.
  • One trace per conversation.
  • Safe for production: it never raises into your code and never slows a request.
  • Keeps your current tracing. No rip and replace.

Install and set up

pip install zoroval
zoroval login      # opens the browser; writes your key to the git-ignored .env
zoroval doctor     # checks that a trace arrived

Using a coding agent? Point it at get-started.md.

Works with what you already use

Add Zoroval beside your current tools. They keep working as before.

You use With Zoroval
Langfuse Keep it. Zoroval reads the same traces, with no second wrapper and no duplicate spans. Langfuse sessions become Zoroval conversations. You can also upload a Langfuse export in the app.
OpenTelemetry Zoroval joins your existing setup. Only LLM spans come to Zoroval. You can also add Zoroval as a second exporter in your Collector.
LangChain, LlamaIndex and other OpenInference frameworks Keep your instrumentors. Their sessions group into conversations.
OpenLLMetry (Traceloop) Keep it. Zoroval reads its spans.
LangSmith Runs beside it.
Vercel AI SDK and other TypeScript apps Send OpenTelemetry traces to Zoroval from instrumentation.ts. get-started.md shows how.
gunicorn, uvicorn, Celery, serverless Works with no extra setup. In serverless handlers, call zoroval.flush() at the end.

Your coding agent finds what you use and sets up the right path.

Use

import zoroval
from openai import OpenAI

zoroval.init()  # reads ZOROVAL_INGEST_KEY
client = OpenAI()

def handle_message(chat_id: str, user_id: str, text: str) -> str:
    with zoroval.conversation(chat_id, user_id=user_id):
        with zoroval.turn(input=text) as turn:
            reply = client.chat.completions.create(model="gpt-5", messages=history(chat_id, text))
            answer = reply.choices[0].message.content
            turn.set_output(answer)
            return answer

Agents and batch jobs that are not chats use zoroval.trace():

@zoroval.tool
def search_orders(customer_id: str) -> list: ...

@zoroval.step
def plan(goal: str) -> list: ...

with zoroval.trace("nightly-report"):
    plan("summarize yesterday")

API

Call What it does
zoroval.init() Starts tracing. Safe to call twice.
zoroval.conversation(id, *, user_id=None) Every turn inside joins one trace.
zoroval.turn(input=None) One user turn.
zoroval.trace(name=None) One run of an agent or job.
@zoroval.step, @zoroval.tool A custom step or tool run.
zoroval.flush() Sends what is queued. Call it at the end of serverless handlers.

Settings: ZOROVAL_INGEST_KEY, ZOROVAL_SERVICE_NAME, ZOROVAL_ENVIRONMENT, ZOROVAL_RELEASE, ZOROVAL_CAPTURE_CONTENT, ZOROVAL_SAMPLE_RATE, ZOROVAL_ENABLED.

Privacy

  • Prompts and outputs are sent by default. zoroval.init(capture_content=False) keeps model names, usage, timings and errors, and drops content.
  • zoroval.init(redact=fn) passes each captured value through your function before it is sent. If fn raises, that field is dropped.
  • Only LLM spans are sent. Your app's HTTP, database and other spans stay with you.

License

Apache-2.0. See LICENSE.

Metadata

Release files for zoroval 0.1.1

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

Source distribution (sdist)

Source distribution for zoroval 0.1.1
File Size Uploaded Provenance Actions
zoroval-0.1.1.tar.gz 60.2 kB With provenance Details for zoroval-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for zoroval 0.1.1
File Interpreter ABI Platform Actions
zoroval-0.1.1-py3-none-any.whl Python 3 none any Details for zoroval-0.1.1-py3-none-any.whl

Total release size: 132.1 kB

Release files / zoroval-0.1.1.tar.gz

Download URL zoroval-0.1.1.tar.gz
Size 60.2 kB
Tags Source
SHA-256 checksum
How to use checksums
545babcaa8304363cd7928e5e99efdfbcaafba58519997a45f759b7e10fbfd34
BLAKE2b-256 checksum
How to use checksums
23c5b2432b224e4767b27e699f0bb0efb0530328f057c64c58379b41ea2ddbe1
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 10, 2026.

Transparency log

Release files / zoroval-0.1.1-py3-none-any.whl

Download URL zoroval-0.1.1-py3-none-any.whl
Size 71.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d26eea8d889f8f1652d1affa79fcb9470cb88363131eadf5c7fdbc8266cd9a15
BLAKE2b-256 checksum
How to use checksums
9ab8c561356878613d3be59895ab75de85c14f572823c9bd32f6b0b7d8363159
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 10, 2026.

Transparency log

Security for zoroval 0.1.1

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 zoroval-0.1.1.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 10, 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