← Back to all cards
The SDK · @foxy.audit()
One decorator. That's the whole integration.
No rearchitecting, no proxy, no rewriting your model calls. Add one line and each call becomes a content-blind commitment, graded and chained through a durable local queue.
$ pip install foxy-audit
from foxy_audit import audit
@audit(policy="soc2")
def ask_model(prompt):
return llm.generate(prompt)
The decorator wraps your function transparently. In the default best-effort mode, your code returns immediately while Foxy records what happened in the background. Critical services can enable audit_required=True to fail closed when evidence cannot be delivered.
What actually leaves your machine
- A customer-keyed HMAC commitment of the prompt and response — never the raw text.
- The token count, model name, timestamp, and the policy tag you set.
- The policy verdict from the configured judge — clean, flagged, or unknown.
Built to stay out of your way
- Two delivery modes: best-effort background capture or
audit_requiredfail-closed capture. - Default mode is best-effort: telemetry errors stay out of your app;
audit_requiredintentionally fails closed. - Survives outages: records queue locally and sync when the backend is reachable again.
Wrap your first call today.
Book a demo and we'll get the SDK recording a real call on your stack in minutes.
Book a demo
Foxy Audit