Allela SDK
Tamper-evident, DigiCert co-signed attestation for AI decisions.
Install
From this folder:
pip install -e .
Quickstart
import allela
allela.configure(
tenant_id="acme_corp",
model_provider="anthropic",
model_id="claude-sonnet-4-6",
model_version="20250929",
)
@allela.trace(system_prompt="You are a credit risk assistant.")
def make_credit_decision(applicant_profile: str) -> str:
return call_your_llm(applicant_profile) # your existing AI call, unchanged
result = make_credit_decision("Applicant: income $60,000, requesting $10,000 loan.")
# `result` is returned immediately — attestation happens on a background
# thread and does not add latency to your function call.
# Before your process exits, flush any in-flight attestations:
allela.shutdown()
Verifying a decision later
result = allela.reconcile(
event_id="evt_...",
raw_input="Applicant: income $60,000, requesting $10,000 loan.",
raw_output="APPROVED: Low risk profile.",
)
print(result["path"])
result["path"] is one of:
FULL_INTEGRITY_VERIFICATION: the stored record is intact and your data matches it.TAMPER_DETECTED: the stored record is intact, but your data doesn't match it (mismatched_fieldssays which).DATA_UNAVAILABLE_AT_SOURCE: the stored record is intact; no data was supplied to compare.LEDGER_RECORD_INVALID: the stored record failed its signature or root-hash check (failed_checkssays which), so it can't be trusted and nothing was compared.NOT_FOUND: no event with that ID.
result["timestamp_imprint_matches"] only confirms that the stored
timestamp token covers this record's hash. It does not yet verify the
timestamp authority's signature or certificate chain.
What gets stored
Only cryptographic hashes and metadata (model ID/version, timestamps,
a hash of the system prompt) — never your raw input/output text. See
the Decision Event Schema (v1/decision-event.json) for the exact shape.
Important: call allela.shutdown() before exiting
Because attestation runs on a background worker so it never blocks your
application, an attestation that's still in flight when your process
exits abruptly could be lost. Call allela.shutdown() (which flushes
the queue) during your application's graceful shutdown sequence.
shutdown() waits at most timeout seconds (default 30; pass None to
wait indefinitely) and returns True if every attestation was written,
or False if the timeout expired with some still pending — in which
case a warning is logged with the count.
License
Apache License 2.0 — see LICENSE.
Release files for allela 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| allela-0.1.1.tar.gz | 14.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| allela-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 28.6 kB
Release files / allela-0.1.1.tar.gz
| Download URL | allela-0.1.1.tar.gz |
|---|---|
| Size | 14.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b22e72b737b409288199bf1f0e16a55eda197f5e9c9886fec93921409833b320
|
|
BLAKE2b-256 checksum How to use checksums |
63f88b306470d4afffc4de89a0eb0b2e5a6c4d8258c1e93f12e9abc40d6e978e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Release files / allela-0.1.1-py3-none-any.whl
| Download URL | allela-0.1.1-py3-none-any.whl |
|---|---|
| Size | 14.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
31d98858b3c317a3491655aa733fa39a2226a52420b834820043a166843a82b3
|
|
BLAKE2b-256 checksum How to use checksums |
12c882e94d342bb9836eea75d363332a8f7ef15d26cd9aaf923638059a777788
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|