DocsInstall
Install
Two lines in your agent, and every model call and tool execution lands on a tamper-evident chain. Start with the verify step if you're evaluating — if a record we produced doesn't survive a command run on your own machine, nothing else here is worth reading.
In your agent. Python or TypeScript.
Through a gateway you already run.
Verify a bundle before you send anything.
Python
pip install auditant import auditant auditant.init(api_key="ak_…", log_id="tenant_acme/prod", agent_id="underwriter")
With OpenTelemetry present, init()registers a span processor and activates whichever OpenInference instrumentors are installed (LangChain, OpenAI, Anthropic) — capture with no changes to your agent's logic. Install the extras for full coverage:
pip install "auditant[openinference]" # LangChain / OpenAI / Anthropic auto-capture pip install "auditant[openai-agents]" # the OpenAI Agents SDK trace processor pip install "auditant[gateway]" # the LiteLLM gateway callback
Without OpenTelemetry, init() still gives you a session on the chain (lifecycle + heartbeats, so a quiet agent is distinguishable from a dead emitter), the manual record() API, and the synchronous decide()policy check. The handle's activated list states exactly what turned on — an audit SDK that implies more coverage than it has would be the product contradiction.
TypeScript — Vercel AI SDK
npm i auditant
import { init } from "auditant";
const auditant = init({ apiKey: "ak_…", logId: "tenant_acme/prod", agentId: "support-bot" });
const result = await generateText({
model: openai("gpt-4o"),
experimental_telemetry: { isEnabled: true }, // the AI SDK's own switch
// …
});
await auditant.flush(); // serverless: before the response returnsThe processor attaches to whatever tracer provider your app already runs — this SDK neither installs nor configures OpenTelemetry, because two tracing setups fighting is worse than one. flush()is awaitable and coalesced: a Vercel function freezes the instant the response returns, and an event sitting in a queue at that moment never happened. The AI SDK's own forceFlush routes into it.
What happens next
Events appear on your dashboard's Overview within seconds of the first run. Model calls carry observed token counts (never invented prices — attributionComplete: false until a pricing table says otherwise), tool calls carry input/output hashes, and everything shares a session so the whole arc reads as one record. Next: verify a bundle yourself, or wire an adapter if your agents run behind a gateway or the OpenAI Agents SDK.