whatbroke-recorder
Record AI agent traces from Python as whatbroke JSONL. Swap a model, tweak a prompt, record again, then diff the two runs and see exactly what changed: which tool calls disappeared, which arguments drifted, where cost and latency moved.
pip install whatbroke-recorder
Zero dependencies. The trace format is identical to the Node SDK and the whatbroke record proxy, so traces from any of them diff against each other.
Usage
Wrap your existing client, run your agent exactly as before:
from whatbroke import Recorder
from openai import OpenAI
rec = Recorder("traces/current.jsonl", run="refund-flow")
client = rec.wrap_openai(OpenAI())
run_my_agent(client) # llm calls and tool calls are captured
rec.output(final_answer)
rec.end("ok")
rec.wrap_anthropic(client) does the same for the Anthropic SDK. Sync and async clients both work.
For everything else, write events directly:
rec = Recorder("traces/current.jsonl", run="refund-flow")
rec.llm_call(model="gpt-4o", latency_ms=900, input_tokens=512, output_tokens=128, cost_usd=0.004)
rec.tool_call("lookup_order", {"order_id": "A-1042"})
rec.output("Refund issued.")
rec.end("ok")
Diffing
The diff CLI ships on npm:
npx whatbroke-cli diff traces/baseline.jsonl traces/current.jsonl
Exit code 1 when something breaking shows up (a dropped tool call, a run that started failing), so it slots straight into CI. Full docs, flaky-agent sampling, behavior contracts, and importers for OTel/Langfuse/LangSmith: github.com/arthi-arumugam-git/whatbroke.
License
MIT
Metadata
Release files for whatbroke-recorder 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| whatbroke_recorder-0.1.0.tar.gz | 4.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| whatbroke_recorder-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.9 kB
Release files / whatbroke_recorder-0.1.0.tar.gz
| Download URL | whatbroke_recorder-0.1.0.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5b1a39e90fa072d13cec50b57033db1c84486c7f3a597a5a3a02bd5aaa2c8818
|
|
BLAKE2b-256 checksum How to use checksums |
61bc41404906625cdaec2ba04f22962506924b659631adde0fc9e9f2af07aa9f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.14
|
Release files / whatbroke_recorder-0.1.0-py3-none-any.whl
| Download URL | whatbroke_recorder-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
909216d881cfd6a1d66f884026afa58fd33d910192c80ea08fdfd531a175c2df
|
|
BLAKE2b-256 checksum How to use checksums |
e6dfea42e17c85b05f9b39f32f0228c27a0785a4cc96c86aa4cf1d58fd51c11e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.14
|