Skip to main content

traceseal-langchain

Signed execution receipts for every LangChain model and tool call. Drop in one callback. Hand the receipts to your auditor.

What it does

Add a single callback handler to your LangChain chain, agent, or runnable. Every LLM invocation and every tool call produces a signed Traceseal Execution Receipt — cryptographic proof of what your agent ran, verifiable by any third party.

  • No rewrite. Works with existing LangChain code via the standard callback API.
  • No vendor lock-in. Receipts verify with pip install traceseal-verify on any machine, no access to your infrastructure.
  • Privacy-preserving. Hashes of inputs/outputs, not the values themselves. Safe to share with auditors.
  • Workflow chaining. Optional: roll every child call into a single signed orchestration receipt.

Install

pip install traceseal-langchain

Quick start

from langchain_openai import ChatOpenAI
from langchain_core.tools import tool
from traceseal_observe import OperatorKey
from traceseal_langchain import TracesealCallbackHandler

key = OperatorKey.load_from_file("~/.traceseal/keys/my-operator.key")
handler = TracesealCallbackHandler(
    operator_key=key,
    workflow_name="research-assistant",
    workflow_version="1.0",
)

@tool
def search(query: str) -> str:
    """Search the web."""
    return f"results for {query}"

llm = ChatOpenAI(model="gpt-4o-mini").bind_tools([search])
result = llm.invoke("research AI safety", config={"callbacks": [handler]})

# One receipt per LLM call and per tool call:
for r in handler.receipts:
    print(r.execution["receipt_type"], r.receipt_hash)

# A single signed orchestration over all of them:
workflow = handler.workflow_receipt()
open("run.json", "w").write(workflow.to_json())

Verify it on any machine:

pip install traceseal-verify
traceseal-verify run.json

What the receipts record

Call type Captured in the receipt
LLM provider, model, input hash, output hash, input/output tokens, wall time, ok/error
Tool tool name, python transport, input hash, output hash, wall time, ok/error
Workflow ordered list of step names + child receipt hashes, start/end times, aggregate ok

Every receipt is a JSON file signed with the operator's ed25519 key and conforms to RECEIPT-SPEC.md v1.0.

Works with

  • langchain-core >= 0.3
  • LangChain, LangGraph, LangChain Community — any runnable that accepts a callbacks= config.
  • LangGraph agents — the handler captures each node's LLM/tool calls and emits a workflow receipt over the whole graph.

What receipts prove, and what they don't

The operator attests:

"I observed these N LLM calls and M tool calls, in this order, with these input and output hashes."

A third party can verify the signature, confirm the chain hasn't been tampered with, and confirm the operator's key signed it. They cannot confirm (from the receipt alone) that the provider actually returned what was recorded, or that the tool functions behaved honestly. The receipt is an operator attestation, not a zero-knowledge proof — same trust model as any audit log, but cryptographically portable.

See RECEIPT-SPEC.md §6 for the full trust analysis.

Why this matters

Compliance officers, auditors, and regulators are starting to ask: "can you prove what your AI agent actually did?" Today most answers are "trust our logs." Traceseal receipts are the cryptographic primitive that makes the question answerable in portable, verifiable form — third parties don't need access to your machines or your LangSmith account.

License

Apache 2.0.

Metadata

Release files for traceseal-langchain 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for traceseal-langchain 0.1.0
File Size Uploaded Provenance Actions
traceseal_langchain-0.1.0.tar.gz 8.1 kB Without provenance Details for traceseal_langchain-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for traceseal-langchain 0.1.0
File Interpreter ABI Platform Actions
traceseal_langchain-0.1.0-py3-none-any.whl Python 3 none any Details for traceseal_langchain-0.1.0-py3-none-any.whl

Total release size: 15.2 kB

Release files / traceseal_langchain-0.1.0.tar.gz

Download URL traceseal_langchain-0.1.0.tar.gz
Size 8.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f57377c9967fb300f141719311bda78d2fdcdbea6066e7924a9bf9a907c29db4
BLAKE2b-256 checksum
How to use checksums
ef3ae69fff7abdcf1edf0a09d99a8d8e44c369ad308dfe800544fe774213c138
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / traceseal_langchain-0.1.0-py3-none-any.whl

Download URL traceseal_langchain-0.1.0-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
90f7c1183ae0b3702fac1f29a89f91f1e5c9909e55478e8820d11262d30f2633
BLAKE2b-256 checksum
How to use checksums
0fa8a1754854f000be39914861088672cfcdf65ca61e1f04d46cf030c8b1dd42
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Security for traceseal-langchain 0.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page