Skip to main content

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

License

Apache-2.0.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cwn_langchain_trust_gate-0.2.0.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cwn_langchain_trust_gate-0.2.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file cwn_langchain_trust_gate-0.2.0.tar.gz.

File metadata

  • Download URL: cwn_langchain_trust_gate-0.2.0.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for cwn_langchain_trust_gate-0.2.0.tar.gz
Algorithm Hash digest
SHA256 1e87963b17514cbb0af84c1a8cc2880e52989025bdc448afe7643f606673b13a
MD5 8c1555267e20c964353ac8fd3c601950
BLAKE2b-256 8fb0f4e9097d43511aa618da705cf6e2d67b55ab85c08d8a63fbcfff5b8af820

See more details on using hashes here.

Provenance

The following attestation bundles were made for cwn_langchain_trust_gate-0.2.0.tar.gz:

Publisher: release.yml on CWNApps/langchain-trust-gate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cwn_langchain_trust_gate-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for cwn_langchain_trust_gate-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3f161791de71ca218163af40c889a0671b1db75afdaa41ca9b413bdc1cc48f65
MD5 5f07f6e4d4161dc911da7b8f5b9ef336
BLAKE2b-256 5534c7bbbe6818451a3aa31c84055a594bcd87012a1b573e88cbed7884cf7ce6

See more details on using hashes here.

Provenance

The following attestation bundles were made for cwn_langchain_trust_gate-0.2.0-py3-none-any.whl:

Publisher: release.yml on CWNApps/langchain-trust-gate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page