Skip to main content

xpenvo

Hard spending limits for AI agents. This is the small helper library for Xpenvo Agents: it points your existing provider SDK at Xpenvo, adds your agent key, waits for approvals and tells you why a request was stopped.

You keep using your provider's own SDK (OpenAI, Anthropic, Gemini, Mistral, OpenRouter, Azure OpenAI, Amazon Bedrock). One module, standard library only, Python 3.9+.

pip install xpenvo
import os
from openai import OpenAI
from xpenvo import Xpenvo, new_run_id

x = Xpenvo(key=os.environ["XPENVO_KEY"], run=new_run_id(), customer="customer-42")
client = OpenAI(base_url=x.base_url("openai"), default_headers=x.headers())
reply = x.with_approval(lambda: client.chat.completions.create(model="gpt-5-mini", messages=[{"role": "user", "content": "Hi"}]))

What it does:

  1. gives the Xpenvo address for each provider (x.base_url("anthropic"), x.base_url("azure", "my-resource") ...),
  2. adds your agent key and the optional run, step and end-customer labels,
  3. waits for a person to approve a big request, then runs it again (with_approval),
  4. tells you, in plain words, why Xpenvo stopped a request (reason(err), REASONS),
  5. names cheaper fallback models and chooses fail-open or fail-closed,
  6. checks and records spending that is not a model call, such as tools and search APIs (x.spend),
  7. tells you how much the key can still spend (x.status()).

Your prompts and answers go only to Xpenvo and your provider, exactly as before. Never put an email address or other personal data in run, step or customer labels; use your own ids.

Setup guide: https://agents.xpenvo.com/docs · Security: https://agents.xpenvo.com/security

Xpenvo Agents is in a free private beta: https://agents.xpenvo.com

Metadata

Release files for xpenvo 0.1.0

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

Source distribution (sdist)

Source distribution for xpenvo 0.1.0
File Size Uploaded Provenance Actions
xpenvo-0.1.0.tar.gz 7.0 kB Without provenance Details for xpenvo-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 14.5 kB

Release files / xpenvo-0.1.0.tar.gz

Download URL xpenvo-0.1.0.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d33e1dfcb7ebb37e2786674dd47367c3ee04d18810a8df1f0299ecf809ae4b87
BLAKE2b-256 checksum
How to use checksums
b68c76e097be372888d92eba58c046fba8390b8c73c6159019c7175ff30a9b78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.2

Release files / xpenvo-0.1.0-py3-none-any.whl

Download URL xpenvo-0.1.0-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2af3615c3fc0d27b55f61dcff423f09f503a3fb900b4ccbec97002839badd27a
BLAKE2b-256 checksum
How to use checksums
db64acc7ccb6856ec72e790a3c9e09ac5d81d6d294ffea24eb39edd00cccc079
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.2

Security for xpenvo 0.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.0 This release

2 release files No 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