occ-llamaindex
OCC cryptographic proof signing for LlamaIndex.
Every tool call produces an Ed25519-signed proof entry in proof.jsonl, creating a tamper-evident audit log of agent actions.
Install
pip install occ-llamaindex
Quick Start
Callback Handler (recommended)
from llama_index.core.callbacks import CallbackManager
from occ_llamaindex import OccCallbackHandler
handler = OccCallbackHandler()
callback_manager = CallbackManager([handler])
# Pass callback_manager to your agent or query engine
Wrap Individual Tools
from llama_index.core.tools import FunctionTool
from occ_llamaindex import OccTool
def search(query: str) -> str:
return f"Results for {query}"
tool = FunctionTool.from_defaults(fn=search)
safe_tool = OccTool(inner=tool)
Wrap All Tools
from occ_llamaindex import wrap_tools
safe_tools = wrap_tools([search_tool, calc_tool])
agent = ReActAgent.from_tools(safe_tools)
Custom Signer
from occ_llamaindex import OCCSigner, OccCallbackHandler
signer = OCCSigner(state_dir="/tmp/.occ", proof_file="audit.jsonl")
handler = OccCallbackHandler(signer=signer)
Proof Format
Each line in proof.jsonl is a JSON object:
{
"version": "occ/proof/1",
"timestamp": "2026-03-20T12:00:00.000Z",
"signer": "<base64url-ed25519-public-key>",
"payload": {
"type": "tool-call",
"tool": "search",
"inputHash": "<sha256-hex>",
"outputHash": "<sha256-hex>"
},
"signature": "<base64url-ed25519-signature>",
"prev": "<sha256-hex-of-previous-proof>"
}
Proofs are chained: each proof's prev field contains the SHA-256 hash of the previous proof's canonical JSON.
Configuration
- State directory: Keypair stored in
.occ/signer-state.json(defaults to CWD) - Proof file: Defaults to
proof.jsonlin CWD - Both configurable via
OCCSigner(state_dir=..., proof_file=...)
License
Apache-2.0
Metadata
Release files for occ-llamaindex 0.2.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 |
|---|---|---|---|---|
| occ_llamaindex-0.2.0.tar.gz | 5.9 kB | Without provenance | Details for occ_llamaindex-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| occ_llamaindex-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for occ_llamaindex-0.2.0-py3-none-any.whl |
Total release size: 12.8 kB
Release files / occ_llamaindex-0.2.0.tar.gz
| Download URL | occ_llamaindex-0.2.0.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aee5190a45b4a87dfff9421da8becfa65147296c80c4007e9275fb0aafb34190
|
|
BLAKE2b-256 checksum How to use checksums |
8c0248a3585ac5accb4ce396b052257580e73ce241a6286fc05b2ae6e3e9bd47
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / occ_llamaindex-0.2.0-py3-none-any.whl
| Download URL | occ_llamaindex-0.2.0-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2fec268b155900684341ce27b46e33030f092658289f31ff8c5277b562bbc071
|
|
BLAKE2b-256 checksum How to use checksums |
33a9c42c7ce1be56e7877c27fa85b216ec88babc3b327d42b86c12ada6db0756
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Security for occ-llamaindex 0.2.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.