Provenance: trace where a value or decision came from
Record beliefs with their evidence, revise them, and walk the revision history of any belief.
Link a decision to the episodes, beliefs, and documents it used, and record who changed each property.
The sources of one decision (fictional example). Two episodes support belief-99, and belief-99 supports a decision. Each edge is a DERIVED_FROM relationship written by the application, pointing from the derived node to its source. Hover a node to see when it was recorded.
Each arrow is an edge written by the application: db.recordBelief links a belief to its evidence with DERIVED_FROM edges, and db.linkDerivedFrom links any node to its sources. db.derivedFrom(“decision-2026-03-05”) follows these edges from the decision and returns each source with its depth. Its argument is the node’s string id or id(n); it does not look a node up by its id property, and an id it does not find returns no rows.
Walk a belief’s revisions
db.beliefLineage takes a belief ID and walks its revision chain. It returns one row per revision with its claim, confidence, when it was created, and when a later revision superseded it. Pass a second argument hops (1–3) to include the evidence reached over DERIVED_FROM edges, up to 50 entries per row.
Columns
beliefId identifies the revision.
claim is what it asserted.
confidence is the confidence recorded with it.
createdAt is when the belief was recorded.
supersededAt is when a later revision replaced it (null for the current revision).
depth is how far back in the revision chain the row is from the belief you passed.
evidence lists the evidence reached over DERIVED_FROM edges; it is empty unless you pass hops.
Earlier revisions and their evidence
Record who made a change
Add a provenance object to a Cypher write request to attach attribution to each property value the statement writes. The server also records which credential made the request.
Fields
All fields are optional.
actor(string) — who made the change, as your application identifies them.source(string) — the system the change came from.reason(string) — why the change was made.requestId(string) — your correlation ID. It is stored as given and is not used to deduplicate requests.confidence(number from 0.0 to 1.0).
Example
Fictional data. $GRAPH is your graph name and $KEY is your API key.
Headers
The same fields can be sent as headers: X-Provenance-Actor, X-Provenance-Source, X-Provenance-Reason, X-Provenance-Request-Id, and X-Provenance-Confidence. If a field is in both the body and a header, the body value is used. Header values must be ASCII. Browser applications that call from another origin must use the body field.
Behavior
- Provenance is recorded only when the request includes the
provenanceobject or at least oneX-Provenance-*header. An empty object ({}) records onlyprincipal. - The server adds
principal, the identity of the credential that made the request (for exampleapikey:<key id>). Clients cannot set it. - A confidence that is not numeric (a number or a numeric string), or is outside 0.0–1.0, returns HTTP 400 with subcode
INVALID_PROVENANCE_CONFIDENCE, and nothing is written. - Accepted on
POST /graphs/{name}/cypher,POST /cypher, and the MCPcypher_querytool (argumentprovenance). Bulk import, document ingest, and raw command endpoints do not accept it.
Read it back
- One row per value the property has held, oldest first.
validFrom,validTo, andtxnAtare nanoseconds since the Unix epoch.validTois null for the current value.- The provenance columns are null for values written without provenance.
db.propertyProvenancereads node properties. The first argument can be the integer node id, the node’s string id, the value of the node’sidproperty, or aLabel:valuereference to itsidproperty.- The MCP
property_provenancetool returns the same columns exceptprincipal.
Property provenance
Three records connect a value to where it came from: DERIVED_FROM edges written by the application, the provenance fields sent with each write, and the hash-chained history log.
Derivations are stored as edges.
db.recordBelief writes DERIVED_FROM edges from a belief to each piece of evidence, and db.linkDerivedFrom writes them from any node to its sources. db.reviseBelief links a revision to the belief it replaces with a REVISES edge.
A write can record who made it.
Send a provenance object or X-Provenance-* headers with a Cypher write. db.propertyProvenance returns the actor, source, reason, request ID, confidence, and credential for each version of a property. See Record who made a change.
Write history is hash-chained.
Each record in the graph’s history log stores the hash of the previous record, so changing any past record breaks verification from that point on. Check the chain with GET /graphs/{name}/audit/verify, which reports the first record where verification failed. The log is not signed or anchored outside the server, so the check does not detect a rewrite of the whole log, or removal of the most recent records, by someone with write access to the server.
Tracing an approval to its inputs
March 5. Susan approved a $4.2M commercial property policy. Six months later a regulator asks why. The steps below show the data the application recorded along the way.
Fictional example. Each step shows data the application recorded with db.recordEpisode, db.recordBelief, and db.linkDerivedFrom.
SPRINKLER-CREDIT-12pct matched. 12% off the filed rate.AT RECORDED.Decision node to each belief, rule, document, and episode with db.linkDerivedFrom.Each step reads data the application recorded. Steps 1 and 5 show the Cypher queries for two of them.
Verify the history chain
GET /graphs/{name}/audit/verify re-hashes the graph’s history log and returns {"status":"clean","records":N,"last_seq":N} or {"status":"broken","offset":…,"record_index":…,"reason":"…"}. CALL db.verifyAclChain() YIELD status, entries, brokenAtEventId, reason checks the separate log of field-access-control events; its status is clean or broken.
status is broken, brokenAtEventId is the first event whose hash does not reproduce, and reason describes the failure.
Approval walkthrough
An interactive version of the fictional underwriting approval above: the documents viewed, the rules applied, and the decision.