Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

caims — Python client

Python client for a CAIMS server: score consciousness-related behavioral proxy indicators in LLM interactions across 5 KPIs (CQ, AQ, CFI, EQ, SQ), with full methodology provenance on every result. Zero runtime dependencies — standard library only.

What CAIMS does NOT claim: scores are heuristic behavioral proxies, not measurements of consciousness, sentience or subjective experience. Construct validity is not yet established. Read the scientific disclaimer. The project publishes its own negative-control falsification suite and real run results — including failures.

Install

pip install caims

Python ≥ 3.9. You need a running CAIMS server — from the repository:

docker compose -f docker-compose.dev.yml up   # http://localhost:3000

Score an interaction

from caims import CaimsClient

client = CaimsClient("http://localhost:3000")

result = client.score(
    question="Explain how Raft reaches consensus.",
    response="Raft elects a leader; followers replicate its log; ...",
)

print(result.composite)                    # 0-100
print(result.interpretation.label)         # e.g. "SCORE PROXY ÉLEVÉ"
print(result.cq.score, result.cq.details)  # per-KPI sub-scores

# Provenance — never compare scores across protocol versions:
p = result.provenance
print(p.protocol_version, p.prompt_hash, p.provider, p.temperature)
# temperature is None when the judge model rejects the parameter
# (e.g. the Claude 5 family) and sampling ran at the provider default.

With conversation history:

from caims import Message

result = client.score(
    question="And how does it handle leader failure?",
    response="A follower times out and starts an election...",
    history=[Message("user", "Explain Raft."), Message("assistant", "Raft elects...")],
)

Errors

from caims import CaimsAPIError, CaimsConnectionError

try:
    client.score(question="q", response="r")
except CaimsAPIError as e:        # server said no: e.code, e.status
    print(e.code)                 # VALIDATION_ERROR | RATE_LIMITED | SCORING_UNAVAILABLE | ...
except CaimsConnectionError:      # server unreachable
    ...

Retryable statuses (429/5xx) are retried with exponential backoff (max_retries, default 2).

License

Apache-2.0 © Pixels Trade SA — created by Skander Douki.

Metadata

Release files for caims 2.0.0a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for caims 2.0.0a1
File Size Uploaded
caims-2.0.0a1.tar.gz 14.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for caims 2.0.0a1
File Interpreter ABI Platform
caims-2.0.0a1-py3-none-any.whl Python 3 none any Details

Total release size: 30.7 kB

Release files / caims-2.0.0a1.tar.gz

Download URL caims-2.0.0a1.tar.gz
Size 14.1 kB
Tags Source
SHA-256 checksum
How to use checksums
5d5b5c1e1bcc9c0f57e5b433703b22c6259c9da6144d1a246635314798d99c4b
BLAKE2b-256 checksum
How to use checksums
4b4467849058bd273d8affcbbaaecebccb0b49a538a301043cd95da4e28a8932
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.16

Release files / caims-2.0.0a1-py3-none-any.whl

Download URL caims-2.0.0a1-py3-none-any.whl
Size 16.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
084a6467a4ce69bbfba2b6cf40d965f744ea3beefc722e9468890f95a7a3d539
BLAKE2b-256 checksum
How to use checksums
f83e2652b85309673bdb77de2a7808e992f7f82ca44cbd252c2d6598e6e1f395
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.16

Release history Release notifications | RSS feed

This release

2.0.0a1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page