Independent analysis by NHI Mgmt GroupSource article: Zenity, “Context Engineering Is Security Engineering. RSA 2026 Made the Case.” (April 2, 2026)

TL;DR: RSA 2026 conversations, vendor launches, and supporting research converged on a single conclusion: the AI agent context window is the real security perimeter, because more tokens reduce accuracy, dilute instructions, and expand attack surface, according to Zenity and cited research. The governance gap is no longer about model quality, but about who controls what enters context, what persists, and what gets acted on.


At a glance

What this is: NHI Mgmt Group's analysis, drawing on Zenity's blog post: AI agent security now turns on context engineering, because the context window has become the practical security perimeter where accuracy, authorization, and attack exposure meet.

Why it matters: IAM, NHI, and autonomous-agent programmes all need to govern token intake, tool access, memory, and retrieval as a single control surface rather than as separate technical concerns.


Context

The security gap here is not model quality. It is the assumption that AI agent behaviour can be governed after the fact, when the real decision point is what enters the context window and what the agent is allowed to act on.

Context engineering is a governance problem as much as a technical one. For AI agents, the context window behaves like an identity boundary because it determines which prompts, retrieved data, tools, and memory states shape runtime action.

Zenity's article frames that boundary as the new perimeter for AI agent security, with industry vendors converging on the same conclusion at RSA 2026. That makes the question operational: who controls context, and how continuously is it reviewed?


Key questions

Q: How should security teams govern AI agent context windows?

A: Security teams should treat context windows as governed trust boundaries, not as passive text buffers. That means classifying every source that can enter context, limiting it to task-essential material, and monitoring how the agent behaves when those inputs change. Governance has to cover prompts, retrieval, memory, and tool calls together because each can alter the agent’s decisions.

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 are the signs that an AI security agent is not operating with enough contextual grounding?

A: Common signs include vague recommendations, advice that ignores local ownership or SLAs, outputs that cannot be traced to source systems, and remediation guidance that does not fit the environment. If the agent cannot explain why a recommendation is correct for your organization, or if the answer feels generic rather than tied to real assets and policies, contextual grounding is probably too weak.

Q: What should teams do when prompt, retrieval, and memory controls are owned by different groups?

A: Create a single governance model for the full agent context chain. Separate ownership without shared policy leaves gaps between AI, platform, and security teams, and those seams are where context poisoning, privilege drift, and unnoticed tool misuse appear first.


Technical breakdown

Why the context window becomes the control plane

Modern LLMs do not assign intrinsic privilege to different token sources. System prompts, user input, retrieved documents, and tool output all enter the same context window and compete for attention as tokens. That creates what the article calls token democracy: once content is in context, the model cannot reliably distinguish trusted instruction from hostile or irrelevant content. As context grows, attention is diluted and safety instructions lose force, which means longer context is not just a performance issue but a control issue. In agentic systems, the context window therefore behaves like a runtime control plane, not a passive buffer.

Practical implication: Treat context intake as a governed authorization surface and minimise the tokens an agent can see at any one time.

How retrieval, memory, and tools expand attack surface

RAG pipelines, persistent memory, and tool integrations all add useful capability, but each also adds an attack path into the agent's decision process. A poisoned document, a tainted memory entry, or an over-broad tool schema can change what the agent believes and what it chooses to do. The article's core point is that these channels are not separate from security architecture. They are the architecture. That is why static scans and single-prompt detection miss the real risk. The compromise often emerges only across a chain of interactions that looks legitimate in isolation.

Practical implication: Govern retrieval sources, memory persistence, and tool permissions as one chained exposure model rather than separate checks.

Why continuous contextual monitoring is the only usable model

Snapshot scans cannot keep up with agents whose permissions, connectors, and context inputs change during runtime. The article contrasts stateless prompt analysis with stateful monitoring that tracks behaviour across sessions and tool calls. That difference matters because malicious sequences often unfold gradually, with each interaction appearing benign until the full chain is visible. Continuous monitoring keeps the current exposure state aligned to the live environment, while correlation links posture drift with runtime behaviour. For production AI agents, that is the only way to see when a context decision becomes an operational security event.

Practical implication: Move from one-time prompt review to live, stateful monitoring across prompts, tools, memory, and retrieval pipelines.


NHI Mgmt Group analysis

Context is the identity boundary for AI agents. In agentic systems, the context window determines what the system treats as authoritative, what it can act on, and what it ignores. That makes context engineering an identity control problem, not just an LLM tuning problem. The implication is that runtime governance has to move upstream to token intake, retrieval trust, and tool eligibility.

Token democracy creates an assumption collapse in AI governance. Least privilege was designed for environments where trusted instructions and untrusted data could be separated by policy and interface. That assumption fails when a model processes system prompts, user input, and retrieved content through the same attention machinery. The implication is that practitioners must rethink how privilege is expressed inside the context window, not just how access is granted outside it.

Static review cannot govern a moving agent context. Access reviews, prompt checks, and snapshot scans all assume the risky state persists long enough to inspect. AI agents modify their effective security posture as context, memory, and tools change during execution. The implication is that security ownership must shift to continuous runtime governance across the full interaction chain.

