By NHI Mgmt Group Editorial TeamBased on Braintrust: “Best LLM guardrails and security testing tools (2026)” (August 9, 2026)

TL;DR: LLM security breaks at different stages, from prompt injection and unsafe outputs to malformed schemas and over-broad tool actions, so Braintrust frames guardrails as a layered control problem rather than a single filter. The practical lesson is that teams must test, monitor, and revalidate guardrails as prompts, models, and permissions change, because runtime protection alone cannot prove ongoing effectiveness.


At a glance

What this is: This guide breaks LLM security into five control layers and finds that guardrails, validators, permissions, and monitoring each catch different failure modes.

Why it matters: It matters because IAM, NHI, and AI security teams need evidence that runtime controls still work as prompts, models, tools, and permissions evolve.


Context

LLM security does not fail in one place. Unsafe inputs, unsafe outputs, malformed structured responses, and over-broad tool actions all sit at different points in the request-to-action path, which means a single guardrail cannot prove the application is safe end to end. For IAM and NHI practitioners, that is the familiar problem of control coverage: the control that blocks one stage does not govern later identity-bound actions or downstream access.

The governance gap is not just detection, but control ownership across layers. Input filtering, response moderation, schema validation, tool permissions, and evaluation each answer a different question, and they must be measured separately as model behaviour and access scope change. In agentic AI environments, the identity angle becomes explicit because tool use and permission boundaries turn model output into an access decision.


Key questions

Q: What breaks when an LLM guardrail only covers one layer of the stack?

A: A single guardrail leaves gaps because input filtering, response moderation, schema validation, tool permissions, and monitoring protect different stages of the workflow. If teams only test one layer, a model can still emit unsafe output, pass malformed structured data downstream, or trigger an unauthorized tool action. The control must match the failure mode, not the label on the product.

Q: Why do tool permissions change the security model for AI agents?

A: Tool permissions turn an LLM from a text generator into a delegated actor with access to connected systems. That means the main risk is no longer only unsafe language, but unauthorized actions taken under the application’s own authority. Teams need to govern scopes, accounts, and approvals as access control, not as prompt safety.

Q: What are the signs that an LLM guardrail is too weak for production use?

A: A weak guardrail looks confident on the wrong cases, misses obvious policy violations, or only catches them after the model has already acted. Another warning sign is that it can screen text but not the downstream action, so unsafe tool arguments still pass. If a guardrail cannot separate clearly safe, ambiguous, and unsafe cases with consistent decisions, it is not ready for a real workflow.

Q: When should teams use evaluation instead of relying on runtime blocking alone?

A: Teams should use both, but evaluation becomes essential whenever the application changes or the risk is too high to trust a single live decision path. Runtime blocking stops bad actions in the moment, while evaluation shows whether the control is consistently accurate across attacks, borderline cases, and legitimate traffic. Without both, assurance is incomplete.


Technical breakdown

Why one LLM guardrail cannot cover every failure layer

LLM applications move from user input to model reasoning, structured output, and external actions. Each stage has a different failure mode, so a detector tuned for prompt injection will not stop an invalid JSON payload from breaking a downstream workflow, and a schema validator will not stop a risky tool call. The control problem is therefore layered: content controls, structure controls, and action controls are separate mechanisms, even when they sit inside one product. Security teams need to treat them as distinct enforcement points rather than one composite safeguard.

Practical implication: Map each application risk to the layer that can actually block it, then test that layer independently before release.

How evaluation changes the control model for LLM security

Evaluation is not the same as blocking. A runtime guardrail makes an allow or deny decision in the request path, while evaluation measures whether that decision was correct across valid requests, borderline cases, and adversarial examples. That distinction matters because a control can appear effective in production while quietly missing attacks or rejecting legitimate traffic. Evaluation also gives teams a way to compare control behaviour over time, which is essential when prompts, model versions, retrieved content, or tool permissions change.

Practical implication: Use evals to measure miss rate and false blocks, then treat regressions as release blockers rather than after-the-fact observations.

Why tool permissions are the identity control that changes the risk profile

Once an LLM agent can call tools, the model is no longer just producing text. It is exercising delegated authority through credentials, scopes, and workflow permissions, which makes the trust boundary similar to NHI governance. A prompt filter may stop unsafe language, but it cannot stop an agent from issuing a refund, modifying a record, or invoking a tool outside its scope if the application has already granted that authority. This is where agentic AI becomes an identity problem as much as an AI safety problem.

Practical implication: Enforce tool permissions, account permissions, and step-level approval separately so model output never becomes uncontrolled access.


Threat narrative

Attacker objective: The attacker objective is to push the application into unsafe output, invalid downstream data, or unauthorized tool use that bypasses the intended control boundary.

  1. Entry occurs when a user prompt, retrieved document, or agent instruction introduces unsafe content that reaches the LLM workflow before controls decide how to handle it.
  2. Credentialed action follows when the application allows the model or agent to invoke tools, process structured output, or pass decisions into connected systems with insufficient scope checks.
  3. Impact occurs when a missed jailbreak, malformed schema, or over-broad tool action reaches production and causes unsafe user-facing output or an unauthorized system action.

Read and download The State of NHI & AI Agent Breach Report 2026, covering 200+ breaches impacting Non-Human Identities including AI Agents.


NHI Mgmt Group analysis

Layered LLM security is now a governance problem, not a single-filter problem. The article shows that input filtering, output moderation, schema validation, tool permissions, and monitoring each defend a different stage of the interaction. That layered structure means control effectiveness has to be proven per layer, not assumed from one runtime block. Practitioners should design AI governance around failure stage ownership, not around a single LLM safety gate.

