Audit & Compliance

Who Did That? Why Every AI Event Needs a User Attached

July 2026 · 9 min read · InferenceFort Team

When an auditor, a regulator, or your own incident-response team asks "which user caused this LLM call?", most AI stacks have no answer. The call went out with a shared API key; the logs, if any, say the application did it. That answer fails audits that traditional software passed decades ago — and it fails them at exactly the moment AI usage is exploding: Gartner expects more than 80% of enterprises to have generative-AI applications in production by 2026.

The requirement is not new; it is the oldest control in the book, applied to a new surface:

One line at the entry point

InferenceFort attaches identity where the request enters, and every governed event downstream inherits it automatically:

identity set once — attributed everywhere
import inferencefort
inferencefort.set_context(
    user="alice@acme.com",      # the human (or service) accountable
    agent_id="support-bot",     # which agent acted
    thread_id="conv_8842",      # which conversation
)

Identity rides in async-safe context (contextvars in Python, AsyncLocalStorage in Node), so a server handling a thousand concurrent users never cross-attributes: each request's calls carry that request's user, even through parallel agent branches. There is deliberately no process-global fallback that concurrent users could collapse into.

What lands on every event

Each LLM call and each tool call becomes an audit event carrying: the user, the agent and executing graph node, the end-customer (for multi-tenant platforms), the model, the resolved destination endpoint (the compliance receipt that the call went where policy says it may go — the control GDPR data-transfer rules care about), the decision with its reason, token usage and cost, and the trace linkage that stitches a multi-step, multi-agent run into one causal chain.

That combination turns four painful questions into queries:

No anonymous calls

Attribution only works if it cannot be skipped. InferenceFort's identity gate can require a user on every call — a request with no set_context identity is refused before the prompt leaves the process, with a clear developer-facing reason. The strictness is configurable, but the default posture for regulated deployments is simple: if we can't say who, it doesn't run. The IBM Cost of a Data Breach report keeps finding that breaches involving ungoverned, unattributed AI usage cost more and take longer to contain — attribution is the difference between an audit trail and an archaeology dig.

For how attribution composes with the rest of the audit story — retention, tamper-evidence, per-customer isolation — see Building Complete Audit Trails for AI Agents.

Secure your AI agents today.

InferenceFort enforces policy on every LLM call and tool call — in-process, before it runs.

Get early access →