On this page 6 sections

VERITRAIL editorial team · Published 21 October 2026 · About 9 minutes to read

When a language model answers a question, a person usually decides what to do with the answer. When an agent has tools, the model's output can be the action: a record updated, an email sent, a refund issued, a command run. That shift changes where governance has to operate. Policies, assessments and approvals before deployment remain necessary, but they are not sufficient for a system that makes many decisions a minute in production. Some controls must run at the moment of action.

This article sets out a practical model for runtime guardrails on AI agents: what to control, how to express it, and how to roll it out without either breaking production or leaving guardrails permanently switched to "log only".

Principle: AI proposes, policy evaluates, approved actions execute

The core design is simple to state. Every prompt, response and tool call passes through a policy evaluation before it takes effect. The evaluation returns a decision — allow, deny, redact, transform, require human approval, escalate or rate-limit — and the decision is logged with the version of the policy that produced it.

Three properties make this work in practice:

  • The policy is versioned code, not prose. It can be reviewed, tested, diffed and rolled back. Changes to production policy go through approval like any other material change (GL-04).
  • The policy is evaluated outside the model. A model can be manipulated by its inputs; a policy engine evaluating structured tool calls is much harder to talk out of a rule.
  • Every decision is evidence. A tamper-evident log of policy decisions (SE-08) is what lets you later show that a control operated, not just that it was configured.

What to control

1. Tools: default-deny and least privilege

Start with the agent's tool manifest — every tool, API and data store it can reach, and the operations it can perform (EI-07). Then write rules that allow only what the declared purpose requires, and deny everything else by default (IS-11).

It helps to classify operations by impact. Reads are generally lower risk. Writes change state. Deletions and payments are often irreversible. External sends — emails, messages, API calls to third parties — cross an organizational boundary. Exports move data out. The last four deserve particular scrutiny.

Rules should also constrain parameters, not just tool names. An agent allowed to send email should probably only send to approved domains; an agent allowed to issue refunds should have a maximum amount. Parameter validation is where many real-world misuse scenarios are actually stopped.

2. Human approval for high-impact actions

For operations that are high-impact, irreversible or external, the policy should pause the action and route it to a designated approver (IS-13). Good approval design is specific:

  • Thresholds rather than blanket approval — refunds over a set amount, bulk updates over a set count.
  • Named approver roles with the authority and context to decide, and queues that are actually staffed.
  • Recorded identity and decision, so the approval is evidence.

Approval fatigue is a real failure mode. If every action needs approval, approvers stop reading. Calibrate thresholds so approvals are rare enough to be meaningful.

3. Content: redaction and injection detection

On the content side, redact personal and confidential data from prompts, responses, tool parameters and tool outputs before they reach external models or logs (IS-04). Detect prompt-injection and jailbreak patterns, including in content the agent retrieves — web pages, documents and emails can carry instructions aimed at the agent (IS-12).

Be realistic about detection. Pattern-based detectors catch common attacks and obfuscations, and they produce both false positives and false negatives. For agents, the structural controls — least privilege, parameter validation, approval — are the stronger defense, because they limit what a successfully manipulated agent can do. Adversarial testing before release and after material change (IS-14) tells you how well the combination holds.

4. Limits and containment

Rate, token, tool-call and cost limits contain runaway loops and abuse (IS-16). And you need a way to stop things: a kill switch that can disable an agent, a tool, a model or a tenant, plus rollback to a previous policy or prompt version (IS-15). Test it, and measure time-to-disable — an untested kill switch is an assumption.

VERITRAIL controls cited

Framework mappings are indicative VERITRAIL interpretations (Control Library v1.0.0); they are not legal advice and do not establish conformity or compliance.

The rollout model: Observe → Warn → Protect → Enforce → Contain

The most common failure we see in guardrail programmes is not a missing rule. It is a policy that never leaves monitoring mode because nobody is confident enough to switch it on. A staged rollout with explicit exit criteria fixes that.

Mode Behavior Purpose Exit criteria (examples)
Observe Log the would-be decision; allow everything; leave payloads untouched Learn what the policy would do on real traffic Decision log reviewed; false-positive DENYs investigated; missing rules added
Warn Allow; flag every request whose would-be decision is not ALLOW Make users and operators aware; test approver workflows Warnings understood; approval queues staffed and responsive
Protect Apply redaction and transforms; never block Turn on data protection with no availability risk Redaction verified on prompts, responses and logs
Enforce Apply full decisions, including DENY, REQUIRE_HUMAN_APPROVAL, ESCALATE and RATE_LIMIT Steady state for approved production systems —
Contain Deny everything in the policy scope Incident response; the kill switch for the scope Incident decision to restore

Some practical notes:

  • Time-box each stage. "Observe for two weeks, then review" is a plan; "Observe until we are comfortable" is not.
  • Write exit criteria before you start. Put them in the policy itself, so the promotion decision is about evidence rather than mood.
  • Treat promotion as a production change. Moving a production policy between modes, or editing its rules, should create a pending approval for a named human, not execute automatically.
  • Contain is not the last step in a sequence. It is a mode you hope to use rarely, available from any stage, and tested in drills (Runbook 4 in the VERITRAIL runbooks).

A worked example

Consider a customer-support agent that can look up customers, issue refunds and send email.

  • Tool rules: CRM lookup allowed; refunds allowed up to a maximum, with approval required above a lower threshold; external email requires supervisor approval; account deletion denied; anything unlisted denied.
  • Content: email, phone, card and bank details redacted in prompts, responses and logs; injection detection on prompts and retrieved content.
  • Limits: per-minute requests, tool calls per session, daily tokens, monthly cost cap.
  • Kill switch: agent and tool scopes; security operations and platform on-call authorized; target time-to-disable recorded.
  • Rollout: Observe for two weeks; Warn while the supervisor queue is staffed; Protect once redaction is verified; Enforce after forum approval.

You can see a policy excerpt in this shape on the VERITRAIL Shield page, and generate a draft for your own agent with the guardrail generator.

What runtime guardrails will not do

Guardrails do not make an agent correct. They will not catch a plausible but wrong answer, and they do not replace pre-release testing, human oversight design, or monitoring for drift. They only protect traffic that actually passes through them — an agent that calls tools directly, bypassing the gateway, is unprotected, which is why the agent and tool registry matters. Treat runtime policy as one layer in a governance system, not as the system.

Getting started

  1. Register your agents and their tool manifests.
  2. Draft a default-deny policy with approval for high-impact operations.
  3. Deploy in Observe and review a week or two of decisions.
  4. Promote with explicit exit criteria and human approval.
  5. Drill Contain before you need it.

Last reviewed: