langchain - 💡(How to fix) Fix docs: add xProof blockchain certification callback handler [3 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
langchain-ai/langchain#36133Fetched 2026-04-08 01:08:03
View on GitHub
Comments
3
Participants
2
Timeline
8
Reactions
0
Participants
Timeline (top)
labeled ×3commented ×2closed ×1issue_type_added ×1
RAW_BUFFERClick to expand / collapse

Checked other resources

  • This is a feature request, not a bug report or usage question.
  • I added a clear and descriptive title that summarizes the feature request.
  • I used the GitHub search to find a similar feature request and didn't find it.
  • I checked the LangChain documentation and API reference to see if this feature already exists.
  • This is not related to the langchain-community package.

Package (Required)

  • langchain
  • langchain-openai
  • langchain-anthropic
  • langchain-classic
  • langchain-core
  • langchain-model-profiles
  • langchain-tests
  • langchain-text-splitters
  • langchain-chroma
  • langchain-deepseek
  • langchain-exa
  • langchain-fireworks
  • langchain-groq
  • langchain-huggingface
  • langchain-mistralai
  • langchain-nomic
  • langchain-ollama
  • langchain-openrouter
  • langchain-perplexity
  • langchain-qdrant
  • langchain-xai
  • Other / not sure / general

Feature Description

I'd like to add documentation for XProofCallbackHandler, a LangChain callback that automatically certifies LLM inputs/outputs on the MultiversX blockchain.

  • Package: pip install xproof (published on PyPI)
  • Intercepts on_llm_start/end, on_tool_start/end
  • Hashes content locally — no PII sent
  • Free tier: 10 certs/day

Happy to submit a PR once this is approved. Draft doc is ready.

Use Case

AI agents operating in regulated industries (finance, healthcare, legal) need verifiable records of every LLM decision. Currently there is no built-in way to create tamper-proof audit trails of agent actions in LangChain.

XProofCallbackHandler solves this by anchoring a SHA-256 hash of every LLM input/output on the MultiversX blockchain — creating an immutable, publicly verifiable proof without sending any content externally.

Proposed Solution

from xproof.integrations.langchain import XProofCallbackHandler

handler = XProofCallbackHandler( api_key="pm_your_key", agent_name="my-agent", )

llm = ChatOpenAI(model="gpt-4", callbacks=[handler]) response = llm.invoke([HumanMessage(content="Summarize earnings report")])

Automatically certified on-chain

Alternatives Considered

Logging to centralized databases — but these are mutable and not independently verifiable. xProof uses blockchain anchoring so any third party can verify a proof without trusting the operator.

Additional Context

  • PyPI package: pip install xproof (published, v0.1.0)
  • Documentation draft ready to submit as PR
  • Free tier: 10 certifications/day, no credit card required
  • xproof.app

extent analysis

Fix Plan

To integrate XProofCallbackHandler into LangChain, follow these steps:

  • Install the xproof package using pip: pip install xproof
  • Import the XProofCallbackHandler class: from xproof.integrations.langchain import XProofCallbackHandler
  • Create an instance of XProofCallbackHandler with your API key and agent name:
handler = XProofCallbackHandler(
    api_key="YOUR_API_KEY",
    agent_name="YOUR_AGENT_NAME",
)
  • Pass the handler to the callbacks parameter when creating an LLM instance:
llm = ChatOpenAI(model="gpt-4", callbacks=[handler])
  • Use the LLM instance as usual, and the XProofCallbackHandler will automatically certify inputs and outputs on the MultiversX blockchain.

Verification

To verify that the fix worked, check the following:

  • The XProofCallbackHandler instance is created successfully with your API key and agent name.
  • The handler is passed to the callbacks parameter when creating the LLM instance.
  • The LLM instance is used to invoke a message, and the input and output are certified on the MultiversX blockchain.
  • You can verify the certification by checking the blockchain for the anchored hash.

Extra Tips

  • Make sure to replace YOUR_API_KEY and YOUR_AGENT_NAME with your actual API key and agent name.
  • The free tier of the xproof package has a limit of 10 certifications per day, so be mindful of this limit when testing and using the integration.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING