Metadata-Version: 2.4
Name: arbiter-sdk
Version: 0.1.0
Summary: Official Python SDK for the Arbiter Control Plane for AI Agents
Project-URL: Homepage, https://arbitertrust.com
Project-URL: Repository, https://github.com/sumitbirru1-halo/arbiter-sdk
Author: Arbiter
License-Expression: ISC
Keywords: ai-agents,arbiter,control-plane,policy-engine,runtime-evaluation,sdk
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: httpx<1,>=0.27
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == 'dev'
Description-Content-Type: text/markdown

# Arbiter Python SDK

Official Python client for the Arbiter Control Plane. Same governance semantics as
`@arbiterhq/sdk` (Node): **evaluate → allow | hold | deny**.

**Package:** `arbiter-sdk==0.1.0`  
**Import:** `from arbiter import ArbiterRuntime`

## Install

```bash
pip install arbiter-sdk==0.1.0
```

Authority Connect (`arbiter connect --apply`) installs this package into Python
projects after confirmation. When an on-disk package root is available (monorepo
developer installs), Connect prefers an editable local install; otherwise it
installs the public pip pin `arbiter-sdk==0.1.0`.

> Publication note: prepare this wheel for PyPI before treating the public
> `pip install` path as live. Until publication, offline certification can use
> `ARBITER_PYTHON_SDK_PIP_SPEC=/path/to/arbiter_sdk-0.1.0-py3-none-any.whl`.

## Quick start

```python
from arbiter import ArbiterRuntime

runtime = ArbiterRuntime()  # ARBITER_API_KEY, ARBITER_BASE_URL, ARBITER_AGENT from env
result = runtime.evaluate("send_payment", amount=100)

if result.decision == "allow":
    ...
elif result.decision == "deny":
    ...
elif result.decision == "hold":
    # Approval HOLD has approval_request_id; Discovery HOLD requires human Adopt.
    ...
```

## API surface

| Symbol | Purpose |
|---|---|
| `ArbiterRuntime` | Client: `api_key`/`credential`, `agent`, `base_url`, `evaluate()` |
| `evaluate(...)` | `POST /evaluate` → normalized decision models |
| `AllowEvaluateResult` / `DenyEvaluateResult` / hold variants | Decision shapes |
| `ArbiterError` / `ArbiterTimeoutError` / `ArbiterConfigError` | Deterministic errors |
| `normalize_evaluate_result` | Raw JSON → typed result |

Environment variables (same as Node Connect):

- `ARBITER_API_KEY`
- `ARBITER_BASE_URL` (default `https://api.arbitertrust.com`)
- `ARBITER_AGENT` (required for workspace API keys)

## Governance boundaries

Connect and this SDK never auto-Adopt Discovery resources or auto-Approve HOLD decisions.
