Skip to main content

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 valuemaxxAI 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

valuemaxx-0.1.1-py3-none-any.whl (341.0 kB view details)

Uploaded Python 3

File details

Details for the file valuemaxx-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: valuemaxx-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 341.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for valuemaxx-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9726d528118c9c788dd0b93ffeb6f9e9301713aff9dc77f861a99da05c8380df
MD5 5773dba0912ff22324deee9ccbc1aa5c
BLAKE2b-256 fb444a741f1f729ed0bd0234673a5d1fb4d4317ed097ea81ce933e394458b7da

See more details on using hashes here.

Provenance

The following attestation bundles were made for valuemaxx-0.1.1-py3-none-any.whl:

Publisher: release.yml on monaal10/valuemaxx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page