Metadata-Version: 2.4
Name: hennesey
Version: 0.1.0
Summary: Hennesey Python SDK: durable sandbox leases, an intent journal for side effects, workspace conflict control and human approvals for AI agents.
License: Apache-2.0
Project-URL: Homepage, https://github.com/BennyValen/hennesey
Keywords: agents,sandbox,durable,e2b,idempotency,leases
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: PyYAML>=6.0
Provides-Extra: test
Requires-Dist: pytest>=8; extra == "test"

# hennesey (Python)

Python SDK for [Hennesey](https://github.com/BennyValen/hennesey): durable sandbox leases, an intent journal for side effects, workspace conflict control, and human approval policies for AI agents. Same API as the TypeScript SDK, in snake_case.

```bash
pip install hennesey
npx @hennesey/cli dev     # local control plane, zero accounts
```

```python
from hennesey import Hennesey

hn = Hennesey()                       # HENNESEY_URL / HENNESEY_API_KEY or hennesey.config.yaml
run = hn.start_run()
charge = run.effect("charge", order, lambda p: stripe_charge(p), idempotency_key=f"charge:{order['id']}")
run.checkpoint("charged")
run.require_approval("deploy.production")
run.complete()

# After a crash, on another worker:
resumed = hn.resume_run(run_id)       # claim, restore checkpoint, reconcile unknown outcomes
```

Built-in sandbox adapters: `LocalAdapter`, `MockAdapter`. For other providers pass an object implementing `hennesey.adapters.SandboxAdapter`.

Hennesey does not promise exactly-once execution of arbitrary external actions; it tracks the unknown-outcome window, enforces idempotency keys, reconciles and compensates.
