langchain-trust-gate
LangChain 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 (defends against Ed25519-only downgrade); set TRUST_GATE_REQUIRE_PQ=false on your own deployment to allow Ed25519-only receipts.
Install
pip install cwn-langchain-trust-gate
Usage
from langchain_trust_gate import MintActionReceiptTool, VerifyReceiptTool
# wire into any LangChain agent
tools = [MintActionReceiptTool(), VerifyReceiptTool()]
# typical flow inside an agent:
# 1. the agent decides to do something consequential
# 2. it calls trust_gate_mint_action_receipt(agent_id, operation, target)
# 3. the receipt is stored, attached to the audit log, returned to the user
# 4. later anyone can call trust_gate_verify_receipt(receipt) to confirm tamper-free
Configuration
# point at a different deployment (Render / Smithery / self-hosted)
export TRUST_GATE_URL="https://trust-gate-mcp.onrender.com"
Tools
| Tool | Purpose |
|---|---|
trust_gate_mint_action_receipt |
Mint a post-quantum receipt for any consequential agent action. |
trust_gate_verify_receipt |
Verify a Trust Gate receipt from the certificate alone. Defaults to PQ-required. |
trust_gate_gate_decision |
Two-phase gate. PREVIEW assesses risk without acting; COMMIT verifies the inputs still match and mints a receipt carrying an execution permit. |
trust_gate_check_egress |
Classify data PUBLIC / INTERNAL / CONFIDENTIAL / RESTRICTED before it leaves. Blocks RESTRICTED. |
trust_gate_run_exit_drill |
Vendor exit-readiness drill. Informational, no side effects. |
Telemetry
Each tool invocation makes one fire-and-forget GET /x?via=langchain&kind=api against the Trust Gate server. No PII, no cookies, no fingerprinting -- just a channel tag so we can measure adoption per framework. Telemetry never blocks or fails the tool.
Background
- Trust Gate MCP -- the hosted server: https://trust-gate-mcp.onrender.com
- Smithery listing -- https://smithery.ai/servers/apps/cwn-trust-gate
- Official MCP Registry --
io.github.CWNApps/trust-gate-mcp - OAO -- the open-source receipt primitive: https://github.com/CWNApps/openagentontology
License
Apache-2.0.
Release files for cwn-langchain-trust-gate 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 | |
|---|---|---|---|
| cwn_langchain_trust_gate-0.2.0.tar.gz | 8.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cwn_langchain_trust_gate-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.0 kB
Release files / cwn_langchain_trust_gate-0.2.0.tar.gz
| Download URL | cwn_langchain_trust_gate-0.2.0.tar.gz |
|---|---|
| Size | 8.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1e87963b17514cbb0af84c1a8cc2880e52989025bdc448afe7643f606673b13a
|
|
BLAKE2b-256 checksum How to use checksums |
8fb0f4e9097d43511aa618da705cf6e2d67b55ab85c08d8a63fbcfff5b8af820
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 29, 2026.
Transparency logRelease files / cwn_langchain_trust_gate-0.2.0-py3-none-any.whl
| Download URL | cwn_langchain_trust_gate-0.2.0-py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3f161791de71ca218163af40c889a0671b1db75afdaa41ca9b413bdc1cc48f65
|
|
BLAKE2b-256 checksum How to use checksums |
5534c7bbbe6818451a3aa31c84055a594bcd87012a1b573e88cbed7884cf7ce6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 29, 2026.
Transparency log