By NHI Mgmt Group Editorial TeamDomain: AI SecuritySource: AktoPublished June 1, 2026

TL;DR: AI guardrails govern input, output, and system behaviour across LLMs and AI agents, while runtime enforcement blocks prompt injection, tool misuse, and data leakage as agents gain access to emails, databases, code execution, and external services, according to Akto. The governance gap is no longer model quality alone but whether policy and privilege boundaries exist where AI systems actually act.


At a glance

What this is: This is a practitioner-focused analysis of AI guardrails for LLMs and AI agents, with the key finding that runtime controls are now central to preventing prompt injection, data leakage, and tool misuse.

Why it matters: It matters because agentic AI expands access paths across identity, data, and tools, so IAM, PAM, and AI governance teams need controls that enforce scope continuously rather than at design time.

By the numbers:

👉 Read Akto's analysis of AI guardrails for LLM and AI agent security


Context

AI guardrails are the policy and runtime controls that constrain how an LLM or AI agent behaves when it is receiving inputs, producing outputs, and calling tools. In practice, they are becoming a control layer between agentic AI and the enterprise systems it can reach, which makes them relevant to IAM, PAM, and NHI governance as soon as AI systems are allowed to act on behalf of users or workflows.

The governance gap is that many existing controls assume a human or a clearly bounded application will request access, but agentic systems can plan, chain actions, and interact with data and tools in ways that are harder to review after the fact. That is why this topic sits at the intersection of AI security and identity security, especially where AI agents inherit delegated access or touch sensitive data sources.


Key questions

Q: How should security teams implement guardrails for enterprise AI services?

A: Start with identity-bound access, then add prompt filtering, output moderation, token limits, and audit logging at the gateway. The control stack should sit around the AI service, not inside a single application. That way security teams can govern who may call the service, what data can pass through it, and how abuse is detected.

Q: Why do AI agents create a governance problem for IAM teams?

A: AI agents create a governance problem because they authenticate and act as autonomous software entities with tool access. If their actions are logged only as application activity, teams lose accountability, context, and revocation clarity. IAM must therefore extend to agent identity, delegated authority, and control-plane audit trails.

Q: What breaks when indirect prompt injection is not controlled in AI systems?

A: Indirect prompt injection breaks the assumption that retrieved content is safe to use as instruction material. Once malicious text enters the model context, the system may alter responses, leak data, or trigger tools with delegated permissions. The core failure is boundary collapse between data and directive, which turns ordinary content ingestion into an execution risk.

Q: How do security teams know runtime AI guardrails are actually working?

A: Look for blocked poisoned inputs, flagged anomalous outputs, and traceable enforcement before responses reach users or downstream systems. If controls only inspect prompts or only inspect outputs, they leave a gap that attackers can exploit through manipulated data sources or tool responses.


Technical breakdown

Input guardrails and prompt injection detection

Input guardrails inspect messages, retrieved documents, tool outputs, and API responses before they reach the model. Their job is to separate trusted instructions from untrusted content, because prompt injection works by smuggling malicious directives into data the model is supposed to process. Effective input controls combine content classification, prompt-injection signatures, and context isolation so that retrieved text cannot override system instructions. This is especially important in retrieval-augmented generation and agent workflows, where external content is often treated as operational input rather than plain text.

Practical implication: treat every external input as potentially adversarial and filter it before the model can act on it.

Output guardrails for data leakage and policy enforcement

Output guardrails evaluate a model response before it is shown to a user or passed to another system. They are designed to catch sensitive data, unsafe recommendations, hallucinated claims, and content that would violate legal or regulatory policy. In enterprise AI, this matters because models can reproduce memorized content, echo hidden instructions, or surface confidential data from connected sources. Output controls are not a substitute for access control, but they create a last checkpoint before a response becomes an incident.

Practical implication: block sensitive outputs before they reach downstream systems, not after a user has already seen them.

Tool call authorisation for AI agents

Tool call authorisation is the runtime check that determines whether an AI agent is allowed to take a specific action, access a resource, or trigger an external service. This is the point where agentic AI starts to resemble a privileged workload, because the model is no longer just generating text. It is selecting actions. Without per-call authorisation, rate limits, scope checks, and audit logging, an agent can move from helpful automation to uncontrolled privilege use. In identity terms, this is where delegated access needs live enforcement.

Practical implication: validate every agent action at execution time and bind it to explicit, reviewable scope.


Threat narrative

Attacker objective: The attacker wants to turn trusted AI behavior into a data-exfiltration or unauthorized-action path without needing to bypass conventional perimeter security.

  1. Entry occurs when malicious instructions are embedded in user content, web pages, or documents that the AI system retrieves and processes as part of a task.
  2. Escalation follows when the model accepts the injected instruction as part of its operating context and uses its own authorized tools or data access outside intended scope.
  3. Impact occurs when the agent exposes sensitive data, issues unsafe actions, or propagates the compromised instruction into downstream workflows.

NHI Mgmt Group analysis

AI guardrails are becoming identity controls, not just model controls. Once an AI agent can read mail, query databases, or call APIs, the security question is no longer only what the model says. It is what the system is authorised to do at runtime. That makes guardrails a governance layer for delegated access, especially where AI acts on behalf of users, service accounts, or workflows. Practitioners should treat agent scope as an access problem, not only an AI safety problem.

Runtime enforcement is the real boundary for agentic risk. Training-time alignment and static policy files do not stop a live agent from being manipulated through prompt injection or tool poisoning. The decisive control point is the execution moment, when the agent decides whether to retrieve data, trigger a workflow, or hand off a response. This is where continuous verification matters most. In practice, runtime guardrails align closely with NHI governance because the AI system is effectively an identity with action rights.

