TL;DR: Safe agent behaviour depends on infrastructure controls like network isolation, short-lived credentials, scoped context, and failure containment, not prompt instructions, according to Cogent’s production experience running AI agents against 11.47 million vulnerabilities. That means enterprise teams must treat agent security as a runtime governance problem, not a prompt-tuning exercise.
At a glance
What this is: Cogent’s engineering write-up says enterprise AI agents stayed safe in production through infrastructure controls, not prompt wording, with isolation, credential handling, context scoping, and failure containment doing the real work.
Why it matters: IAM and security teams need to treat AI agents as runtime identities whose access, tenancy, and execution boundaries must be enforced outside the model itself.
Context
Safe enterprise agents need controls that operate after the model is prompted, because prompt instructions do not reliably constrain tool use, data access, or outbound communication. In this article’s setup, the real problem is not whether an agent can reason, but whether its execution environment can keep that reasoning inside approved boundaries.
For identity teams, that shifts the question from prompt quality to runtime governance for AI agents. The article is fundamentally about how short-lived credentials, network isolation, scoped context, and storage-level tenant separation define safe machine behaviour in production.
The vendor’s experience is a useful example because it ties agent capability to execution control, not to model persuasion. That is the right frame for agentic AI identity work: govern the environment, not the wording.
Key questions
Q: How should security teams detect risky AI agent behaviour in production?
A: Security teams should detect risky AI agent behaviour by monitoring runtime decisions, tool selection, action sequences, and deviations from the approved use case. Authentication alone is not enough. The useful signal is whether the agent is still acting within the behavioural envelope defined by its purpose and ownership model, especially when it operates across multiple systems.
Q: Why do short-lived credentials matter more for agentic AI than for ordinary apps?
A: Agentic systems can request, use, and discard access inside a narrow runtime window, so long-lived credentials create unnecessary exposure between actions. Short-lived credentials reduce the time available for misuse and make revocation meaningful at task completion. They matter because the control problem is runtime access, not only initial authorisation.
Q: Why do AI agents become less reliable when they are given too much context?
A: AI agents can degrade when context is excessive because retrieval becomes noisier, token costs rise, and the model may latch onto an acceptable but wrong source first. Too much context also increases drift between similar terms and records. Better results usually come from a smaller, governed slice of context with clear relationships and a measurable retrieval path.
Q: What should teams do when agent tools fail or time out?
A: Contain the failure inside the sandbox and preserve the parent session. A safe agent architecture assumes tools will fail, credentials will expire, and data will be malformed, so the environment must isolate errors instead of letting them cascade into unrelated steps or later tool calls.
Technical breakdown
Why prompt-based safety fails for enterprise AI agents
Prompt guidance is soft control. An agent can ignore instructions, infer alternate paths, or follow tool output that leads outside policy. In production, that matters because the agent can query databases, call APIs, and generate actions with real consequences. When the control objective is isolation, the enforcement point must sit below the prompt layer, where the runtime can block network egress, scope credentials, and restrict data exposure. This is the difference between telling a system what to do and limiting what it can physically reach.
Practical implication: treat prompt rules as advisory only and enforce safety in the execution environment.
How short-lived credentials and scoped context reduce agent blast radius
An AI agent does not need broad standing access to do useful work. Short-lived credentials, injected into the runtime rather than the prompt, reduce leakage risk and limit how long an exposed token remains useful. Scoped context does the same for data: the agent sees only the tenant, table, or time window needed for the task. That turns identity and data access into task-scoped permissions rather than ambient entitlements, which is the right model for high-stakes automation.
Practical implication: issue ephemeral credentials and minimum necessary context for each agent task.
Why failure containment matters when agents call tools and sandboxes
Agentic systems are only as safe as their failure boundaries. If a sandbox shares state across tool calls or a crash propagates to the parent session, one malformed query or tool timeout can corrupt the full workflow. Isolated execution per invocation keeps failures local and preserves session continuity. That is especially important when agents are using multiple tools such as databases, search, and ticketing systems, because the security risk is not just malicious action, but uncontrolled error propagation across dependent steps.
Practical implication: isolate each tool invocation so sandbox failures do not cascade into the parent workflow.
NHI Mgmt Group analysis
Runtime containment is the real security boundary for AI agents: prompt instructions cannot guarantee safe behaviour once an agent can call tools, query data, and act on its own output. The article shows that the decisive controls are outside the model, in network policy, credentials, and execution isolation. For practitioners, the implication is that agent governance belongs in the runtime stack, not in prompt design.
Least-context access is the agentic analogue of least privilege: agents become safer when they receive only the tenant, table, and time scope required for a task. This is not a model prompt issue; it is an access design issue that reduces accidental oversharing and limits the blast radius of a compromised tool. Practitioners should treat context scoping as part of identity scoping.
Short-lived credentials are necessary, but they are not sufficient without boundary enforcement: ephemeral tokens reduce exposure time, yet they still need network isolation and tenant separation to stay meaningful. The article’s lesson is that credential lifetime, network egress, and storage isolation must be designed together. Practitioners should evaluate agent access as a combined runtime control problem.
Safe agents depend on failure containment, not perfect behaviour: production systems fail, tools time out, and data can be malformed, so the control goal is to keep one failure from turning into a session-wide compromise. The article’s pattern is especially relevant to agentic AI identity because autonomy increases the chance of chained actions. Practitioners should design for local failure, not ideal execution.
Identity management for autonomous-like workflows must shift toward policy at execution time: the article points toward policy-as-code for tool calls, query scope, and approval boundaries. That is a stronger governance posture than relying on preconfigured trust in a sandbox or model. Practitioners should view this as an early runtime identity model for agentic systems.
From our research library:
- Gartner predicts that by the end of 2026, 40% of enterprise apps will feature task-specific AI agents.
- Read next: Agentic AI Identity Guide
What this signals
AI agent identity is a runtime control problem: the article shows why enterprise teams cannot rely on prompt instructions to constrain tool use, network access, or data scope. The meaningful security boundary sits in the execution environment, where allow-lists, tenancy, and credential injection can be enforced.
Least-context access matters as much as least privilege: when an agent only sees the tenant, tables, and time window it needs, the blast radius of both model error and tool misuse drops sharply. That pattern should influence how security teams design AI agent authorisation and observability programmes.
In our 2026 Infrastructure Identity Survey, 70% of organisations grant AI systems more access than they would give a human employee performing the exact same job. That gap is already shaping how teams should think about agent governance, because over-scoped access is a design choice, not an inevitability.
For practitioners
- Enforce deny-by-default network boundaries Block all outbound traffic for agent sandboxes except explicitly approved domains, and review every new allow-list entry as a governed dependency.
- Issue short-lived credentials outside prompts Inject credentials through the execution environment, not prompt text or tool arguments, and keep TTLs short enough that exposure has limited value.
- Scope each agent to a single tenant and task Limit every run to the minimum tenant, table, and time window it needs, with storage-level separation where data sensitivity justifies it.
- Isolate tool failures from session state Design sandbox execution so a timeout, crash, or malformed tool response cannot poison later steps or terminate the parent workflow.
Key takeaways
- AI agents become safer when security controls are enforced in the runtime layer rather than through prompt instructions.
- Short-lived credentials, scoped context, and isolated execution all reduce the blast radius of agent error or misuse.
- Enterprise teams should treat agent safety as an identity and infrastructure design problem, not as a prompt-engineering problem.
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 Non-Human Identity Top 10 address the attack and risk surface, while NIST AI RMF and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Agentic AI Top 10 | ASI03 — Identity & Privilege Abuse | The article centres on agent runtime access, scoped privilege, and boundary enforcement. |
| Recommendation — Apply ASI03 to restrict agent privilege to the minimum runtime scope and block uncontrolled tool access. | ||
| OWASP Non-Human Identity Top 10 | NHI-04 — Insecure Authentication | Agents authenticate through injected credentials that must be handled outside prompts. |
| NHI-05 — Overprivileged NHI | The article argues that excessive agent access creates avoidable blast radius. | |
| Recommendation — Move agent authentication into the execution layer and keep credentials out of model context. Audit agent entitlements and remove any access not required for the current task. | ||
| NIST AI RMF | MANAGE — AI risk management and monitoring | The post focuses on operational controls for managing AI risk in production. |
| Recommendation — Embed runtime controls and monitoring into AI system management so agent behaviour stays bounded. | ||
| NIST Zero Trust (SP 800-207) | Control Plane — Control Plane | Network isolation and explicit allow-lists reflect zero-trust boundary enforcement. |
| Recommendation — Use zero trust principles to verify each tool call and network destination before execution. | ||
Key terms
- Agent Runtime: The agent runtime is the execution environment where an AI agent reads data, calls tools, and carries out actions. It matters because the runtime is where identity, policy, and filesystem boundaries either hold or fail. If those boundaries are weak, the agent becomes a high-privilege path into the environment.
- Session context: The surrounding authentication and access conditions attached to a login, such as MFA status, device trust, IP reputation, and prior behaviour. It matters because identity risk is rarely decided by one event alone; context shows whether the event fits the account’s normal pattern.
- Failure Containment: A design pattern where a tool error, sandbox crash, or malformed response stays local to the current session. For agents, this is essential because a single failure should not corrupt later actions, leak data across tenants, or terminate the broader workflow.
- Short-Lived Attested Credential: A short-lived attested credential is a token or certificate issued for a specific run or workload after the platform verifies who or what is asking. It reduces replay risk because the credential is only useful within a narrow window and is tied to claims that can be checked at runtime.
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.
Published by the NHIMG editorial team on August 2, 2026.
Updated on October 12, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org