Metadata-Version: 2.4
Name: causalor-sdk
Version: 0.2.0
Summary: Causalor SDK — deterministic, proof-backed governance for AI agents (in-process CAE).
Author: Causalor Labs
License: MIT
Project-URL: Homepage, https://causalorlabs.com
Project-URL: Repository, https://github.com/CausalorLabs/Causalor-Phase1
Keywords: ai,agent,governance,policy,guardrails,telemetry
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: opentelemetry-api>=1.24.0
Requires-Dist: opentelemetry-sdk>=1.24.0
Requires-Dist: opentelemetry-exporter-otlp>=1.24.0
Provides-Extra: redis
Requires-Dist: redis>=5.0.0; extra == "redis"
Provides-Extra: kafka
Requires-Dist: confluent-kafka>=2.3.0; extra == "kafka"

# Causalor SDK

Standard Python SDK for the hosted or self-hosted Causalor control plane.

## Install

```bash
pip install causalor-sdk
```

For release steps and trusted publishing setup, see [SDK_RELEASE.md](/Users/NischayTiwari/23012026/SDK_RELEASE.md).

For a local pre-PyPI install and a live test-agent run against the deployed Azure control plane:

```bash
bash scripts/sdk/install-local.sh
export CAUSALOR_TEST_API_URL=http://<bridge-host>:9001
export CAUSALOR_TEST_API_KEY=<api-key>
bash scripts/sdk/run-test-agent.sh
```

## Quick Start

```python
from causalor import Causalor

sdk = Causalor.init({
    "apiUrl": "https://api.causalor.io",
    "apiKey": "cal_xxx",
    "agentId": "agent-123",
    "tenantId": "default",
})

sdk.sendEvent({
    "user_id": "u1",
    "semantic_type": "ACTION",
    "content": "Approved loan for 185000",
})
```

## Standard Methods

- `init({ apiUrl, apiKey, agentId, tenantId? })`
- `sendEvent(event)`
- `sendEvents(events[])`
- `getRepair(userId)`
- `ackRepair(userId, repairId, success, feedback?)`
- `registerAgent(metadata)`
- `startSession(userId, metadata?)`
- `heartbeat(sessionId, metadata?)`
- `endSession(sessionId, outcome?)`
- `preCommit(action, state, policyId?)`
