curbi-llamaindex
A real LlamaIndex BaseQueryEngine wrapper that checks a completed Response before returning the same response object, preserving source nodes and metadata. Findings raise CurbiBlocked with structured .findings; timeout, invalid verdict and transport failures raise CurbiUnavailable.
Install after the reviewed package is published: pip install curbi-llamaindex==0.1.0. For evaluation before publication, build and install its wheel.
Given your existing LlamaIndex query_engine and configured policy:
from curbi_llamaindex import CurbiQueryEngine
checked = CurbiQueryEngine(query_engine, policy={"prices": [{"item": "Pro", "amount": 49}]})
response = checked.query("What does Pro cost?") # same Response, or CurbiError
query_engine must be a real LlamaIndex BaseQueryEngine; the example reuses yours and does not provision a model. await checked.aquery(...) is also supported. Only completed text Response objects are supported; streaming, structured Pydantic and other response types fail closed rather than silently bypassing checks.
policy must be a JSON dictionary with a non-empty prices, forbid or actions rule collection; empty/no-rule configurations are rejected before networking. Optional api_key is sent only in the Authorization header; keep it in your secret store. timeout defaults to 10 seconds (accepted range 0.1–30), used as an absolute response-acceptance deadline, checked after headers, between body chunks and before accepting a result. HTTPX also applies per-phase timeouts. An already-blocked network read may finish later at its phase timeout; this is not a hard wall-clock cancellation guarantee. No automatic retries occur. Each check uses a fresh idempotency key. Managed API usage may be billable under your account's terms.
Data and limits: this is remote HTTP checking, not a local embedded checker. Your policy and completed answer are sent to the fixed https://api.curbi.io/v1/check. Source nodes and metadata are not added to the request. Redirects are refused; verdicts and exact UTF-16 finding spans are validated. Limits: 4,000 UTF-16 text units, 64 KiB request JSON, 256 KiB response. Async checking uses a worker thread; cancelling a task does not guarantee cancellation of already-sent network work.
This wrapper cannot stop tools or provider actions already executed by the underlying engine. A pass means no configured rule fired; it grants no authorization and proves no provider outcome or general truth. This adapter selects no LLM, prints no content or keys, and adds no telemetry. Separately configured LlamaIndex tracing may still record your application data.
MIT. Source and issue tracker: https://github.com/Curbi-Inc/curbi-check. Version 0.1.0 is prepared for publication; source preparation does not mean a registry release exists.
Validated framework version: llama-index-core 0.14.25; httpx 0.28.1, Python 3.11. Tests use real framework classes and mocked HTTP, with no paid model or API calls.
The response must explicitly report proof.authorizationGranted: false; missing or contradictory authority metadata is rejected. A passing check never grants execution authority.
If the completed Response text changes while the network check is pending, the wrapper rejects it as reply_changed; unchanged Responses retain their original identity and source nodes.
Metadata
Release files for curbi-llamaindex 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| curbi_llamaindex-0.1.0.tar.gz | 8.8 kB | With provenance | Details for curbi_llamaindex-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| curbi_llamaindex-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for curbi_llamaindex-0.1.0-py3-none-any.whl |
Total release size: 15.5 kB
Release files / curbi_llamaindex-0.1.0.tar.gz
| Download URL | curbi_llamaindex-0.1.0.tar.gz |
|---|---|
| Size | 8.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0d6883c38d2ce3798978bb2a77f4cd7fded365bae4178ca052b74aa04fef7fdf
|
|
BLAKE2b-256 checksum How to use checksums |
998a2e45d9b17ee5454bf56bb9c5194ec2cec7b688c1ca411fce3a75f96589b6
|
| 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 2, 2026.
Transparency logRelease files / curbi_llamaindex-0.1.0-py3-none-any.whl
| Download URL | curbi_llamaindex-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
369e6ff3a2f20ebe27a2e67dbb66325dc44122cb782c5ccda60a347482b51910
|
|
BLAKE2b-256 checksum How to use checksums |
bb699f7b8ec13cb461cd7752713c7e41266d5b3af03a3aff01790e3b4bf43f13
|
| 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 2, 2026.
Transparency logSecurity for curbi-llamaindex 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
All 2 files in this release have been uploaded with provenance metadata.
Attestation for curbi_llamaindex-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 2, 2026.
Transparency logA 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.