Truthlocks MAIP integration for LangChain — auto-generate cryptographic receipts for every chain and agent action
Project description
truthlocks-langchain
Cryptographic receipt generation for every LangChain chain, agent, and tool invocation. Part of the Truthlocks MAIP (Machine-Attested Identity Protocol) ecosystem.
Installation
pip install truthlocks-langchain
Quick Start
from truthlocks_langchain import MAIPCallbackHandler
# Create the receipt handler
handler = MAIPCallbackHandler()
# Attach to any LangChain chain
chain.invoke(input, config={"callbacks": [handler]})
# Every LLM call, tool use, and chain step now produces
# a cryptographic receipt anchored to a tamper-proof log
API
| Class | Description |
|---|---|
MAIPCallbackHandler |
LangChain callback that auto-generates MAIP receipts for every event in a chain run |
MAIPRunnableWrapper |
Wraps any LangChain Runnable to emit receipts on .invoke() / .stream() / .batch() |
MAIPTracer |
Full tracing integration that produces a receipt tree matching the LangChain call graph |
What You Get
- Tamper-proof audit trail for every LLM call, retrieval, and tool invocation
- Cryptographic receipts anchored to a transparency log with sub-40 ms latency
- Zero-config drop-in integration -- add the callback and receipts flow automatically
- Compliance-ready evidence packages for SOC 2 Type II, ISO 27001, and EU AI Act
How It Works
truthlocks-langchain is a thin wrapper around maip-ai-connectors, the core Truthlocks MAIP SDK for Python. It re-exports the LangChain-specific classes so you can install only what you need.
Requirements
- Python >= 3.9
- A Truthlocks API key (get one free)
Documentation
Full guides, API reference, and examples: docs.truthlocks.com/sdk/langchain
License
Apache 2.0 -- see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file truthlocks_langchain-1.0.1.tar.gz.
File metadata
- Download URL: truthlocks_langchain-1.0.1.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1c5f4098b9922471c427998d0b9291587bdb78a55776c32beabb2e3dc6a265e
|
|
| MD5 |
e0920ca676a41655f73663ce1c481293
|
|
| BLAKE2b-256 |
6f25b1134a87b7f3cbc6f027511b8422e28465210682c70dd151e4681dadca17
|
File details
Details for the file truthlocks_langchain-1.0.1-py3-none-any.whl.
File metadata
- Download URL: truthlocks_langchain-1.0.1-py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5d78b09551a6c1a3936e47791cdaae6dbab30979ea0b639334ddcc750a194e7
|
|
| MD5 |
08dae2a0ad4fe7e0fe4be5429f58faa7
|
|
| BLAKE2b-256 |
b8dd28a6d7446e89de3531cff554d90b27fef4541b5e8b1204349e077bde79ee
|