HDP (Human Delegation Provenance) — cryptographic authorization provenance for LlamaIndex agents
Project description
llama-index-callbacks-hdp
HDP (Human Delegation Provenance) integration for LlamaIndex — cryptographic authorization provenance for agents and RAG pipelines.
HDP answers the question that observability tools like Arize Phoenix and Langfuse cannot: who authorized this agent run, under what scope, and can you prove it offline?
Every tool call, retrieval step, and LLM invocation is recorded in a tamper-evident, cryptographically signed delegation chain. The chain is fully verifiable offline — no network calls, no central registry.
Installation
pip install llama-index-callbacks-hdp
Usage
Option 1 — Modern instrumentation dispatcher (LlamaIndex ≥0.10.20)
from llama_index.callbacks.hdp import HdpInstrumentationHandler, HdpPrincipal, ScopePolicy
HdpInstrumentationHandler.init(
signing_key=ed25519_private_key_bytes,
principal=HdpPrincipal(id="alice@corp.com", id_type="email"),
scope=ScopePolicy(
intent="Research pipeline",
authorized_tools=["web_search", "retriever"],
max_hops=10,
),
on_token_ready=lambda token: print(token["header"]["token_id"]),
)
Option 2 — Legacy CallbackManager
from llama_index.callbacks.hdp import HdpCallbackHandler, HdpPrincipal, ScopePolicy
from llama_index.core import Settings
from llama_index.core.callbacks import CallbackManager
handler = HdpCallbackHandler(
signing_key=ed25519_private_key_bytes,
principal=HdpPrincipal(id="alice@corp.com", id_type="email"),
scope=ScopePolicy(intent="Research pipeline"),
)
Settings.callback_manager = CallbackManager([handler])
Option 3 — Node postprocessor (inline retrieval enforcement)
from llama_index.callbacks.hdp import HdpNodePostprocessor
postprocessor = HdpNodePostprocessor(
signing_key=ed25519_private_key_bytes,
strict=False,
check_data_classification=True,
)
query_engine = index.as_query_engine(node_postprocessors=[postprocessor])
Verifying a token
from llama_index.callbacks.hdp import verify_chain
result = verify_chain(token_dict, public_key_bytes)
if result.valid:
print(f"Chain verified: {result.hop_count} hops")
What makes HDP different from Arize/Langfuse?
| Capability | Arize / Langfuse | HDP |
|---|---|---|
| Records what happened | ✓ | ✓ |
| Records who authorized it | ✗ | ✓ |
| Cryptographically signed | ✗ | ✓ |
| Verifiable offline | ✗ | ✓ |
| Scope enforcement | ✗ | ✓ |
| No central registry | n/a | ✓ |
License
Apache-2.0
Project details
Release history Release notifications | RSS feed
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 llama_index_callbacks_hdp-0.1.1.tar.gz.
File metadata
- Download URL: llama_index_callbacks_hdp-0.1.1.tar.gz
- Upload date:
- Size: 14.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17bb818189dada5f1f1cbaa1ae93f75b7b8d9b96867fa62b4199a9cdd426b128
|
|
| MD5 |
e6d59389bee380485e6345d6e6aa2876
|
|
| BLAKE2b-256 |
27b9af339c13cda62e98cb984ff22abd13d6e5b27cbe632d273a6b80d5b76a2e
|
Provenance
The following attestation bundles were made for llama_index_callbacks_hdp-0.1.1.tar.gz:
Publisher:
release.yml on Helixar-AI/HDP
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
llama_index_callbacks_hdp-0.1.1.tar.gz -
Subject digest:
17bb818189dada5f1f1cbaa1ae93f75b7b8d9b96867fa62b4199a9cdd426b128 - Sigstore transparency entry: 1393322659
- Sigstore integration time:
-
Permalink:
Helixar-AI/HDP@4da27f10834deaddc9ebc85af4962aa518d058eb -
Branch / Tag:
refs/tags/python/llama-index-callbacks-hdp/v0.1.1 - Owner: https://github.com/Helixar-AI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4da27f10834deaddc9ebc85af4962aa518d058eb -
Trigger Event:
push
-
Statement type:
File details
Details for the file llama_index_callbacks_hdp-0.1.1-py3-none-any.whl.
File metadata
- Download URL: llama_index_callbacks_hdp-0.1.1-py3-none-any.whl
- Upload date:
- Size: 15.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2b65adbf025284c1d508b700a6cc5cddaab31f91ef37fd0e02645749e71679a
|
|
| MD5 |
2f41c2f230875b1d25d507d1e92c25d6
|
|
| BLAKE2b-256 |
c97fb440cb6aa873c5358fa556e4bd1bf99ee2ff1d67bfbf3cc41dcbe23a012d
|
Provenance
The following attestation bundles were made for llama_index_callbacks_hdp-0.1.1-py3-none-any.whl:
Publisher:
release.yml on Helixar-AI/HDP
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
llama_index_callbacks_hdp-0.1.1-py3-none-any.whl -
Subject digest:
c2b65adbf025284c1d508b700a6cc5cddaab31f91ef37fd0e02645749e71679a - Sigstore transparency entry: 1393322687
- Sigstore integration time:
-
Permalink:
Helixar-AI/HDP@4da27f10834deaddc9ebc85af4962aa518d058eb -
Branch / Tag:
refs/tags/python/llama-index-callbacks-hdp/v0.1.1 - Owner: https://github.com/Helixar-AI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4da27f10834deaddc9ebc85af4962aa518d058eb -
Trigger Event:
push
-
Statement type: