langchain - ✅(Solved) Fix Proposal: Exporting verifiable runtime evidence bundles for agent runs [1 pull requests, 9 comments, 3 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#35973Fetched 2026-04-08 00:47:47
View on GitHub
Comments
9
Participants
3
Timeline
10
Reactions
0
Author
Timeline (top)
commented ×8cross-referenced ×1labeled ×1

Fix Action

Fixed

PR fix notes

PR #35974: docs(langchain): add runtime evidence export example

Description (problem / solution / changelog)

Resolves #35973

This PR adds a minimal example demonstrating how LangChain agent runs can be exported as verifiable evidence bundles using AEP (Agent Evidence Profile).

The goal is not to modify LangChain internals but to show how callback hooks can produce runtime evidence artifacts.

Repo: https://github.com/joy7758/agent-evidence

Artifact: https://doi.org/10.5281/zenodo.19055948

Changed files

  • examples/runtime_evidence_export.py (added, +22/-0)
RAW_BUFFERClick to expand / collapse

Hi LangChain team,

We recently implemented an experimental runtime evidence layer called AEP (Agent Evidence Profile).

The goal is to package autonomous agent runs into integrity-verifiable evidence bundles rather than plain logs.

Pipeline:

real runtime execution → evidence bundle export → offline verification → deterministic tamper detection

Repository: https://github.com/joy7758/agent-evidence

Artifact DOI: https://doi.org/10.5281/zenodo.19055948

A LangChain integration already exists via callback hooks.

Question:

Would it make sense for agent frameworks to expose a standardized runtime evidence export hook, similar to tracing callbacks but producing verifiable evidence artifacts?

Curious whether the LangChain team sees value in bridging observability traces with verifiable runtime evidence objects.

extent analysis

Fix Plan

To address the question of exposing a standardized runtime evidence export hook, we can implement a callback hook in the agent framework.

Steps to Implement

  • Define an interface for the evidence export hook:
from typing import Callable

EvidenceExportHook = Callable[[dict], None]
  • Modify the agent framework to accept and call the evidence export hook:
class Agent:
    def __init__(self, evidence_export_hook: EvidenceExportHook = None):
        self.evidence_export_hook = evidence_export_hook

    def run(self):
        # runtime execution
        evidence = {'execution_id': 1, 'output': 'result'}
        if self.evidence_export_hook:
            self.evidence_export_hook(evidence)
  • Implement the evidence export hook to produce verifiable evidence artifacts:
import hashlib

def export_evidence(evidence: dict):
    # create a verifiable evidence artifact
    artifact = {'evidence': evidence, 'hash': hashlib.sha256(str(evidence).encode()).hexdigest()}
    # export the artifact
    print(artifact)

# usage
agent = Agent(evidence_export_hook=export_evidence)
agent.run()

Verification

To verify that the fix worked, check that the evidence export hook is called correctly and produces the expected verifiable evidence artifacts.

Extra Tips

  • Consider using a standardized format for the evidence artifacts, such as JSON or Protocol Buffers.
  • Implement additional security measures, such as digital signatures or encryption, to ensure the integrity and authenticity of the evidence artifacts.

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