Evaluation is the missing evidence layer for AI control assurance. A guardrail decision without testing context tells you little about miss rate, false blocks, or drift after model and prompt changes. That is the same assurance gap identity teams already know from access review artefacts that do not prove runtime enforcement. Teams should treat evals as control evidence, not as documentation after the fact.

Agentic access is an identity delegation issue. Once a model can call tools, the real risk is not only bad text but delegated authority that crosses into refunds, record changes, or other consequential actions. The model becomes a non-human decision point wrapped around permissions, which puts NHI-style lifecycle, scope, and audit questions into the AI stack. Practitioners should govern tool permissions as access control, not as prompt engineering.

Security regressions will keep appearing as the application evolves. New prompts, new models, new schemas, and new tool integrations all change control behaviour. That makes continuous measurement the durable control, while point-in-time testing only shows where the stack stood on one day. Teams should assume drift and build release gates that verify the controls again after every material change.

From our research library:

What this signals

AI guardrails need continuous verification because their failure modes shift as prompts, models, retrieval sources, and tool permissions change. Braintrust's framing is useful here because it separates runtime enforcement from release assurance, which is exactly where many agentic systems create blind spots. The programme lesson is to make regression testing part of the control itself, not a one-time validation exercise.

Agentic AI creates a delegated-access problem that looks increasingly like NHI governance. Once an application can call tools and act on connected systems, the control question becomes who or what is authorised to do what, under which scope, and with what evidence. That is why teams should review AI permissions with the same discipline they apply to machine identities and privileged access. LLM guardrails can miss this because 81.5% year-over-year in AI-related credential leaks surged 81.5% year-over-year in 2025, with the surrounding AI infrastructure leaking 5x faster than core LLM providers, according to the State of Secrets Sprawl 2026.

What matters next is control drift, not just control choice. The combination of model updates, schema changes, and new tool integrations means teams need a release process that re-proves the same guardrail under new conditions. That is the practical difference between having an AI safety feature and having an operating control.


For practitioners

  • Define control ownership by failure layer Separate input filtering, output moderation, schema validation, tool permissions, and monitoring into distinct owners and release criteria so one team is not implicitly responsible for every failure mode.
  • Build regression datasets from real attack cases Include prompt injections, jailbreaks, malformed JSON, unauthorized tool actions, and valid requests that the system should accept, then rerun them after every model or prompt change.
  • Gate releases on evaluation thresholds Use pre-release evals to measure both missed threats and false blocks, and fail the release when the control cannot meet agreed security thresholds on representative traffic.
  • Treat tool access as delegated authority Review every external action an agent can take, then require separate permission checks for refunds, record updates, messages, and other consequential operations before the tool call executes.

Key takeaways

  • LLM security failures occur at different stages, so no single guardrail can prove the application is safe end to end.
  • Evaluation is the assurance layer that shows whether filters, validators, and tool controls still behave correctly as the system changes.
  • Once an LLM can call tools, the problem becomes delegated authority as much as content safety, which pushes AI governance into access control and audit discipline.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Agentic AI Top 10 and OWASP API Security Top 10 address the attack and risk surface, while NIST AI RMF, NIST SP 800-53 Rev 5 and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Agentic AI Top 10ASI03 — Identity & Privilege AbuseThe article centres on agents exercising tool access beyond intended scope.
Recommendation — Map agent tool paths to ASI03 and constrain privileges before external actions execute.
NIST AI RMFMANAGE — Manage AI risksThe guide is fundamentally about measuring and managing LLM control effectiveness over time.
Recommendation — Apply MANAGE to define release gates, monitoring thresholds, and change control for guardrails.
NIST SP 800-53 Rev 5IA-9 — Identification and Authentication (Non-Organizational Users)External users and agents interact with connected services through delegated access boundaries.
Recommendation — Use IA-9 to govern non-organizational access paths that an AI system can invoke or depend on.
NIST CSF 2.0PR.AA-05 — Access Permissions, Entitlements and AuthorizationsTool permissions and downstream actions need explicit entitlement control, not just content screening.
Recommendation — Review entitlements and authorisations for every LLM tool path under PR.AA-05.
OWASP API Security Top 10API5 — Broken Function Level AuthorizationOver-broad tool actions resemble function-level authorisation failures in connected services.
Recommendation — Harden tool endpoints against API5-style function abuse and verify each action is authorised.

Key terms

  • LLM guardrail: A guardrail is a control that evaluates LLM inputs, outputs, or traces against a policy and then takes a defined action when the policy is violated. In practice, it can block, redact, flag, or escalate content based on a measurable score or rule.
  • Evaluation Dataset: An evaluation dataset is a structured set of representative cases used to test whether an agent behaves acceptably before or after release. It helps teams measure output quality, tool selection, escalation behaviour, and consistency so that production decisions are based on repeatable evidence rather than intuition.
  • Tool permissions: Tool permissions define what external systems, actions, and parameters an LLM or agent may use. They are the access-control layer that prevents model behaviour from turning into unauthorized operational activity, especially where the agent can change data or trigger business processes.
  • Production Monitoring: The ongoing testing of live systems after deployment to detect regressions, drift, or quality failures. For AI pipelines, this means scheduling repeatable checks against current data so teams can respond before degraded performance becomes a business incident.

Deepen your knowledge

The NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, machine identity security, and secrets management in the context of modern access control. It is designed for practitioners who need to connect identity governance to real operational risk.
NHIMG Editorial Note
Published by the NHIMG editorial team on August 18, 2026.
Updated on October 12, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org