llm_call
llm_call · claude-fable-5 · 104 usertokens
sha256 f4a15bc63fc6…
prev 000000000000…
one line wraps your LLM client. every governed call becomes a ledger transaction — with a receipt anyone can verify.
Apache 2.0 · 0 runtime deps in the verifier · 2 commands to first receiptruns on TigerBeetle 0.17.9
the docket
exhibit a
three frontier models, three real receipts, one ledger. every field below is the object the SDK handed back — 50,000 usertokens = $5.00.
import { trust } from "usertrust";
const client = await trust(new Anthropic());
const { response, receipt } =
await client.messages.create({
model: "claude-fable-5",
max_tokens: 256,
messages: [...],
});{ "transferId": "tx_msm19wxa_a107246b", "cost": 104, "budgetRemaining": 49896, "auditHash": "f4a15bc63fc64bcdab2dcca67718d6a89469311e01cb16fa9dd7bb0c31286654", "chainPath": ".usertrust/audit", "receiptUrl": null, "settled": true, "model": "claude-fable-5", "provider": "anthropic", "timestamp": "2026-08-09T16:45:13.634Z", "usageSource": "provider", "usage": { "inputTokens": 317, "outputTokens": 131, "cacheReadTokens": 87, "cacheWriteTokens": 43 }, "endpoint": { "class": "cloud", "runtime": "unknown" }, "meter": { "costBasis": "usd-proxy", "rateSource": "table" }, "pricing": { "appliedRates": { "inputPer1k": 100, "outputPer1k": 500, "cacheReadPer1k": 10, "cacheWritePer1k": 125 }, "tableVersion": "2026-08-09" }}exhibit b
import Anthropic from "@anthropic-ai/sdk";import { trust } from "usertrust"; const client = await trust(new Anthropic()); const { response, receipt } = await client.messages.create({ model: "claude-fable-5", max_tokens: 1024, messages: [...], });your keys. your billing. your evidence.
works with
governed
anthropic
openai
passthrough — not governed
anthropic
openai
passthrough surfaces bypass governance, audit, and budget enforcement — route spend through the governed entry points. 23+ models priced across anthropic, openai, and google.
exhibit c
the banking pattern: held, then settled or voided. never lost.
every governed call opens a two-phase hold against the budget before a token moves — available = budget − Σ(holds). without holds, concurrent agents each see the full budget and settle past it. with holds, the first hold that would exceed what is actually available throws. the budget here is 50,000 ut = $5.00 — the starter default. run the race yourself:
the gate is per-governor: one process serialises its own budget read and hold behind a mutex. across processes the guarantee is the ledger’s — TigerBeetle atomically rejects a hold that would overshoot, whoever asked for it.
budget bar — holds stack. the cap is the wall.
held 48,000 ut of 50,000 ut — the bar never passes the cap.
two-phase holds: 48,000 ut held of 50,000 ut, 2,000 ut available, agent 01 · retry blocked
arithmetic, not a screenshot: the same gate the block-budget-overshoot default rule enforces before every governed call. the error it throws is captured below, verbatim.
subject: autonomous coding agent · production API key
overnight, the agent entered a retry loop nothing was watching.
47 identical completion calls. no variation. no ceiling.
the spend surfaced as a $500 line item on the invoice — not in any log.
no budget hold. no audit chain. nothing threw.
finding: the run left nothing behind to verify, dispute, or replay.
no receipts existed.
denials don’t get receipts. they get chain events.
PolicyDeniedError: Policy denied: [block-budget-overshoot] Deny pre-spend when estimated cost would drive remaining budget below zero; [WARN] [warn-high-cost] Emit a warning when estimated cost exceeds 1000 tokens
Hint: A budget rule denied this call: increase the budget in trust() options or reduce the call's max_tokens, and review your budget_remaining / budget_remaining_after tiers.
Docs: https://usertrust.ai/docs/errors/policy-deniedexhibit d
sha-256 · rfc 6962 leaf and node prefixes
entries captured in ledger mode — TigerBeetle enforcing; dry-run writes the same audit chain without the ledger
llm_call
llm_call · claude-fable-5 · 104 usertokens
sha256 f4a15bc63fc6…
prev 000000000000…
llm_call
llm_call · gpt-5.6-sol · 59 usertokens
sha256 0f1031df7133…
prev f4a15bc63fc6…
llm_call
llm_call · kimi-k3 · 31 usertokens
sha256 91df5d9e8bc1…
prev 0f1031df7133…
llm_call
llm_call · claude-fable-5 · 104 usertokens
sha256 80bad924078d…
prev 91df5d9e8bc1…
llm_call
llm_call · claude-fable-5 · 112 usertokens
sha256 919d10dca884…
prev 80bad924078d…
llm_call
llm_call · claude-fable-5 · 119 usertokens
sha256 52f85adb310a…
prev 919d10dca884…
llm_call
llm_call · claude-fable-5 · 127 usertokens
sha256 dbcbefad9356…
prev 52f85adb310a…
policy_denied
policy_denied · claude-fable-5 · denied · budget_gate
sha256 627256b4498f…
prev dbcbefad9356…
chain intact — 8 entries, every prevHash verified
live demo recomputes sha-256 over each card's visible fields — printed stubs are the vault's captured hashes over the full event record
built for the record-keeping era — EU AI Act Art. 12 traceability
tamper-evident, not tamper-proof — detection, not recovery.
exhibit e
runtime dependencies in the verifier.
the verifier owes us nothing.
packages/verify/package.json — dependencies key count
Vault integrity: VERIFIED (UNANCHORED — internal consistency only) Chain length: 8 events Merkle root: 4f7ad6693448abe0f713b5656cf13021d61c01ec36b94df55463b2482f4514c8 Hash algorithm: SHA-256 First event: 2026-08-09T16:45:13.602Z Last event: 2026-08-09T16:45:16.565Z All hashes: valid (8/8)
exhibit f
the gate runs before the provider is ever called. a denial throws, the provider is never reached, and no receipt is returned — but the refusal is not silent. denials don’t get receipts. they get chain events.
12 policy operators · packages/core/src/shared/types.ts — FieldOperator union members
rules:- name: frontier-cost-capeffect: denyenforcement: hardseverity: criticalconditions:- { field: model, operator: , value: [gpt-x, gpt-x-mini] }- { field: estimated_cost, operator: , value: 2000 }- name: research-scope-guardeffect: denyenforcement: hardconditions:- { field: cost_center, operator: , value: research }- { field: model, operator: , value: "^gpt-x" }scopePatterns: ["agents/research/**"]timeWindows: [{ daysOfWeek: [1, 2, 3, 4, 5], startHour: 9, endHour: 18 }]
thrown AND chained
thrown: PolicyDeniedError · the provider was never called
chained: policy_denied · denialClass budget_gate · prompt hashed
frontier-cost-cap · estimated_cost 2400 gt 2000 · model gpt-x in [gpt-x, gpt-x-mini]
exhibit g
every forgery fails. every legitimate operation verifies.
29 scenarios · every verdict below is the string the verifier really returns
emerald rows are control cases — legitimate operations that must verify. red rows are the non-verified states: forgeries the verifier refuses (ANCHOR_MISMATCH, ANCHOR_INVALID), and the can’t-attest states (ANCHOR_STALE, ANCHOR_UNVERIFIABLE, UNANCHORED) — no accusation in those, and the default verifier still exits clean; --require-anchor is what fails them.
indexed by row · source test titles linked verbatim; their original spec-row prefixes are omitted (row 17 was folded into scenario 5 upstream).
$ git clone https://github.com/usertools-ai/usertrust.git$ cd usertrust$ npm ci$ npm test -- anchor-corpus
don’t trust us — recompute us.
the discipline
counted at capture · 699fcef · v3.2.0
Core produces the hashes in a vault; verify recomputes them without importing core. If the two share code, the verifier verifies nothing.
Never "DRY up" this duplication. Mirror every change into both packages.
a scrolling strip of entries from the published audit chain — the same entries exhibit d lists in full.

your keys. your billing. your evidence.
start in dry-run — TigerBeetle skipped; audit chain and policy gates still run
TOTAL SURPRISES ··· 0
chain head 627256b4498f26af6c5ec8ff
local SDK
shipping today
self-hosted control plane
shipping today
managed proxy
request access →