scopeblind-llamaindex
Ed25519 signed receipts for LlamaIndex agent tool calls. Every FUNCTION_CALL event produces a tamper-evident, hash-chained receipt verifiable offline.
Install
pip install scopeblind-llamaindex
Quick start
from llama_index.core.callbacks import CallbackManager
from scopeblind_llamaindex import ScopeBlindHandler, ReceiptSigner
signer = ReceiptSigner.generate()
handler = ScopeBlindHandler(signer=signer, agent_name="research-agent")
callback_manager = CallbackManager([handler])
# Attach to any LlamaIndex component
query_engine = index.as_query_engine(callback_manager=callback_manager)
# or
agent = OpenAIAgent.from_tools(tools, callback_manager=callback_manager)
# After execution
print(f"{handler.receipt_count} tool calls signed")
handler.export_receipts("receipts.jsonl")
Verify:
npx @veritasacta/verify receipts.jsonl --key $(python3 -c "from scopeblind_llamaindex import ReceiptSigner; s=ReceiptSigner.generate(); print(s.public_key_hex)")
How it works
The handler listens for CBEventType.FUNCTION_CALL events via LlamaIndex's CallbackManager. On each tool call:
on_event_start: captures tool name + args, evaluates policyon_event_end: signs the decision (allow/deny) with Ed25519, chains to previous receipt- Receipt is appended to the chain with
tool_input_hashandoutput_hash
Compatible with all LlamaIndex callback integrations (Langfuse, Arize, W&B, etc.) since handlers compose in the CallbackManager.
With a policy
def no_web_scraping(tool_name, args):
if tool_name == "web_scraper" and "competitor" in str(args):
return (False, "scraping competitor sites not permitted")
return (True, None)
handler = ScopeBlindHandler(signer=signer, policy=no_web_scraping)
Standards
- Ed25519 (RFC 8032), JCS (RFC 8785), IETF draft-farley-acta-signed-receipts
License
MIT
Release files for scopeblind-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 | |
|---|---|---|---|
| scopeblind_llamaindex-0.1.0.tar.gz | 7.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| scopeblind_llamaindex-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.5 kB
Release files / scopeblind_llamaindex-0.1.0.tar.gz
| Download URL | scopeblind_llamaindex-0.1.0.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
da19143987bab606e207e779cdb304ef8009e149c19f2127111828cc5e7ec88e
|
|
BLAKE2b-256 checksum How to use checksums |
a975e8f23254263a3b4169aa8409b96ed45faae645633b7ac6d68e302107cb98
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.6
|
Release files / scopeblind_llamaindex-0.1.0-py3-none-any.whl
| Download URL | scopeblind_llamaindex-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d1ba62283a83df061a34ea0290676a0426559766e001c78cdf9cff1c620c80af
|
|
BLAKE2b-256 checksum How to use checksums |
d08032221ecce80638b636fe159f5a19efce57c46709c344cadb4619dc2ce788
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.6
|