Metadata-Version: 2.5
Name: barycenters
Version: 1.0.0
Summary: 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.
Project-URL: Repository, https://github.com/barycenters-systems/barycenters-admission-wedge
Project-URL: Homepage, https://barycenters.ai
License-Expression: AGPL-3.0-or-later
Keywords: admission,agent,ai-safety,authority,barycenters,crewai,governance,langchain,layer-0,shadow-mode
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Security
Requires-Python: >=3.9
Description-Content-Type: text/markdown

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

```bash
pip install barycenters
```

## Drop it in (shadow mode — zero risk)

```python
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:

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

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

```python
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.
