usertrustdocs site github
all docs
Getting Started

usertrust

Budget holds, audit trails, and spend limits for every LLM call.

usertrust wraps any LLM client (Anthropic, OpenAI, Google) with a JS Proxy so every governed AI call becomes an auditable, double-entry financial transaction, recorded on a tamper-evident audit chain.

Keep your keys. Keep your billing. Add trust in one line.

ts
import Anthropic from "@anthropic-ai/sdk";
import { trust } from "usertrust";

const client = await trust(new Anthropic(), { dryRun: true, budget: 50_000 }); // dryRun skips TigerBeetle for a first try
// ... governed calls ...
await client.destroy(); // required — flushes the audit chain and releases its lock

Core guarantees

Explore the docs

Stack

LayerTechnology
RuntimeNode 22, ESM
LanguageTypeScript 5.9 (strict, noUncheckedIndexedAccess)
LedgerTigerBeetle
ValidationZod
PolicyYAML + minimatch
TestVitest

License

Apache 2.0 — View on GitHub

privacy