By NHI Mgmt Group Editorial TeamBased on Tetrate: “Agent Security: What NIST Wants You to Think About Before Your Agent Calls a Tool” (April 21, 2026)

TL;DR: AI agents that call tools need access controls, sandboxing, human review, and full tool-call observability because prompt-level safety does not stop destructive actions or privilege escalation, according to Tetrate. The security boundary for agent systems sits in infrastructure, not in the model’s instructions.


At a glance

What this is: This is an analysis of tool-calling agent security, arguing that real protection comes from infrastructure-level controls rather than prompt instructions.

Why it matters: It matters because IAM, PAM, and NHI teams now have to govern agent access as a technical boundary problem, not a conversation design problem.


Context

Agents that can call tools inherit a governance problem that standard LLM safety language does not solve. Once an agent can read cloud data or run commands, the identity question changes from what it says to what it can actually execute, which is why agent authorisation becomes the core control issue.

The article frames this as an infrastructure problem, not a prompting problem. That matters for NHI governance because the real boundary is the permissions, sandboxing, and audit trail around the agent, not the wording of a system prompt.


Key questions

Q: How should security teams govern AI agents that choose tools at runtime?

A: Security teams should treat runtime tool choice as a governed access event, not a normal application call. That means task-scoped credentials, explicit approval boundaries for sensitive actions, and logs that record both the tool selected and the identity used. If the agent can change its plan, the control model must be able to change with it.

Q: Why do prompt instructions not provide enough safety for tool-using agents?

A: Because prompts cannot enforce permissions. If the agent can reach tools, credentials, or CLI commands, then a bad model output or injected instruction can still trigger unsafe behaviour unless infrastructure blocks it. Security has to be structural, with access control, sandboxing, and validation outside the model itself.

Q: When should organisations require human approval for an AI agent action?

A: Require human approval when the action could change infrastructure, expose sensitive data, move laterally across systems, or trigger a business-critical workflow that is hard to reverse. Approval is also warranted when the agent’s decision depends on ambiguous input or external data that cannot be trusted at face value. High-consequence actions need a human stop point.

Q: How should security teams log AI agent actions for audit and compliance?

A: Security teams should log AI agent actions as identity events, not just application events. Each record should include the human initiator, agent identity, approved session scope, tool invocation details, and any downstream delegation. That structure lets investigators prove whether the action stayed within authorised boundaries and gives compliance teams a defensible record of accountability.


Technical breakdown

Why prompt instructions do not enforce tool safety

A system prompt can influence behaviour, but it cannot enforce it. If an agent has credentials, tool access, or shell execution paths, the actual control plane is the IAM policy, network boundary, and runtime validation layer surrounding the model. That distinction matters because prompt injection, model confusion, or simple implementation bugs can bypass verbal constraints. In practice, safe agent design means treating the model as an untrusted decision component and the infrastructure as the enforcement layer. The agent may choose, but the platform must constrain what can be done, where, and with which identity context. See the AI Agent Security Guide. See the Agentic AI Security Guide.

Practical implication: Design agent security as a control problem at the infrastructure layer, not as a prompt-tuning exercise.

How role chaining limits agent privilege

Role chaining separates a base credential from the permissions that actually matter. The agent begins with one identity, then assumes intermediate roles before reaching a task-specific target role with bounded access. That architecture reduces blast radius because compromise of the first credential does not automatically expose the full environment. Temporary credentials, external IDs, and account-scoped trust policies are the important mechanics here. The point is not simply that access is short-lived. The point is that the agent never holds a single, all-powerful identity that can roam across environments without explicit trust transitions. See the AI Agent Authorisation Guide.

Practical implication: Use chained, task-scoped trust relationships so no single agent credential can directly reach broad production access.

Why sandboxed command execution matters for agents

When an agent can generate shell or CLI commands, it crosses from text generation into executable action. Sandbox execution contains that risk by limiting memory, CPU, runtime, storage persistence, and network reach, while validation layers block destructive commands and injection primitives. This is especially important because command generation is open-ended in ways that API calls are not. A sandbox gives you a hard runtime boundary even when the model produces a dangerous or malformed command. The security model becomes defense in depth: isolated execution, filtered commands, and constrained credentials all fail differently but together reduce the chance of a real compromise. See the AI Agent Tool and Plugin Security Guide. See the AI Agent Tool and Plugin Security Guide.

Practical implication: Run agent-generated commands in isolated sandboxes with layered validation before any production-facing execution.


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

Tool-calling agents are NHI controls wearing an AI label. The moment an agent can invoke APIs or cloud CLI commands, it becomes a governed non-human identity problem with a runtime decision layer on top. That means the security model should start with credential scope, trust relationships, and action logging rather than with model prompts. Practitioners should treat tool access as identity access, not as a chat feature.

Prompt-level safety is a policy hint, not a control boundary. The article is right to dismiss instructions like 'do not modify resources' as weak protection, because the model cannot enforce the promise it is asked to make. This is the same governance mistake seen in other identity contexts: assuming good behaviour instead of enforcing least privilege and runtime constraints. The implication is that access control must be structurally true before the model ever sees the tool.

