DocsSDKs & spansBrowse

SDKs & spans

Capture rides OpenTelemetry: your existing spans become canonical audit events, whichever dialect they speak. What differs per agent framework is which plane supplies the event, never the schema.

Three dialects, one schema

The mappers in both SDKs understand the Vercel AI SDK's ai.* spans (recording the provider-call child, skipping the orchestration parent that would double-count every model call), OTel GenAI semconv (both attribute generations, since field names renamed between versions and an audit schema cannot drift with them), and OpenInference. Chains, retrievers and embeddings are engineering telemetry and are deliberately not recorded: the examiner's question is what the agent did.

what lands on the chain
model_call    tokens observed (never priced as $0), model, prompt/output hashes
tool_call     tool name, input/output hashes, outcome (success and failure alike)
delegation    agent → agent handoffs (the compounded-autonomy record)
lifecycle     session open/close + heartbeats, so silence ≠ a dead emitter

Sessions join the planes

Every event a turn emits (the model calls, the tool executions, and any mutation they lead to) shares one sessionId, and cross-plane corroboration is computed from it: a trace observed on two planes is evidence, on one plane it is an assertion, and the coverage report says which is which. The manual API exists for hosts with no OpenTelemetry at all:

manual capture: python / typescript
handle.record("send_invoice", input={"invoice": 42}, output=result)

auditant.record("send_invoice", { input: { invoice: 42 }, output: result });

No SDK: raw OTLP

Already emitting OpenTelemetry? Point any exporter (or a Collector's otlphttp exporter) at the control plane. POST /v1/traces is the standard OTLP/HTTP path, so the generic endpoint variable is enough; the body may be protobuf or JSON, gzip or plain, and the same mapper as the SDKs turns GenAI semconv, OpenInference and Vercel AI SDK spans into model_call and tool_call events.

two env vars, nothing installed
OTEL_EXPORTER_OTLP_ENDPOINT=https://api.auditant.co
OTEL_EXPORTER_OTLP_HEADERS=authorization=Bearer%20ak_…,x-auditant-log=tenant_acme/prod

Which log the spans belong to comes from the x-auditant-log header, ?log=, or the resource attribute auditant.log_id; a tenant key needs none of them. The agent is auditant.agent_id on the resource, then the x-auditant-agent header, then OTel's own service.name. Two limits, stated because this path is sold as zero-code: custody is hashes-only (there is no customer-side sink to hand a payload to on a server that received a span), and nothing arriving over OTLP can be blocked: spans describe what already happened. Enforcement needs the SDK's decide() in front of the action.

Delivery guarantees

Evidence writes never block your agent: events queue and flush in batches, spill to a local buffer on outage (Python) or retain their batch bounded with counted drops (TypeScript), and the policy check is the only synchronous call, by design, since it runs before the action it governs. Serverless hosts must await auditant.flush() before returning.