Skip to content
lynxby

Trust and governance

The audit ledger

Who asked, which model answered, which tool ran, what it cost and what was redacted, in an append-only chain you can verify and export.

A log is something you read. A ledger is something you can prove. Every model call, tool call, sign-in, redaction decision and approval is a row in an append-only, hash-chained record.

What a row holds

The event name, the organisation and the person, the IP and user agent where there was a request, the specifics (tool, status, duration, policy version, decision), and the hash of the previous event and of itself.

A single action can produce more than one row: the decision is audited and so is the export. Writes go through a queue, so recording that something happened never delays the thing that happened.

Append-only twice

The model refuses an update or a delete. Postgres refuses too, with a trigger that holds against psql as well as against the application. That second one is the one that matters in an audit: a developer with database access cannot quietly correct a row.

The chain

Each event hashes its own fields together with the previous event's hash, starting from sixty-four zeros. The chain is per organisation, so one tenant's events never link to another's. A platform operator who steps into a company is written into that company's chain with their own account, so the tenant sees who from outside acted.

php artisan audit:verify

The command walks the ledger in order, recomputes every hash, and exits non-zero with the ids that do not fit. An edited row and a deleted row both break it, and the break is reported at the first row that disagrees.

Reading and exporting

Audit filters by category, outcome, MCP server, model, session, client, channel and date. Four numbers sit above the table: total, failed, blocked, p50 and p95 latency. Compare puts two sessions side by side, one column per model, one row per action.

The export takes the same filters, so the file is the view it was taken from. JSONL keeps the context as JSON; CSV flattens it into a cell. The evidence pack adds the ledger, an access review and the written ISMS registers into one zip with a SHA-256 per artefact and a hash over the manifest.

Document reads

"Which documents did this person read" is a separate screen. It lists one row per get_document call, including refused reads, and one row per document a search served, with the segment ids. The ledger event stays after the index row is pruned.

What it does not do

The ledger keeps 24 months by default. Dropping a whole month is the only prune it accepts; it never edits a row. Reading a stored connector payload needs a separate permission, audit.payload, because an admin who can read every ticket body is the largest unmonitored reader in the system. Opening one writes its own event.

Related: privacy, permissions, MCP.

Want to see this on your own documents?

Contact us

Search all guides