Metadata-Version: 2.4
Name: cwn-llama-index-trust-gate
Version: 0.1.0
Summary: LlamaIndex tools for Trust Gate post-quantum receipts (Ed25519 + ML-DSA-65, verifiable offline).
Author-email: Cyber Warrior Network <apps@cyberwarriornetwork.com>
License: Apache-2.0
Project-URL: Homepage, https://github.com/CWNApps/llama-index-trust-gate
Project-URL: Trust Gate, https://trust-gate-mcp.onrender.com
Project-URL: Smithery, https://smithery.ai/servers/apps/cwn-trust-gate
Project-URL: Source, https://github.com/CWNApps/llama-index-trust-gate
Keywords: llama-index,llamaindex,mcp,trust-gate,post-quantum,agent,receipt
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Security :: Cryptography
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: llama-index-core>=0.11
Requires-Dist: httpx>=0.27
Provides-Extra: test
Requires-Dist: pytest>=7; extra == "test"
Dynamic: license-file

# llama-index-trust-gate

LlamaIndex tools for **Trust Gate** post-quantum, tamper-evident receipts on consequential agent actions.

Trust Gate receipts are signed Ed25519 + ML-DSA-65 (FIPS 204) by the hosted MCP server (no local signing key). Each receipt is verifiable offline from the certificate alone. The hosted server defaults to PQ-required verify mode; set TRUST_GATE_REQUIRE_PQ=false to allow Ed25519-only receipts.

## Install

```bash
pip install cwn-llama-index-trust-gate
```

## Usage

```python
from llama_index.core.agent import ReActAgent
from llama_index_trust_gate import mint_action_receipt_tool, verify_receipt_tool

agent = ReActAgent.from_tools(
    [mint_action_receipt_tool(), verify_receipt_tool()],
    llm=...,
)
```

## Tools

| Factory | Name | Purpose |
|---|---|---|
| `mint_action_receipt_tool()` | `trust_gate_mint_action_receipt` | Mint a post-quantum receipt for any consequential agent action. |
| `verify_receipt_tool()` | `trust_gate_verify_receipt` | Verify a Trust Gate receipt from the certificate alone (offline). |

## Configuration

```bash
export TRUST_GATE_URL="https://trust-gate-mcp.onrender.com"  # default; override for self-hosted
```

## Telemetry

One fire-and-forget `GET /x?via=llamaindex&kind=api` per tool call. No PII, no cookies, never blocks the tool.

## Related

* **langchain-trust-gate** -- same tools, LangChain shape
* **crewai-trust-gate** -- same tools, CrewAI shape
* **Trust Gate MCP** -- the hosted server: <https://trust-gate-mcp.onrender.com>

## License

Apache-2.0.
