Metadata-Version: 2.4
Name: interai-risk-oracle
Version: 0.1.2b0
Summary: Python client for the hosted InterAI Risk Oracle policy gate
Author: InterAILabs
License-Expression: LicenseRef-InterAI-Public-Interface
Project-URL: Homepage, https://ai-risk-oracle.fly.dev/
Project-URL: Documentation, https://github.com/InterAILabs/ai-risk-oracle#readme
Project-URL: Repository, https://github.com/InterAILabs/ai-risk-oracle
Project-URL: Issues, https://github.com/InterAILabs/ai-risk-oracle/issues
Keywords: ai-agents,policy-enforcement,risk,trust-receipts
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: certifi>=2026.6.17
Dynamic: license-file

# Python SDK

Hosted API client for InterAI Risk Oracle. It uses Certifi's portable CA bundle
by default and also accepts a custom `ssl_context` in the constructor.

```python
import os

from interai_risk_oracle import InterAIRiskOracleClient

client = InterAIRiskOracleClient(
    base_url="https://ai-risk-oracle.fly.dev",
    api_key=os.environ["INTERAI_API_KEY"],
)

decision = client.verify({
    "use_case": "agent-before-tool-execution",
    "action": {
        "type": "tool_call",
        "description": "Send account notice",
        "external_side_effect": True,
    },
    "context": {
        "agent_id": "agent_123",
        "environment": "production",
        "user_confirmation": False,
    },
    "policy": {
        "max_risk_level": "medium",
        "require_trust_receipt": True,
        "require_human_review_above": 0.75,
    },
}, idempotency_key="stable-business-operation-id")
```

If the idempotency key is omitted, the client creates a UUID for the call. Use
a stable business-operation key when retrying the same action.
