Skip to main content

curbi-decisions

Python port of Curbi's decision-model adapter. Decision models (TypeSafe Jev, Fastino GLiDE, OpenAI Decisions) return typed answers with probabilities. This package checks the answer against your policy before your agent acts on it, and builds a receipt. Everything is arithmetic and comparison on what your host already received: no model calls, no vendor keys, no network, no dependencies.

import curbi_decisions as D
policy = D.compile_decision_policy({"decisions": {"refund_eligible": {
    "allowed": ["eligible", "ineligible", "unclear"], "act_at": 0.92, "min_margin": 0.5,
    "pin": [{"provider": "fastino", "model": "fastino/GLiDE"}],
    "calibration": {"dataset": "refund-labels-2026-10", "accuracy_at_threshold": 0.97, "measured_at": "2026-10-30T00:00:00Z"},
    "operations": {"eligible": "billing.refund"}}}})
records = D.normalize_systemone(provider="fastino", request=request, response_bytes=raw_response_bytes, received_at=now_iso)
result = D.route(policy, "refund_eligible", records, now=now_ms)          # act | escalate | hand_off | deny
receipt = D.decision_receipt(policy=policy, question_id="refund_eligible", records=records, result=result)
D.check_action(policy, "refund_eligible", result, "billing.refund")       # [] or decision:contradicted / decision:not_acted
  • Same behavior as the JavaScript adapter. The tests replay 1,793 vectors generated by @curbi/decisions: records, routes, receipts, action findings, digests and error messages must match exactly. JavaScript semantics are kept where Python differs: key order, strict equality (True is not 1), number formatting, and booleans never counting as numbers.
  • Raw bytes are authoritative. Pass response_bytes (and request_bytes) and they are parsed strictly: valid UTF-8, no BOM, no duplicate member names, no lone surrogates. If you also pass the parsed object, it must match the bytes, or the input is malformed. Each record's bytes_bound says which digests cover raw bytes.
  • Limits. Vendor probabilities are reported, not true; set thresholds on labeled data. Receipts are unsigned (signed: false, provider_signed: false). Field names follow the vendor pages recorded in the adapter's FIELDS.md. Microsoft-Decision-1 isn't modeled.

Metadata

Release files for curbi-decisions 0.1.0

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

Source distribution (sdist)

Source distribution for curbi-decisions 0.1.0
File Size Uploaded Provenance Actions
curbi_decisions-0.1.0.tar.gz 15.3 kB With provenance Details for curbi_decisions-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for curbi-decisions 0.1.0
File Interpreter ABI Platform Actions
curbi_decisions-0.1.0-py3-none-any.whl Python 3 none any Details for curbi_decisions-0.1.0-py3-none-any.whl

Total release size: 27.9 kB

Release files / curbi_decisions-0.1.0.tar.gz

Download URL curbi_decisions-0.1.0.tar.gz
Size 15.3 kB
Tags Source
SHA-256 checksum
How to use checksums
1ab7bf0b92afe7d9c3465d54fe8d5645247be31f34dac54ba3eb8d5e36c51474
BLAKE2b-256 checksum
How to use checksums
9e836f54792010f3364e944a5829a91b5221299fdd9f71fd93d0ea29e9de6db4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Release files / curbi_decisions-0.1.0-py3-none-any.whl

Download URL curbi_decisions-0.1.0-py3-none-any.whl
Size 12.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1d6998632b852c735f2e766023f6fdd0976d04ae5c2a57a0c954f97305b80589
BLAKE2b-256 checksum
How to use checksums
f4070679dd00bd17fbcc2ff9de7fe03626460ecba4adc61ab8e65fec23ec9ede
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Security for curbi-decisions 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for curbi_decisions-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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