LLM Acceptable Use Policy for Developers: What to Include and How to Enforce It at Runtime
An LLM acceptable use policy for developers should cover approved models and endpoints, data handling, prompt and output rules, credentials, tool and MCP access, generated code, usage limits, escalation and exceptions, and evidence. Write each rule as a testable condition paired with a runtime decision (allow, redact, block, rate limit or escalate) and a defined evidence record, so the policy is enforced on each interaction and tool call instead of relying on developers to read it.
- Inventory every path by which developers call LLM APIs, including scripts and coding assistants.
- Publish an acceptable use matrix by model, endpoint and data class.
- Rewrite each policy sentence as subject, condition, decision and evidence record.
- Write a test for every rule and run it against a staging decision point.
- Assign escalation owners, risk thresholds and exception expiry rules.
- Review evidence records with your compliance team against your retention obligations.
Why the policy has to be an enforceable specification
Developers in regulated enterprises call LLM APIs from applications, scripts and coding assistants. The acceptable use policy that governs this work is usually a document. It lists permitted models, data handling expectations and restrictions, but nothing in the execution path applies it. When an auditor asks what was permitted and what happened, the team can produce the document but not the record.
Published guidance points the other way. The NIST Generative AI Profile calls for defined acceptable use policies covering interfaces, third-party APIs and criteria for the kinds of queries an application should refuse. The OWASP LLM AI Cybersecurity and Governance Checklist recommends technical enforcement of data classification and usage limits, plus a published acceptable use matrix by tool and model.
The policy also cannot live only in the prompt. OWASP's guidance on hidden context says system prompts, developer instructions and tool schemas should not be the sole security boundary for authorization, policy enforcement or content filtering. Instructions in the context window shape model behavior. Enforcement has to happen outside the model, before the request or action executes.
How to write a rule that can be tested
A rule is enforceable when an engineer can write a test that passes or fails against it. Use four parts for every rule: the subject (which application, user or assistant), the condition (which model, data class, content pattern or tool), the decision, and the evidence record.
"Do not send confidential data to unapproved tools" fails this standard. "Requests classified as confidential may only reach endpoints on the approved list; otherwise block and record the classification, endpoint and policy version" passes it. The second version names the input, the check, the action and the artifact.
Use graduated decisions rather than a single block. Low-consequence, reversible actions can be allowed automatically. Higher-consequence or irreversible actions route to a human. Redaction suits cases where the request is legitimate but contains a field that should not leave the boundary. Rate limits suit cases where volume is the risk.
Policy components for data, models and prompts
The first four components govern what reaches a model and what comes back. Each is stated as a rule, its runtime decision and the evidence it should produce.
- Approved models and endpoints: Rule: calls may only target models and endpoints on the acceptable use matrix, by application and environment. Decision: allow listed targets, block the rest. Evidence: target requested, matching matrix entry, policy version, outcome.
- Data classification and sensitive data handling: Rule: protected or confidential data may not be sent to nonbusiness-managed tools, and each data class maps to permitted endpoints. Decision: redact specific fields where the request is otherwise valid, block where the class is not permitted. Evidence: data class detected, action taken, redaction count, destination.
- Prompt and output rules: Rule: define query categories the application must refuse and output content that must not be returned. Decision: block or redact on match. Evidence: rule matched, direction (prompt or output), action taken.
- Credential and key management: Rule: credentials, connection strings and tokens must not appear in system prompts, tool schemas or user prompts, and API keys are issued per application. Decision: block or redact on detection. Evidence: detection event, location in the request, key identity.
Policy components for tools, code, limits and accountability
The remaining components cover actions, generated code and the processes around exceptions. Some are fully machine-enforceable. Others need an owner and a review cycle.
- Tool and MCP server access: Rule: each agent or assistant may call only named tools and MCP servers, with narrowly scoped authorization. Decision: allow in-scope calls, block out-of-scope calls, escalate high-consequence or irreversible actions. Evidence: tool, arguments summary, decision, approver where applicable.
- Code provenance and licence considerations: Rule: generated code entering a repository must carry origin, licence and security context for review. Decision: allow, block or escalate according to your licence and security criteria. Evidence: provenance record attached to the change and the decision taken.
- Rate and usage limits: Rule: set per-application and per-user ceilings on request volume and on repeated policy violations. Decision: rate limit at the threshold. Evidence: limit reached, subject, time window.
- Escalation and exception handling: Rule: name who holds approval authority, which risk thresholds trigger review, and how exceptions expire. Decision: escalate for human approval. Evidence: request, approver, outcome, expiry.
- Evidence and retention: Rule: every decision produces a durable record, retained and exportable according to your own compliance obligations. Evidence: the decision records themselves, tied to the policy version in force.
Where enforcement sits in the execution path
OWASP's guidance on excessive agency recommends complete mediation: requests to downstream systems are validated against policy by the tool, by an independent pre-execution policy decision point between the tool and the downstream system, or by the downstream system itself. NIST describes action-level enforcement in similar terms, with each proposed action evaluated against an explicit policy before it executes. The practical point for platform teams is that the check should not depend on the model choosing to comply.
For developer traffic, this means placing a decision point in the path of every LLM API call and tool call, whether it comes from an application, a script or a coding assistant. The decision point reads the policy, evaluates the individual interaction, applies allow, redact, block, rate limit or escalate, and writes the evidence record in the same step.
Trussed enforces policy in the execution path across models, agents, tools, MCP servers and coding assistants, and generates audit-ready evidence from those enforcement decisions. It also provides code provenance covering origin, licence and security context. The design question is the same whatever you deploy: is the decision made at runtime, and does it leave a record?
What stays with people and process
Not every clause becomes a runtime decision. Deciding which models belong on the matrix, setting data classification schemes, choosing risk thresholds and defining refusal criteria are organizational decisions. The runtime layer enforces what those decisions produce. It does not make them.
Two tradeoffs deserve attention. First, detection quality limits automated data and credential rules, so start with high-confidence patterns and use escalation where classification is uncertain. Second, every escalation adds latency and reviewer workload. Reserve it for irreversible or high-consequence actions and let reversible, low-risk calls proceed.
Consequences also belong in the policy. Restricting model access after repeated violations is one option NIST describes alongside identity verification. Record who owns escalation authority and who can grant exceptions, and make exceptions time-bound so they appear in the evidence rather than disappearing into chat threads.
Finally, link the policy to existing conduct, data protection and software use policies rather than creating a parallel rulebook. Extend it explicitly to third-party APIs, fine-tuned models and embedded tools.
From policy sentence to enforced decision
Rule
A specific, testable condition on a model, data class, prompt, output or tool call.
Decision
Allow, redact, block, rate limit or escalate, applied to the individual interaction.
Evidence
A record of what the policy permitted and what actually happened.
Review
Exceptions, thresholds and owners maintained through organizational process.
See how policy is enforced and evidenced at runtime
Walk through how a regulated enterprise can enforce acceptable use rules on individual interactions and tool calls, and what audit-ready evidence each decision produces.
See How Evidence Is ProducedHow does your AI governance program compare?
See where your program has gaps in less than 2 minutes.