Ephemeral execution changes the trust model more than the model prompt does. Temporary credentials, sandbox containers, and short-lived role assumptions reduce the time window in which an agent can do harm, but they also change how accountability is assigned. The practical question is not whether the agent can reason correctly. It is whether the platform can confine every action to a bounded, auditable session.

Observability is part of the control plane, not a reporting afterthought. Tool-call logs, command traces, account identifiers, and result summaries are what make agent governance testable. Without them, incident response becomes guesswork and policy enforcement becomes unprovable. For practitioners, the standard is simple: if you cannot reconstruct what the agent did, you do not yet govern the agent.

From our research library:

What this signals

Identity enforcement has to move before the model acts. Tool-calling agents expose a governance gap that only disappears when access decisions are enforced at issuance time, not when the model decides whether to behave. For teams building production agents, the next control maturity step is to verify the agent, principal and request before any tool is reachable.

Agent observability is becoming a baseline control. Once agents can touch production infrastructure, the organisation must be able to reconstruct every tool call, every credential hop, and every output that influenced a downstream decision. That makes auditability part of the runtime identity design, not an optional logging layer.

Agent goal control and tool control are converging. The same programme that governs least privilege for NHIs now has to decide which actions an autonomous workflow may initiate, which must be reviewed, and which should never be executable at all. The boundary is moving from static entitlement review to runtime authorisation.


For practitioners

  • Define agent access in IAM first Grant agents only the API operations required for one task class, and remove destructive actions from their permission set even if the model could theoretically request them.
  • Move command execution into isolated sandboxes Run any agent-generated CLI or shell command inside ephemeral containers with no persistent storage, tight resource limits, and filtered network access.
  • Add human approval before state-changing actions Require manual review for recommendations that would modify infrastructure, especially where rollback risk or outage impact is higher than the cost of delay.
  • Log every tool call with enough context to reconstruct it Capture tool name, arguments, target account, output summary, and execution duration so security and operations teams can audit agent behaviour after the fact.

Key takeaways

  • Tool-calling agents are governed like executable non-human identities, which makes IAM policy and runtime containment the real security boundary.
  • Prompt guidance alone cannot stop unsafe actions, because the model does not enforce its own permissions or tool scope.
  • Production-grade agent security depends on least privilege, sandboxed execution, human review for state changes, and full tool-call logging.

Related NHI Mgmt Group resources: Agentic AI Security Guide · AI Agent Tool and Plugin Security Guide · AI Agent Authorisation Guide · Zero Trust for AI Agents


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, OWASP Non-Human Identity Top 10 and MITRE ATT&CK address the attack and risk surface, while NIST SP 800-53 Rev 5 sets the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Agentic AI Top 10ASI02 — Tool MisuseThe article centres on agent tool calls and the risk of unsafe action execution.
ASI03 — Identity & Privilege AbuseThe article focuses on overbroad agent credentials and privilege escalation paths.
Recommendation — Constrain agent tool access to approved actions and validate every invocation before execution. Scope agent identities to task-specific privileges and block escalation through chained trust.
OWASP Non-Human Identity Top 10NHI-05 — Overprivileged NHIThe core problem is non-human identities with more access than the task requires.
NHI-04 — Insecure AuthenticationRole chaining, external IDs, and temporary credentials are central to secure agent authentication.
Recommendation — Reduce agent entitlements to the minimum tool and account scope needed for the workflow. Use strong delegated authentication and short-lived credentials for every agent identity hop.
NIST SP 800-53 Rev 5IA-5 — Authenticator ManagementThe article relies on short-lived credentials and controlled credential handling for agents.
AC-6 — Least PrivilegeLeast privilege is the main access-control principle used to constrain agent actions.
Recommendation — Manage agent authenticators with expiry, rotation, and revocation controls. Apply least privilege to every agent role and separate read-only from state-changing access.
MITRE ATT&CKTA0006; TA0008 — Credential Access; Lateral MovementThe article discusses credential exposure risk and constrained movement across accounts.
Recommendation — Map agent identity risks to credential access and lateral movement and monitor for abnormal tool use.

Key terms

  • Tool-Calling Agent: A tool-calling agent is an AI system that can invoke external functions, services, or workflows as part of its operation. Once tools are available, prompt injection can become an execution problem, because the model’s output may directly influence actions with real operational impact.
  • Role Chaining: Role chaining is the act of using one valid identity role to assume another role that expands access during the same workflow. In non-human identity governance, it becomes risky when the second role is not visible to the same control that approved the first one, creating silent scope expansion.
  • Sandboxed Execution: Sandboxed execution is a restricted runtime that limits what an agent can see, change, or call. For NHI governance, sandboxing is a containment control, not a full security program, because identity scope, mounts, secrets, and generated code can still create abuse paths inside the sandbox.
  • Runtime Authorisation: Runtime authorisation is the practice of deciding access while a task is in progress, rather than only at provisioning time. It matters for NHIs because credentials and entitlements can change risk mid-session, especially when automation or AI agents interact with sensitive systems.

Deepen your knowledge

NHI governance, agentic AI identity, and machine identity security are core topics in our NHI Foundation Level course, the industry's only accredited NHI security programme. If you are building or maturing an IAM programme, it is worth exploring.
NHIMG Editorial Note
Published by the NHIMG editorial team on October 22, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org