Control and proof
Tamper-evident ledger (hash chain)
A tamper-evident ledger is an append-only record in which each entry stores a cryptographic hash of its own contents together with the previous entry's hash, so any later edit, deletion or reordering breaks every hash after it and becomes detectable.
What it is
A hash chain links records in order. Entry n stores hash_n = sha256(hash_(n-1) + contents_n). Change one byte in an old entry and its hash no longer matches; every later hash, which depends on it, stops matching too. That property is called tamper-evident: it does not stop anyone editing the data, but it makes an edit visible to anyone who checks.
Why it matters
An agent audit log is only useful as evidence if nobody can quietly rewrite it, including the operator who runs it. A plain database table can be edited without trace. A hash chain lets an auditor recompute the hashes and confirm the record is the one that was written.
How it works
- Fix the exact list of fields that are hashed, in order. Adding a field later changes every hash, so the list must be explicit.
- Start from a known genesis value, such as 32 zero bytes.
- Hash each new entry together with the previous hash.
- Anchor the chain: periodically write the latest hash (the head) somewhere the ledger's operator cannot silently rewrite, so the whole chain cannot be recomputed after an edit.
- Verify by recomputing from any anchored point.
Certificate Transparency (RFC 6962) uses Merkle trees for the same goal on public logs: if a log shows different histories to different people, comparing tree heads exposes it.
Example
Rows 1 to 1,000 are chained and yesterday's head was sealed. Someone edits row 400 to hide a refund. Recomputing gives a different hash at row 400 and at every row after it, and today's head no longer matches the chain that leads to yesterday's seal.
Common pitfalls
- Overclaiming. A hash chain cannot prevent tampering; it makes tampering detectable. Call it tamper-evident.
- No anchor. If the operator holds the only copy of the head, they can rewrite the chain end to end. External witnesses or published seals close that gap.
- Hashing fields that change (status updated later, timestamps rewritten) produces false alarms.
- Undocumented gaps. Auditors stop trusting a chain whose gaps they discover themselves.
How actionlake handles it
The actionlake ledger has one row per run. Each row's hash is sha256(prev_hash + row) over a fixed field list, per tenant. To keep the request path fast, a single chainer hashes new rows about once a second; that window, in which a new row exists unchained, is documented rather than hidden. Once a day the chain head is sealed to object storage. Any run can be verified on its page in the console. What is not yet true: there is no external witness, and no export of the whole chain; the console's CSV carries the table, not the hashes. The full statement is on the trust page.
Questions
Is a hash-chained log the same as a blockchain?
It uses the same linking idea, but it needs no consensus, mining or tokens. One operator writes it; anchoring the head somewhere else is what lets outsiders check it.
Can a hash chain prove a log was not altered?
It proves the records match the hashes up to an anchored head. If the operator controls every copy of the head, they could rewrite the whole chain, which is why external seals or witnesses matter.
Does a hash chain stop anyone editing the log?
No. It makes an edit detectable to anyone who recomputes the hashes against an anchored head. That property is called tamper-evident.
Related terms
- AI agent audit logAn AI agent audit log is a record of every action an agent took: which credential ran it, what it did, in which system, with what outcome and cost, and why, kept so a person can reconstruct and verify events later.
- Human-in-the-loop approvalHuman-in-the-loop approval is a control that pauses an AI agent's action until a named person approves or rejects it, so high-impact or irreversible actions never run on the model's judgement alone.
- AI agent permissionsAI agent permissions are the rules that decide which systems, actions and data an agent's credential may reach, and least privilege for agents means granting only the actions a task needs and enforcing that limit outside the model.
- Action lakeAn action lake is a governed layer between AI agents and business systems where every action an agent may take is defined, every action it takes is authorised and priced, and every action it took is recorded, independent of the model, framework or vendor.
Sources
Connect an agent. Start free.
100,000 calls free every month. No card. Hard caps on every key.