Agent Audit Ledger - Tamper-Evident Action Log avatar

Agent Audit Ledger - Tamper-Evident Action Log

Pricing

Pay per event

Go to Apify Store
Agent Audit Ledger - Tamper-Evident Action Log

Agent Audit Ledger - Tamper-Evident Action Log

A tamper-evident record of everything your agent does. Hash-chains each decision, tool call, and cost into a verifiable ledger and pinpoints the exact entry if anything is altered - accountability and forensics for autonomous agents.

Pricing

Pay per event

Rating

0.0

(0)

Developer

Creator Fusion

Creator Fusion

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

4 days ago

Last modified

Share

Agent Audit Ledger

Creator Fusion Labs — Agent Protection Suite

Give your AI agent a tamper-evident, hash-chained record of everything it did — a forensic trail you (or an auditor) can verify later. Feed it a list of actions and it returns a sha256 chain where every link depends on the one before it, so a single altered, reordered, or inserted event breaks the chain and is pinpointed exactly.

Built for agents: call it over MCP, curl, JS, or Python. Deterministic by design — the same events always produce the same hashes (no wall-clock is ever mixed into a hash), so any party can reproduce and check the ledger.


What it does

  • append mode — canonicalizes each event (stable key order), sha256-hashes it (eventHash), and hash-chains it: chainHash[i] = sha256(chainHash[i-1] + eventHash[i]), seeded by your prevHash or a built-in genesis constant. Emits one row per event plus a summary (headHash, eventCount, totalCost, verifiable).
  • verify mode — takes events that already carry their eventHash/chainHash, recomputes everything, and reports the first broken link (breakIndex) — catching tampered values, reordering, and insertions.

Chain runs together: pass one run's headHash as the next run's prevHash to build a single unbroken ledger across many runs.


Input

FieldTypeRequiredDescription
eventsarrayyesAction objects. Each needs a string action; optional ts, actor, detail, cost (number). In verify mode, include the eventHash/chainHash each event was emitted with.
modestringnoappend (default) or verify.
prevHashstringnoHead hash of a prior chain to continue from. Omit to seed from genesis.

An event with no ts keeps ts: null — the ledger never injects the current time, so the chain stays reproducible.

{
"events": [
{ "ts": "2026-08-19T10:00:00Z", "actor": "agent-a", "action": "search", "detail": "query=competitors", "cost": 0.01 },
{ "ts": "2026-08-19T10:00:01Z", "actor": "agent-a", "action": "fetch", "detail": "url=example.com", "cost": 0.02 },
{ "actor": "agent-a", "action": "summarize", "detail": "3 sources", "cost": 0.03 }
],
"mode": "append"
}

Output

Per-event rows:

{ "rowType": "event", "seq": 0, "ts": "2026-08-19T10:00:00Z", "actor": "agent-a",
"action": "search", "detail": "query=competitors", "cost": 0.01,
"eventHash": "…", "chainHash": "…" }

One summary row:

{ "rowType": "summary", "headHash": "…", "eventCount": 3, "totalCost": 0.06,
"verifiable": true, "breakIndex": null }

In verify mode each event row also carries storedEventHash, storedChainHash, and ok; the summary sets verifiable: false and breakIndex to the first failing index when the chain is broken.


Verifying a chain (tamper detection)

Take the rows from an append run, change any one field, and re-run in verify mode. The summary comes back verifiable: false with breakIndex at the altered event.

{ "mode": "verify", "prevHash": "<the append run's prevHash>",
"events": [ /* the emitted event rows, one of them tampered */ ] }

Integration

MCP — expose this actor to your agent via the Apify MCP server and call it by name (apricot_blackberry/agent-audit-ledger) with the input above.

curl

curl -X POST "https://api.apify.com/v2/acts/apricot_blackberry~agent-audit-ledger/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"events":[{"actor":"agent-a","action":"search","cost":0.01}],"mode":"append"}'

JavaScript

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('apricot_blackberry/agent-audit-ledger').call({
events: [{ actor: 'agent-a', action: 'search', cost: 0.01 }],
mode: 'append',
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Python

from apify_client import ApifyClient
client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("apricot_blackberry/agent-audit-ledger").call(run_input={
"events": [{"actor": "agent-a", "action": "search", "cost": 0.01}],
"mode": "append",
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item)

Pricing

Pay-per-event: a small actor-start fee plus one ledger charge per successful run. Failed runs (bad input) are not charged.

Notes

  • Crypto is standard node:crypto sha256 over a canonical (sorted-key) JSON encoding of each event.
  • Fully deterministic — no randomness, no wall-clock in any hash.
  • Run npm test locally for a free self-check of the chain and tamper-detection logic.