RAG and memory are now first-class security surfaces. The article is right to frame retrieval pipelines and persistent memory as operational attack paths, because they can carry poisoned instructions with the same legitimacy as trusted data. That blurs the line between content and control. The implication is that AI security programmes should classify retrieval and memory flows as governed trust paths, not convenience features.

Continuous context control is becoming the practical standard for agent security. The market convergence described in the article suggests that the category is moving away from isolated point controls toward stateful observation and policy enforcement across the agent lifecycle. That direction aligns with how NHI governance evolved once static inventories proved insufficient. The implication is that teams should prepare for context-layer governance to become a baseline expectation, not a niche add-on.

What this signals

Context-layer governance is the next control plane for AI agents. Teams that still review only prompts or only tool permissions are missing the way these systems actually fail. The stronger programme pattern is to govern the entire token path, from retrieval and memory to action and persistence.

Runtime visibility will matter more than static approval. Agent risk changes as context changes, so the useful control is continuous observation tied to current state. That pushes AI security closer to NHI-style lifecycle governance, where ownership, scope, and revocation have to follow the live identity behaviour.

Security leaders should expect context engineering to become part of the review language for AI agents, because it is where authorization, trust, and misuse now intersect. Programmes that cannot answer who controls context will struggle to explain who controls the agent.


For practitioners

  • Audit context intake boundaries Map every source that can place tokens into an agent's context window, including prompts, retrieval results, memory, and tool outputs. Classify each input path by trust level, business purpose, and whether it can alter behaviour at runtime.
  • Constrain tool and retrieval permissions Set the smallest practical permission set for each agent, with separate review for tool schemas, retrieval scopes, and any persistent memory. Time-bound access where possible so the context surface cannot accumulate standing exposure.
  • Replace snapshot scanning with stateful monitoring Track prompts, connector changes, memory updates, and tool calls as a continuous sequence rather than isolated events. Use runtime correlation to identify when a benign-looking interaction chain becomes an active security issue.
  • Review retrieval trust and compaction rules Validate which sources can be retrieved, what confidence thresholds apply, and what security instructions survive context compression. If compaction can drop guardrails while leaving payload content intact, the agent's safety boundary has already failed.
  • Assign explicit ownership for context governance Define who signs off on system prompts, retrieval sources, memory design, and MCP or tool changes. If AI, platform, and security teams own different pieces without a single accountability model, the perimeter is already fragmented.

Key takeaways

  • AI agent security now depends on controlling the context window, because the model cannot reliably distinguish trusted instruction from injected or retrieved content once it is inside the same attention space.
  • Retrieval pipelines, memory, and tool interfaces are not side features of agent design. They are the main paths by which context becomes a security problem and runtime behaviour shifts.
  • Continuous governance is more defensible than snapshot review for agents, because the risky state changes as context changes and the attack surface is often cumulative rather than single-event.

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 sets the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Agentic AI Top 10ASI03 — Identity & Privilege AbuseThe article centres on how context changes what agents can do and what they are allowed to act on.
ASI02 — Tool MisuseTool schemas and MCP traffic are treated as major agent attack surfaces in the article.
Recommendation — Constrain agent privileges to the smallest context and tool set needed for the task. Review tool access paths and block any capability the agent does not need at runtime.
OWASP Non-Human Identity Top 10NHI-05 — Overprivileged NHIThe article applies least privilege logic to agent context, retrieval, and tool permissions.
NHI-08 — Environment IsolationThe article warns that prompts, retrieval, memory, and tools blur trust boundaries without isolation.
Recommendation — Reduce standing context and permissions to the minimum necessary for the agent's task. Separate retrieval, memory, and tool trust zones so one poisoned source cannot influence all context.
NIST AI RMFMANAGE — AI Risk ManagementThe article is about operational governance of agent risk across the runtime lifecycle.
Recommendation — Embed continuous monitoring and accountability into AI agent risk management workflows.

Key terms

  • Context Window: The context window is the text a model receives at one time, including prompts, retrieved documents, and conversation history. Security teams care about it because it becomes the practical boundary between trusted instructions and untrusted content, especially when the application assembles that text automatically.
  • Token democracy: Token democracy is the property that a model does not inherently privilege system instructions over user content or retrieved documents. All tokens are processed through the same attention mechanism, which means a malicious or noisy input can compete with a safety rule on equal footing.
  • Retrieval-augmented Generation: Retrieval-augmented generation is a pattern where an AI model pulls external information before generating output. The security challenge is that access rules can weaken when data is chunked, embedded, cached, or reused, so source permissions may not automatically follow the content into the model's context.
  • Stateful security monitoring: Stateful security monitoring tracks how an AI agent’s risk changes across a session instead of judging each prompt in isolation. It preserves interaction history, compares posture drift with runtime behaviour, and helps defenders see whether the agent is merely misconfigured or actively being manipulated.

Deepen your knowledge

NHI governance, agentic AI identity, and machine identity lifecycle 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 June 6, 2026.
Updated on October 8, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org