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.1

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.1
File Size Uploaded Provenance Actions
xpenvo-0.1.1.tar.gz 7.0 kB With provenance Details for xpenvo-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 14.5 kB

Release files / xpenvo-0.1.1.tar.gz

Download URL xpenvo-0.1.1.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
410275d1429e0ac9ea9e846a4d094ac994c15cd7a9e89239caa9159cb949eda8
BLAKE2b-256 checksum
How to use checksums
6cec1908320777c7879e22d9cd3432f15db890e6a9db40e5b58a808fd86b29f5
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 27, 2026.

Transparency log

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

Download URL xpenvo-0.1.1-py3-none-any.whl
Size 7.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b9d05ad8cb67e7c4ea032cd0d46a25ab43472007be930ff3163764cd31f5476e
BLAKE2b-256 checksum
How to use checksums
8bff6ed57106148e025d71e4df229dea3741911a69cf7ca6fe68a3953b30ed3e
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 27, 2026.

Transparency log

Security for xpenvo 0.1.1

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 xpenvo-0.1.1.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 27, 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.1 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