Shadow AI will become a control failure before it becomes a model failure. Unapproved agents, browser extensions, and MCP-connected tools can create invisible access paths that never enter normal approval workflows. That means security teams need discovery and inventory of AI systems before they can govern them. The core issue is not simply unmanaged software. It is unmanaged decision-making with access. Practitioners should assume that discovery gaps will translate directly into privilege gaps.

AI governance debt is now a measurable enterprise risk. Organisations are adding more agents while visibility, auditability, and policy coverage lag behind. The result is a widening gap between what teams believe the AI can do and what it can actually do in production. This is exactly the sort of mismatch that creates breach conditions. For identity and security leaders, the conclusion is clear: if the agent can act, it needs lifecycle governance, auditable scope, and revocation paths.

What this signals

AI guardrails will be judged by execution-time discipline, not policy language. The organisations that succeed will be the ones that can prove an agent was constrained at the moment of action, with scope, logging, and rollback built into the workflow. Static policy documents and general AI acceptable-use rules will not be enough once agents are operating across business processes and internal tools.

Agent inventory is becoming the prerequisite for agent security. Discovery of models, tools, MCP connections, and delegated access paths should now sit alongside application and identity inventory. When teams cannot see what an AI system can reach, they cannot know where the privilege boundary begins or ends. That is why discovery and governance need to move together, not sequentially.

Runtime guardrails create an NHI governance problem as much as an AI security problem. Once an AI system can invoke tools independently, it behaves like a non-human identity with action rights. That makes lifecycle ownership, revocation, and auditability central, particularly when the agent has access to sensitive data or customer-facing workflows. Practitioners should expect AI governance to converge with identity controls rather than remain a separate programme.


For practitioners

  • Implement runtime tool authorisation for every agent call Require explicit approval checks before any model can query a database, send a message, execute code, or call an external service. Tie each call to a logged identity, a scoped policy, and a revocation path so privileged behaviour is traceable.
  • Separate trusted instructions from untrusted content Isolate system prompts from retrieved documents, emails, and user text, then scan those inputs for prompt injection patterns before they reach the model. This reduces the chance that external content can override policy or exfiltrate data.
  • Inventory AI agents and connected tools continuously Build a live register of agents, MCPs, APIs, and data sources so security teams know which systems can act, what they can touch, and which human or service identities own them. Without discovery, guardrails cannot be enforced consistently.
  • Log every permitted, blocked, and flagged decision Keep audit records for input filtering, output blocking, tool approvals, and anomaly alerts. These logs should support incident investigation, policy tuning, and compliance evidence when an AI system acts outside its expected boundary.

Key takeaways

  • AI guardrails are now a runtime control problem because agentic systems can move from text generation to tool use, data access, and workflow execution.
  • The strongest signal in this topic is not model quality but governance coverage, because most organisations still lack full visibility into what their AI agents access and do.
  • Identity, PAM, and AI security teams need shared ownership of AI agent scope, auditability, and revocation before autonomous behaviour becomes operational normality.

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 MITRE ATT&CK address the attack and risk surface, while NIST AI RMF, NIST CSF 2.0 and NIST SP 800-53 Rev 5 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Agentic AI Top 10Prompt injection, tool misuse, and runtime guardrails are central agentic AI risks in this article.
NIST AI RMFMANAGEAI guardrail governance and monitoring align with AI RMF risk treatment and oversight.
NIST CSF 2.0PR.AC-4The article's scope and access constraints align with least-privilege access control.
NIST SP 800-53 Rev 5AC-6Least privilege is the core control for restricting AI agent tool and data access.
MITRE ATT&CKTA0006 , Credential Access; TA0010 , ExfiltrationThe threat patterns include credential leakage, data extraction, and downstream misuse.

Map prompt-injection and leakage scenarios to ATT&CK and test detections for credential and exfiltration paths.


Key terms

  • Prompt Guardrails: Prompt guardrails are policy controls that limit what prompts can request, transmit, or trigger before the model responds. They are most effective when enforced centrally because application-level implementations drift over time and often fail to stay consistent across many services and teams.
  • Prompt Injection (Agentic): An attack where malicious instructions are embedded in content that an AI agent reads — causing the agent to execute unintended actions using its own legitimate credentials. A primary vector for agent goal hijacking and identity abuse.
  • Runtime Enforcement: Runtime enforcement is the practice of blocking malicious behaviour while software is running, rather than only detecting it after the fact. It monitors process activity, network actions, and privilege changes so a live attack can be interrupted at the point of execution.
  • Tool-Call Authorisation: Tool-call authorisation is the practice of making each agent action request a distinct security decision. Instead of granting broad access to the agent process, the system evaluates the specific tool, inputs, role, and context before execution, which creates a reviewable control boundary.

What's in the full article

Akto's full blog covers the operational detail this post intentionally leaves for the source:

  • The control taxonomy for input, output, data, model, and operational guardrails across enterprise AI systems.
  • The runtime enforcement pattern for blocking prompt injection, limiting tool calls, and auditing live agent behaviour.
  • The case-study walkthrough showing how an injected document can surface confidential notes in a real workflow.
  • The implementation guidance for red teaming, policy tuning, and continuous monitoring across production AI systems.

👉 Akto's full post covers guardrail categories, attack patterns, and runtime enforcement guidance in more operational detail.

Deepen your knowledge

The NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, workload identity, and secrets management for practitioners building access controls around non-human systems. It helps identity and security teams connect lifecycle governance to modern automation and agentic AI risk.
NHIMG Editorial Note
Published by the NHIMG editorial team on August 2, 2026.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org