VaikoraVaikora

Vaikora › Blog › Product Updates

LLM policy enforcement gaps: what a policy engine checks, blocks, and records before each action runs

Product Updates · Dec 1, 2026 · 4 min read

Two things can be true at the same time: your team has written LLM usage policies, and none of them are being enforced at the moment an agent action executes. The gap is not intent. It is architecture.

Where most LLM policy enforcement actually lives

In most deployments, policy enforcement for LLM calls is handled at the edges: system prompts that describe what the model should not do, application-layer validation that checks outputs after they arrive, and IAM roles that restrict which cloud resources an agent can touch. Each of those controls operates at a different layer, and none of them sit inline between the agent and the action.

That placement matters. A system prompt is a suggestion. Output validation catches a problem after the model has responded. IAM denies at the resource layer, well after the agent has already decided to call the API. If your goal is to enforce a policy before an action executes, none of these are enforcement points in the strict sense.

What inline enforcement actually means

Inline enforcement means a policy engine receives the action request before it reaches the LLM or tool, evaluates it against a defined rule set, and returns an allow, block, modify, or require-approval decision. The original request does not proceed until that decision is made.

The practical implication: a blocked action is never sent. A modified action is rewritten before the model or tool sees it. A flagged action waits for a human decision. None of these outcomes are achievable from an output validator or a downstream IAM rule, because by the time those controls run, the request has already left the agent.

Vaikora sits inline between the agent and every LLM or tool call. It evaluates each action deterministically, meaning identical input produces identical output every time, with no model-based probabilistic scoring in the enforcement path.

What the policy engine actually checks

A policy engine at this layer is evaluating specific signals on each request:

Each check runs in the enforcement path. The decision at Vaikora runs at P50 8ms and P99 45ms, so the latency added to each agent action is small enough to be invisible in most workflows.

A concrete scenario

Consider an agent with access to a document retrieval tool and an external API call tool. The policy says the agent should not send document content to external endpoints. Without an inline enforcement point, that policy relies on the model interpreting its system prompt correctly every time and the application catching any violation in output validation.

With an inline policy engine, the enforcement looks like this: the agent constructs a request to the external API tool. The request arrives at the policy engine before execution. Content inspection identifies that the request body contains extracted document text. The policy rule for data exfiltration matches. The action is blocked. The agent receives a denial response. The whole sequence completes in under 50ms at the 99th percentile, and the blocked action is written to an audit log with the full request payload, the matched rule, the decision, and a timestamp.

That audit entry is signed into a SHA-256 hash-chained log. Any attempt to modify or delete the entry breaks the chain, which is detectable on inspection.

What the audit record needs to contain

A policy decision is only useful after the fact if the audit record makes the decision reconstructible. Each entry should capture the full request (not a summary), the rule or rules that matched, the decision and its rationale, the session and agent identity, and the timestamp in a tamper-evident format.

If any of those fields are missing, an incident investigator cannot answer basic questions: what did the agent try to do, which policy applied, and was the decision correct? Log volume is not the same as log completeness.

What to check next

Review your current LLM deployment and map where each policy control actually sits. For each rule in your AI usage policy, ask: at what point in the request lifecycle is this rule evaluated, and what happens if the model ignores it? If the honest answer is "we rely on the model to comply" or "we catch it in output review," you have a monitoring setup, not an enforcement setup. The enforcement gap is the specific thing to close.

See Vaikora enforce policy on your AI

Open-core AI runtime control. Self-host the MIT gateway free, or run the hosted Control Plane.

Get a demo Self-host the gateway

More from the Vaikora blog