Skip to main content

barycenters (Python)

Govern any AI agent in 3 lines. Ships in shadow mode — drop it into your LangChain / CrewAI / LangGraph loop and see what /admit would have blocked. Zero dependencies.

pip install barycenters

Drop it in (shadow mode — zero risk)

from barycenters import Barycenters

bary = Barycenters(api_key="bary_...", namespace="acme/eng")
# mode defaults to "shadow": it NEVER blocks. It only records what /admit would have refused.

def deploy():
    d = bary.admit("deploy_prod", metadata={"env": "production"})
    # shadow: d never raises. d.would_block tells you what WOULD happen once you enforce.
    do_the_deploy()
    bary.receipt(d.token, output_hash="sha256:...")

Or the decorator — the actual 3 lines:

@bary.boundary("delete_prod_db")
def wipe():
    ...

Run your agent for a day. Then read the one thing that sells it to your team:

print(bary.shadow_report()["summary"])
# → "2 of 17 action(s) would have been blocked by /admit"

That report is the whole pitch: you learn exactly which agent actions your policy would have stopped — before a single one is blocked. No risk, no downtime, no config to trust.

Honesty contract

  • Shadow, no endpoint wired: every decision is an honest AWAITING (NO_ENDPOINT) — never a fabricated pass. The shadow report says so.
  • Enforce mode: a refusal raises RefusedError; an unreachable endpoint fails closed (raises too) — ungoverned execution is never silently allowed.
  • Zero dependencies: stdlib urllib only; transport is injectable for tests.

License

AGPL-3.0-or-later. A commercial license is available from Barycenters Systems LLC.

Metadata

Release files for barycenters 1.0.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 barycenters 1.0.0
File Size Uploaded Provenance
barycenters-1.0.0.tar.gz 5.3 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 10.4 kB

Release files / barycenters-1.0.0.tar.gz

Download URL barycenters-1.0.0.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ddd2e4c678fb4527a2b999ad3d354dc298cc4b2d12c888fe893cbb125dbabe5b
BLAKE2b-256 checksum
How to use checksums
a1392b14759078ce9060d01d9dde6c500df453259b2b9bb38f6a48fbdaf73e31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / barycenters-1.0.0-py3-none-any.whl

Download URL barycenters-1.0.0-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
75ec69f3207ef135848664ef44a5981f4b1d605747ea8028141b1e4df209e8ca
BLAKE2b-256 checksum
How to use checksums
01b62efc114a7f9d68c7671545d9ec36c93d73443e085b880ae209e818f5ea5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.13

Security for barycenters 1.0.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.

Release history Release notifications | RSS feed

This release

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