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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file caims-2.0.0a1.tar.gz.
File metadata
- Download URL: caims-2.0.0a1.tar.gz
- Upload date:
- Size: 14.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.11.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d5b5c1e1bcc9c0f57e5b433703b22c6259c9da6144d1a246635314798d99c4b
|
|
| MD5 |
d564cba6d08c1833c0d264f825618cfb
|
|
| BLAKE2b-256 |
4b4467849058bd273d8affcbbaaecebccb0b49a538a301043cd95da4e28a8932
|
File details
Details for the file caims-2.0.0a1-py3-none-any.whl.
File metadata
- Download URL: caims-2.0.0a1-py3-none-any.whl
- Upload date:
- Size: 16.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.11.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
084a6467a4ce69bbfba2b6cf40d965f744ea3beefc722e9468890f95a7a3d539
|
|
| MD5 |
a3924626ce3a07e4a8ec69badda17f29
|
|
| BLAKE2b-256 |
f83e2652b85309673bdb77de2a7808e992f7f82ca44cbd252c2d6598e6e1f395
|