hi @rambozambo
out of the box, neither record declares what a hash covers, because neither one computes a hash of the content. A missing trace in LangSmith is also not recorded as anything. In many cases nothing was ever sent. So all three of your rules have to be added on top. Here is what the records actually contain and what I would add.
1. What the records say about their subject
LangGraph checkpoint: it stores the thread, a checkpoint id, the channel values, and a “version” for each channel. That version looks like a fingerprint, but it is not one. In the built-in checkpointers (memory, SQLite, Postgres) it is a counter plus a random number. It tells you the order of writes, not which bytes were written. The stored state is serialized with the checkpointer’s own encoder, which is not a canonical format. A hash taken over the stored row is therefore a hash of one encoding, not of the state itself.
LangSmith run: it stores ids, inputs, outputs, error, timing, status and metadata. There is no hash field. Also, the inputs and outputs you see are what the tracer chose to send, which is not always what the code received:
- They can be hidden or replaced on purpose (
hide_inputs / hide_outputs on the client, or per-request updates in tracing_context(replicas=...)).
- Runs and feedback can be edited or deleted after they are created.
- Traces are deleted after their retention period (by default 14 days for base traces and 400 days for extended ones).
So a LangSmith run is good for debugging, but it is not proof of what happened. If you need proof, compute the hash yourself where the real data is. For an agent built with create_agent, that place is a wrap_tool_call middleware. It sees the tool name, the arguments and the result. Hash the canonical bytes of the input and of the output, write down which canonicalization you used, and save that receipt in a store you control (append-only if possible). Put only a copy or a link to it in the LangSmith run metadata. That way the receipt says exactly what it covers, and the trace can be sampled, redacted or expired without breaking it.
2. What a missing trace means
When LangSmith can’t find a trace, you get the same “not found” for very different reasons:
- the trace was not sampled (
LANGSMITH_TRACING_SAMPLING_RATE below 1),
- tracing was turned off for that call,
- the process exited before the background queue was flushed,
- the trace is still being ingested,
- the trace expired,
- the trace was deleted.
None of these says anything about whether the work itself succeeded. So I would never record a missing trace as “failed”.
Two details in the Python SDK matter here:
- Sampling is done on the client, so unsampled runs are never sent at all. The decision is a fixed function of the
trace_id and the sampling rate, the same in the Python and JS SDKs. If you keep the trace_id and the rate in your own log, you can later show that a trace was never meant to be sent, instead of guessing. (The function, is_sampled_by_id, is internal to the SDK, so pin the SDK version if you rely on it.)
- If you call
create_feedback on a trace that was not sampled, the SDK returns a normal-looking Feedback object but sends nothing. If your pipeline treats that return value as proof that an evaluation was stored, you will have a receipt for an evaluation that does not exist.
To tell your five states apart, you need a record that exists whether or not tracing is on. The LangGraph checkpoint works well for this because it is written regardless of tracing and can carry your own run_id in its metadata. Then:
- no record of your own for that position: absent
- your own record exists, but it uses a canonicalization you can’t reproduce: rejected, unresolvable record
- your own record exists, but there is no trace or no evaluation yet: not checked (store the reason next to it: unsampled, disabled, pending, expired)
- an evaluation recomputed the hash and it matches: verified
- an evaluation recomputed the hash and it does not match: verification failed
One more distinction: a run whose error field is set is a correctly recorded failed run. That is not the same as a failed verification.
3. Repetition is not agreement
LangSmith feedback can store who evaluated (feedback_source_type, source_info, source_run_id), but none of this is required, and nothing stops the same evaluator from writing the same score twice. The feedback stats on a run count rows, so a duplicate looks like a second vote. Also, evaluate(..., num_repetitions=N) runs your target N times. That measures how much the model’s output varies, not whether different evaluators agree.
If you want agreement you can count, have each evaluator write its identity, its version, the contract version, and the hash it recomputed into source_info. Then count distinct evaluator and contract pairs that recomputed the hash from the stored receipt and got the same result. Re-exporting a trace, copying it into a dataset, or posting the same feedback again adds nothing to that count.
Direct answers
- Does the run record declare what its hashes cover? No. LangGraph versions are counters, LangSmith runs have no hash, and LangSmith inputs and outputs can be changed. You need to add your own receipt that names what it covers.
- When a trace is missing, what do we record? Never “failed”. If you have your own record for that run, it is “not checked”, plus the reason. If you don’t, it is “absent”.
In short, use LangSmith as the index you search, and keep the evidence in a store you control.