Skip to main content

tracetune

Turn your agent's production traces into a better model, safely, with open-source tooling.

The problem. Teams running LLM agents in production collect real traces every day (user requests, tool calls, outcomes). That data could improve their model, but turning traces into clean training data, scoring them, retraining and deploying safely is manual and scattered. Most small teams never do it.

What tracetune does. An open-source pipeline for the whole loop:

traces (.jsonl) -> score + filter -> training dataset -> train (your tool) -> eval -> promote / reject
   [v0.1: done]      [v0.1: done]      [v0.1: done]        [planned]        [planned]   [planned]

It does not replace trainers like TRL, Unsloth, verl or SkyRL. It feeds them.

Quickstart

pip install tracetune
tracetune build --traces examples/sample_traces.jsonl --out out/dataset.jsonl

(examples/sample_traces.jsonl is in the GitHub repo. Use your own traces file, see the format below.)

Output:

traces read : 8
kept        : 4  -> out/dataset.jsonl
dropped     : 4
  - low_score: 1
  - negative_feedback: 1
  - step_error: 1
  - trace_error: 1

Trace format

One JSON object per line:

{"trace_id": "t1", "input": "How many customers are in Delhi?",
 "steps": [{"name": "run_sql", "args": {"query": "..."}, "result": "42"}],
 "output": "There are 42 customers in Delhi.", "feedback": 1}

feedback is 1, -1 or omitted. error on a step or on the whole trace marks failures.

How scoring works

Each trace gets a score: thumbs up/down, minus penalties for failed tool calls, failed runs and wandering (too many steps). Traces below --min-score (default 0.0) are dropped. All weights are in RewardConfig (src/tracetune/filters.py).

Roadmap

  • v0.1: JSONL traces -> scored, filtered chat-format dataset
  • v0.2: importers for Langfuse and OpenTelemetry exports
  • v0.3: LoRA training recipe on a small model + before/after eval report
  • v0.4: promote / reject decision with regression checks

Development

pip install -e ".[dev]"
pytest          # or: python -m unittest

License

Apache-2.0 (see LICENSE).

Metadata

Release files for tracetune 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 tracetune 0.1.2
File Size Uploaded Provenance Actions
tracetune-0.1.2.tar.gz 12.8 kB With provenance Details for tracetune-0.1.2.tar.gz

Built distribution (wheel)

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

Total release size: 25.4 kB

Release files / tracetune-0.1.2.tar.gz

Download URL tracetune-0.1.2.tar.gz
Size 12.8 kB
Tags Source
SHA-256 checksum
How to use checksums
04ccc524a2547d5364f5dcc316ca8ee75913d33309ade87d87ca3d8ea6de7fca
BLAKE2b-256 checksum
How to use checksums
0ef38e792d656c153e52290e976f8645aa210b7f874be52909b8a84585b5e6a2
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 29, 2026.

Transparency log

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

Download URL tracetune-0.1.2-py3-none-any.whl
Size 12.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d718402c25550a47bfa6d00976e72537fc05909794083321afb1026b59e73eb6
BLAKE2b-256 checksum
How to use checksums
c3d9bd4847913c4f62c8c3ea30f86256f5ee143b88d363851cebff96408a4b42
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 29, 2026.

Transparency log

Security for tracetune 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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for tracetune-0.1.2.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 29, 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.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files Full provenance

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