Skip to main content

Causalor SDK

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

Install

pip install causalor-sdk

For release steps and trusted publishing setup, see SDK_RELEASE.md.

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

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

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?)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

causalor-0.2.1.tar.gz (59.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

causalor-0.2.1-py3-none-any.whl (61.4 kB view details)

Uploaded Python 3

File details

Details for the file causalor-0.2.1.tar.gz.

File metadata

  • Download URL: causalor-0.2.1.tar.gz
  • Upload date:
  • Size: 59.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.2

File hashes

Hashes for causalor-0.2.1.tar.gz
Algorithm Hash digest
SHA256 c26d3d087298615b2d3ce31bb9ffc1aee9db4708bcfb4850748fb98ca209f04c
MD5 c0e4e9b04001330a73ddd3e26457a3b5
BLAKE2b-256 c480c12817b8104bb2ba4cc2505eeabb7b0803905eb536a0d8b8d298ac016d72

See more details on using hashes here.

File details

Details for the file causalor-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: causalor-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 61.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.2

File hashes

Hashes for causalor-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c18eb10bb86162006c7ee0b35ddfd0e2151cf144001606bea289e92579ca4797
MD5 437bf8c507d3141b59196050ead1ab14
BLAKE2b-256 2a86d192ca3665a4b31dac3a1c2d58ede02f6034b1315a52aa98a7fad6a43523

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page