AI Margin Intelligence — Python SDK + optional CLI/backend. One-line init() that fails open.
Project description
valuemaxx (Python SDK)
Know what each AI agent actually costs you — correctly — and what it earned, per outcome, with confidence.
The Python SDK for valuemaxx — AI margin intelligence for teams that build AI agents. One line captures the correct cost of every LLM call (off the hot path, never throwing into your app), so valuemaxx can bind it to the business outcome each agent run produced.
Install
pip install valuemaxx
Use
import valuemaxx
valuemaxx.init() # zero-code cost capture starts here
That's it. init() instruments the openai / anthropic clients (and frameworks that use them — LangChain, LlamaIndex, CrewAI) at the transport layer, capturing correct token/cost per call: streaming usage taken from terminal values (never delta-summed), cache token classes priced separately, retries counted. It fails open — internal errors are caught and logged, never propagated into your call path, and it adds <1ms.
Attribute a run to an outcome
Wrap a unit of work so its cost can later be tied to a business outcome:
with valuemaxx.run(customer_id=user.id):
response = client.messages.create(...) # cost captured AND tagged to this run
The entity IDs you pass are the natural keys valuemaxx uses to bind delayed/out-of-process outcomes (a deal closing days later, a ticket resolving) back to the run that caused them — with an honest confidence label on every link.
What's captured (and what isn't)
- Captured: model, token counts (input / cache-read / cache-write / output / reasoning), computed cost with provenance (
measured→ reconciled to the provider invoice later), latency, the run context. - Off by default: prompt/response content (PII-sensitive). Enable it only for the eval/replay features, on self-hosted deployments.
The honesty model
Every number valuemaxx produces carries its trustworthiness — cost provenance (measured/estimated/allocated/provider_reconciled), and once joined to outcomes, a binding tier and signal class. A rollup always shows the least-trusted of its parts; estimates never render as billed.
Self-hosting
The SDK ships telemetry over OTLP/HTTP to a valuemaxx backend you run (a container + Postgres; SQLite for local dev). The SDK itself holds nothing and needs no database. See the main repo for the backend, the TypeScript SDK (npm i valuemaxx), and the onboarding flow that wires outcomes for you.
License
Apache-2.0
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 Distributions
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 valuemaxx-0.1.0-py3-none-any.whl.
File metadata
- Download URL: valuemaxx-0.1.0-py3-none-any.whl
- Upload date:
- Size: 326.8 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 |
4f6e7ae6f47c36fb7c26b5ca175d6382dd72b6e34dd6c64a89887843d9aeb426
|
|
| MD5 |
51497f188b31d8520ba5cd64aa5eaa20
|
|
| BLAKE2b-256 |
aa12d3d8dc1edc520ae6dc047b927451445209e90aada1ca6c0b4b8084520f14
|
Provenance
The following attestation bundles were made for valuemaxx-0.1.0-py3-none-any.whl:
Publisher:
release.yml on monaal10/valuemaxx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
valuemaxx-0.1.0-py3-none-any.whl -
Subject digest:
4f6e7ae6f47c36fb7c26b5ca175d6382dd72b6e34dd6c64a89887843d9aeb426 - Sigstore transparency entry: 2138026267
- Sigstore integration time:
-
Permalink:
monaal10/valuemaxx@0ec955c4ee3c0193d2d44487ecfe8ce60fb4dff0 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/monaal10
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0ec955c4ee3c0193d2d44487ecfe8ce60fb4dff0 -
Trigger Event:
push
-
Statement type: