Join our Newsletter — 33% off our NHI Course
Home› Guides› AI Runtime Security and Guardrails Buyer’s Guide: How…
Buyer's Guide LLM & GenAI Security

AI Runtime Security and Guardrails Buyer’s Guide: How to evaluate prompt, output and agent controls

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 28 October 2026 14 min read
On this page

AI runtime security products promise to stop prompt injection, data leakage and unsafe agent actions while your AI applications are live, but no product can make a language model reliably separate instructions from data. That gap between the promise and what is technically possible is where most buying mistakes happen. This vendor-neutral buyer's guide covers the runtime layer only: products that sit in the path of prompts, retrieved content, model outputs and agent tool calls in production. Posture management, AI discovery and governance tooling are covered in the AI Security Platform Buyer's Guide, and the engineering detail of building guardrails yourself is in the AI Guardrails and AI Firewalls Guide. It is written for security architects, AppSec leads and platform teams running a selection.

Key takeaways

  • Buy for impact reduction, not prevention. OWASP states it is unclear whether fool-proof prevention of prompt injection exists, and the UK NCSC says it may never be fully mitigated. A product that claims otherwise has failed your first test.
  • Tool-call control matters more than text filtering. For agents, the most valuable runtime control is a deterministic check on what the agent is about to do, with which identity and permissions, not a classifier score on the prompt.
  • Test on your own traffic. Detection rates on a vendor's benchmark tell you little. Measure detection, false positives and added latency on your applications, your languages and your retrieval sources.
  • Decide fail-open or fail-closed before you deploy. An inline guardrail is now a dependency of every AI feature. Know what happens when it times out, and who can bypass it.
  • The guardrail sees your most sensitive data. Prompts and outputs carry customer data, source code and secrets. Data residency, retention and whether the vendor trains on your traffic are first-order selection criteria.

What the category does

AI runtime security covers controls that inspect and act on AI traffic while the application is running. Analysts and vendors use overlapping labels: AI firewall, LLM firewall, guardrails, AI runtime defence, AI application protection and agent runtime security. Strip away the labels and the products do some combination of five jobs.

Control pointWhat it inspectsTypical actionsMain threats addressed
Input inspectionUser prompts, uploaded files, conversation historyBlock, redact, warn, log, route to a safer modelDirect prompt injection and jailbreaks (OWASP LLM01, ATLAS AML.T0051, AML.T0054)
Retrieved content inspectionRAG chunks, web pages, emails, documents and tool results fed to the modelStrip or quarantine instructions, tag untrusted content, drop the chunkIndirect prompt injection
Output inspectionModel responses before they reach the user or a downstream systemRedact PII and secrets, remove links and images, enforce output schema, blockSensitive information disclosure (LLM02), data leakage (AML.T0057), improper output handling (LLM05), system prompt leakage (LLM07)
Tool-call and action controlFunction calls, MCP tool invocations, API calls an agent wants to makeAllow, deny, require human approval, constrain parametersExcessive agency (LLM06), agent tool invocation abuse (AML.T0053)
Consumption controlRequest volume, token counts, cost per identityRate limit, quota, throttle, alertUnbounded consumption and denial of wallet (LLM10)

Detection methods behind these control points fall into three families: deterministic rules (regular expressions, allow-lists, schema validation, URL and domain policies), trained classifiers (prompt injection, toxicity, PII and topic classifiers) and LLM-as-judge evaluations. Deterministic controls are predictable and cheap but narrow. Classifiers are fast but probabilistic. LLM judges are flexible but slow, costly and themselves open to manipulation. Good products combine all three and let you choose per policy.

What the category does not do: it does not discover shadow AI use across your estate, assess the posture of your AI cloud resources, run scheduled red team campaigns or produce governance records for regulators. Some platforms bundle those functions, which is fine, but evaluate the runtime layer on its own merits.

When you need it

Not every AI deployment needs a dedicated runtime product. The decision depends on who supplies the content the model reads and what the model can do with it.

SituationRuntime product needed?Why
Internal chat assistant, no retrieval, no toolsUsually not; use platform-native content filters and loggingLow blast radius; the main risk is data entered by staff, better handled by DLP and usage policy
RAG over internal documentsOften, mainly for output redaction and loggingRetrieved documents can carry instructions; outputs can expose data a user should not see. Fix permissions first: see the Permission-Aware RAG Guide
Customer-facing chatbotYesUntrusted users at volume, reputational exposure, cost abuse, brand and topic policy
Assistant that reads external email, tickets, web forms or web pagesYes, with strong output and link controlsIndirect injection from attacker-controlled content is the dominant risk
Agents with write actions (send email, change records, run code, move money)Yes, and tool-call control is the priorityA manipulated agent acts with real credentials; text filtering alone is not enough
Many teams calling several model providersYes, usually via a gateway patternCentral policy, logging and quotas instead of one integration per team. See the AI Gateway and LLM Gateway Guide

Small organisations: start with the guardrail features of your model provider or cloud AI platform, strict output link policies and least-privilege tool credentials. A separate product earns its cost once you have several AI applications or any agent with write access. Large organisations: the deciding factor is usually central policy and evidence across many teams and providers, which pushes towards a gateway or sidecar model with one policy engine.

Must-have capabilities

  • Coverage of all three content paths: user input, retrieved and tool-returned content, and model output. A product that only scans user prompts misses indirect injection, which is the route in most published agent incidents.
  • Output controls for exfiltration channels: removal or rewriting of links, images and reference-style Markdown, with a domain allow-list you manage. The EchoLeak 2025 Copilot zero-click case shows why: hidden instructions in an email got past the injection classifiers, and data left through Markdown that was not stripped.
  • Deterministic tool-call policy: per agent and per tool allow and deny rules, parameter constraints (for example, recipients only in your own domain), and human approval for high-impact actions. Policy must be evaluated in code outside the model, as both OWASP LLM01 and the NCSC recommend.
  • Identity awareness: every decision should record which user, application, agent and credential was involved. Without this, you cannot investigate or apply per-identity quotas.
  • Sensitive data detection that includes secrets: API keys, tokens, connection strings and private keys in prompts and outputs, not only personal data. Redaction should be reversible only where you choose.
  • Tunable policies per application: thresholds, actions and categories set per app and per route, with a monitor-only mode that logs what would have been blocked.
  • Consumption limits: per identity rate limits, token quotas and cost alerts, which OWASP LLM10 lists as core mitigations for denial of wallet.
  • Complete, exportable logging: inputs, outputs, intermediate states, tool calls, decisions and errors, delivered to your SIEM. This matches the logging guidance in the joint agency paper Deploying AI Systems Securely.
  • Explainable decisions: each block or redaction shows the rule or classifier, the score and the text span, so analysts can tune rather than guess.

Evaluation criteria

CriterionWhat good looks likeHow to test it
Detection qualityPublished method; results on your test set for direct and indirect injection, jailbreaks and leakageRun your own labelled corpus, including multilingual and encoded variants
False positive rateLow enough that teams keep blocking enabledReplay a week of real, benign traffic in monitor mode and count blocks
LatencyAdded p95 and p99 latency stated and measured, including streaming responsesLoad test at your peak request rate with your average prompt length
Streaming supportOutput inspection that works on streamed tokens without breaking user experienceTest a long streamed response with a secret planted near the end
Agent and protocol supportFunction calling formats, MCP traffic and the agent frameworks you useRun one real agent with at least three tools through the product
Policy as codePolicies versioned, reviewed and deployed through your pipelineChange a rule through a pull request and confirm audit history
Data handlingRegion choice, configurable retention, no training on customer traffic, self-hosting optionRead the contract and data processing terms, not the marketing page
ResilienceDocumented fail-open and fail-closed behaviour, timeouts and health checksKill the guardrail service during the POC and observe the application
Framework mappingFindings mapped to OWASP LLM Top 10 2025 and MITRE ATLAS IDsCheck that mappings are specific, not one label on everything

Questions to ask vendors

  • Show us an indirect prompt injection planted in a document in our retrieval store being caught, and show us one that your product misses. What limits the damage then?
  • Which detections are deterministic and which are model-based? Can we run deterministic rules alone for regulated flows?
  • How do you handle reference-style Markdown, image URLs, HTML and encoded links in model output?
  • How are tool-call policies expressed? Can we constrain parameters, require approval and deny by default per agent?
  • What identity context do you record per decision: end user, application, agent, model credential?
  • What is the measured added latency at p95 for our prompt sizes, with and without an LLM judge?
  • What happens when your service is unreachable? Who can switch the product to bypass, and is that logged?
  • Where are prompts and outputs processed and stored, for how long, and are they used to train or tune any model?
  • How often are detection models updated, how are updates tested, and can we pin a version?
  • How does the product protect its own administrative interface and API keys? Who at your company can see our traffic?

Deployment and integration

Runtime products deploy in four patterns. The pattern often matters more than the detection engine because it decides what traffic is covered.

PatternCoverageStrengthsWeaknesses
Inline proxy or AI gatewayAll traffic routed through itCentral policy, no code change per app, quotas and logging in one placeBypassed by teams calling providers directly; single point of failure
SDK or library in the applicationOnly instrumented appsSees application context, retrieved chunks and tool calls preciselyNeeds developer adoption and upgrades per app
API called by the applicationOnly calls the developer makesFlexible; easy to add to one pathEasy to forget a path; developers decide what is checked
Agent framework or MCP layer hookAgent tool calls and tool resultsBest place for action controlFramework specific; coverage changes as frameworks change. See the MCP Gateway Buyers Guide

A phased rollout that works in practice:

  1. Inventory and choose two pilot applications: one customer-facing assistant and one agent with tools. Record which model providers, credentials and retrieval sources each uses.
  2. Close the bypass routes first: restrict model provider API keys so production traffic must pass the chosen control point. Treat those keys as non-human identities with owners and rotation. See the LLMjacking Guide.
  3. Run in monitor-only mode for two to four weeks: log every would-be block, review a sample daily and tune thresholds per application.
  4. Enable deterministic controls in block mode first: link and domain policy, secret redaction, schema validation and tool-call deny rules. These have predictable false positive rates.
  5. Enable classifier blocking per route: start where the content supplier is untrusted (public chat, inbound email) and keep monitor mode for trusted internal flows until false positives are understood.
  6. Wire logs and alerts to the SOC: forward decisions, tool calls and failures to the SIEM with identity fields, and write detection rules for repeated blocks from one identity.
  7. Define rollback: a documented, logged bypass switch per application, owned by a named role, with a time limit and automatic re-enable.

Metrics that show it is working: percentage of AI production traffic passing the control point; false positive rate per application after tuning; added p95 latency; mean time to tune a reported false positive; number of high-impact tool calls blocked or sent for approval; and number of direct provider calls detected outside the control point.

Pitfalls

  • Treating the guardrail as the only control: an agent that holds broad credentials stays dangerous whatever the filter does. In the ForcedLeak Agentforce case, instructions in a public web form led an agent to query other CRM records with its own access, and data left through an expired domain still on an allow-list. Least privilege and a maintained URL allow-list were the fixes that mattered.
  • Phrase deny-lists: blocking strings such as "ignore previous instructions" gives false comfort; the NCSC notes attackers can rephrase endlessly.
  • Scanning only the user prompt: leaves retrieved content and tool results, the indirect injection path, unchecked.
  • Unmeasured fail-open: timeouts default to allow and nobody notices that the guardrail has been silently skipped for days.
  • Logging without ownership: prompts and outputs are logged in full and become a new store of sensitive data with no retention policy or access control.
  • Benchmark-driven selection: choosing on a vendor leaderboard result rather than your own corpus and languages.

Red flags

  • Claims to prevent all prompt injection or to make an agent "safe" without changes to permissions.
  • No way to see why a request was blocked.
  • Vague answers on where prompts and outputs are stored or whether they train vendor models.
  • Tool-call control that is only a classifier score, with no deterministic deny-by-default option.
  • No support for retrieved content or tool results, only user prompts.
  • Latency figures quoted only as averages, or only without streaming.

Proof of concept

  1. Build a labelled test set of 300 to 1,000 cases: direct injection, indirect injection inside documents and emails, jailbreaks, secret and PII leakage, exfiltration through links and images, and an equal volume of normal traffic from your logs.
  2. Run each shortlisted product against the same two pilot applications in monitor mode with identical policies.
  3. Measure detection rate per attack class, false positive rate on benign traffic, p95 and p99 latency, and analyst time to explain five random decisions.
  4. Run an agent scenario: an injected instruction that tries to send data to an external address. Confirm the tool-call policy stops it even when the text detector does not.
  5. Run failure tests: stop the service, exceed quotas and push a policy change through your pipeline.
  6. Have legal and privacy review the data processing terms before scoring is final.

Buyer checklist

  • Runtime scope agreed: which applications, agents and content paths are in scope, and which are left to posture or governance tooling.
  • Model provider keys restricted so production traffic cannot bypass the control point.
  • Input, retrieved content and output inspection all demonstrated on your data.
  • Deterministic tool-call policy with human approval for high-impact actions demonstrated on a real agent.
  • Link, image and domain allow-list controls tested against Markdown and encoded variants.
  • Latency, streaming and fail-open or fail-closed behaviour measured and documented.
  • Logs with identity fields reaching the SIEM, with retention and access control agreed.
  • Data residency, retention and no-training terms in the contract.
  • Rollback and bypass switch defined, owned and logged.
  • Coverage mapped to OWASP LLM Top 10 2025 and MITRE ATLAS, and to NIST SP 800-53 SI-4, SI-10 and AU-6 for audit evidence.

Standards and references

How NHI Mgmt Group can help

We provide independent AI security and agentic AI identity advisory and evaluation support, including test set design and proof of concept scoring for runtime controls. Browse vendors in our products directory or contact us.

Related NHI Mgmt Group resources: AI Security Platform Buyer's Guide · AI Guardrails and AI Firewalls Guide · Prompt Injection Guide · AI Red Teaming and Testing Tools Buyer's Guide · OWASP LLM Top 10 LLM06 Excessive Agency Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 28 October 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick the PDF box to continue.