Metadata-Version: 2.4
Name: llamaindex-openttt
Version: 0.1.0
Summary: TTTPS Proof-of-Time callback handler for LlamaIndex: cryptographic audit-trail timestamps for LLM events via the public KPP Provenance API
License: MIT
Project-URL: Homepage, https://github.com/Helm-Protocol/OpenTTT
Project-URL: Repository, https://github.com/Helm-Protocol/OpenTTT
Project-URL: Issues, https://github.com/Helm-Protocol/OpenTTT/issues
Keywords: llamaindex,proof-of-time,provenance,temporal-attestation,audit-trail,llm-observability
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.24
Requires-Dist: llama-index-core>=0.10

# llamaindex-openttt

TTTPS Proof-of-Time callback handler for [LlamaIndex](https://github.com/run-llama/llama_index).
Attaches a cryptographic audit-trail timestamp (a signed Proof-of-Time receipt)
to `ChatResponse.additional_kwargs` / `CompletionResponse.additional_kwargs` on
every LLM event, sealed against the public self-serve
[KPP Provenance API](https://kpp.kenosian.com).

This attaches a cryptographic audit-trail timestamp and integrity hash. It does
**not** certify legal or regulatory compliance (EU AI Act, FDA, and so on).
Treat it as an audit-trail timestamp, not a compliance claim.

## Install

```bash
pip install llamaindex-openttt
```

## Usage

```python
from llama_index.core.callbacks import CallbackManager
from llamaindex_openttt import TTTPSTimestampCallbackHandlerKPPLive

Settings.callback_manager = CallbackManager([TTTPSTimestampCallbackHandlerKPPLive()])

resp = llm.complete("hi")
print(resp.additional_kwargs["tttps_receipt"])
# {"status": "ok", "receipt_id": "...", "receipt": "...", "time": "...", ...}
```

Set `KPP_API_KEY` (mint one for free via `POST https://kpp.kenosian.com/v1/keys`)
and optionally `KPP_BASE` / `KPP_TIMEOUT_S` as environment variables.

Fail-open: any network/upstream error degrades the receipt to
`{"status": "degraded", ...}`. It never raises out of `on_event_end`, and the
generated text itself is never touched.

## License

MIT
