Find out what AI could save you — calculate your automation ROI for free in minutes
Yowox.
News · By Alex

AI Agent Security: Five Layers for Production

Mend.io's new security framework maps AI agent and MCP risk across five layers, from user interaction and prompts to models and code.

Share
AI Agent Security: Five Layers for Production

AI agent security is no longer only a code-scanning problem. A model-driven application can be influenced by its prompt, retrieved context, user input, memory, and tools, so the security boundary extends beyond the source tree. MarkTechPost reports that Mend.io's new practitioner framework organizes the response into three moves—see what matters, fix what matters faster, and protect AI in production—with seven reusable artifacts for engineering and AppSec teams.

Definition: Production AI agent security protects the model, context, tools, runtime, data, and code that together let an AI system take action.

Example: An AI agent may read a retrieved document, select an MCP tool, query a business system, and return data, so a poisoned document or over-broad credential can become an operational risk.

Key takeaway: A team should inventory the complete agent path before deciding that conventional AppSec coverage is enough.

Business impact: A security program that sees only vulnerabilities in code can miss prompt injection, tool poisoning, unsafe permissions, and model lifecycle risks.

Why does conventional AppSec miss AI agent risk?

Traditional application security often assumes that application behavior is primarily determined by code, but an AI agent's behavior also emerges from its model, system prompt, retrieved context, user input, memory, and available tools. That difference matters when an AI agent can choose an action: prompt injection can arrive through data, a poisoned MCP tool description can redirect behavior, and an outdated model can remain in service after its maintainer stops patching it. The practical response is to shift security left while protecting the live system at runtime.

An AI agent turns this problem into an operational one because the agent can plan, call tools, and continue through multiple steps rather than only return text. An MCP server expands the connection surface by exposing tools, resources, or prompts to an AI application. Teams evaluating either system should therefore review what the agent can see, what it can call, what identity it uses, and what data it can move before expanding autonomy. More on this: Vercel’s Is Agentic Audits Website Readiness for AI Agents.

What are the five layers of the AI agent attack surface?

Mend's five-layer map gives security teams a way to separate risks that otherwise get mixed together. The map covers interaction, agent, integration, model, and code layers; each layer identifies a different place where an AI system can be manipulated, over-permissioned, or left unmaintained. The useful takeaway is to inventory all five layers instead of treating the model as the whole application.

LayerWhat it includesRisks highlighted in the framework
InteractionUser input, retrieved documents, inter-agent messagesPrompt injection, context poisoning, data exfiltration
AgentSystem prompts, configuration, memory, autonomy settingsUnsafe defaults, goal hijacking, over-permissioned tools
IntegrationMCP servers, tool definitions, plugins, APIsTool poisoning, unscoped credentials, shadow servers
ModelFoundation and fine-tuned models, embeddingsEnd-of-life models, supply-chain risk, unsafe generations
CodeAI-generated code, frameworks, SDKs, packagesVulnerable code, framework CVEs, malicious packages

The interaction layer is where untrusted content can become an instruction, while the integration layer is where a tool description or credential can change what an agent is able to do. The model and code layers still matter because an unmaintained model, vulnerable framework, or malicious package can create risk even when the prompt is well designed. Security teams can use the five-layer map as an inventory checklist and then attach an owner to each layer.

How should teams find shadow agents and MCP servers?

The framework identifies three discovery targets: shadow agents, unregistered MCP servers, and embedded AI frameworks. These assets often enter through repositories, service accounts, API keys, or network calls rather than through a central procurement process. A useful inventory therefore combines repository scanning, model-endpoint egress monitoring, service-account and key audits, low-friction registration, and continuous automation instead of relying on one annual review.

The proposed AI-BOM extends a conventional software inventory with nine fields for each agent or MCP server: identity, model dependency, autonomy level, tool permissions, credential scope, data reach, MCP endpoints, prompt location, and last review. Those fields connect ownership to authority and data access, which makes the inventory more useful during a security review. Teams should start by recording the fields they can verify and mark unknown ownership or scope for follow-up rather than treating an incomplete record as approved.

Which configuration checks matter first?

The framework's 12-point misconfiguration checklist focuses on permissions, approval, authentication, prompt governance, tool provenance, and model lifecycle. The highest-value controls described in the source include scoping credentials to specific resources, avoiding shared credentials between agents, requiring human approval for high-impact tools, keeping system prompts in version control, authenticating MCP clients, reviewing tool descriptions for injection-bearing content, and pinning model versions with end-of-life monitoring and an owner.

A narrow permission is more useful than a broad instruction because permissions constrain what an agent can do even when the model is confused. An MCP server should have an accountable owner and a defined access scope, while a high-impact tool should have an approval path that is independent of the model's own reasoning. Operators can turn the checklist into a release gate: no owner, no scoped credential, no reviewable prompt, or no model lifecycle plan means the integration is not ready for production. More on this: YC open-sources QM for Slack-based AI workspaces. See also 10 model monitoring tools for production AI. Background: How should AI agents get access to Postgres?. More on this: Firecrawl MCP in Claude: what it costs and where it breaks.

What should AI security triage automate?

The framework separates AI security triage into enrichment, prioritization, and triage, then ranks reachability, exploitability context, business context, agentic amplification, and fix availability as prioritization signals. This approach treats an AI finding as an operational risk decision rather than as a raw count of alerts. Security teams should automate the parts that have evidence and preserve human judgment where the finding is novel, high-impact, or poorly understood.

Decision areaRecommended disposition
Reachability and dataflow with well-understood classesAutomate
False-positive or true-positive assessment with evidence trailsAutomate with sampling
Tier-three or high-risk applicationsAI-assisted; human decides
Novel classes, unusual AI behavior, or no evidenceHuman only
Risk acceptance or deferred remediationHuman only and documented

Evidence is the boundary between useful automation and silent risk acceptance. The framework says every automated closure should carry an evidence trail, and a finding should go to a human when the system cannot explain why it is a false positive. Sampling can monitor error rates and trigger retraining, but sampling does not turn an unsupported automated decision into a reliable one.

How do runtime guardrails protect production AI?

Runtime protection in the framework combines guardrails, prompt hardening, policy enforcement, monitoring, and AI red teaming. The source describes an in-application Python SDK with online or isolated offline modes, plus a standalone Docker API Server that requires no code changes or Python dependencies. Teams can choose the deployment pattern that matches their architecture, but both patterns are intended to place policy checks around live AI interactions rather than relying on prompt wording alone.

Inbound guardrails can check prompt injection, jailbreaks, and out-of-policy requests before they reach the model, while outbound guardrails can check credentials, personally identifiable information, proprietary code, unsafe content, and policy violations before the result leaves the application. The framework also describes five prompt-hardening patterns: assume disclosure, separate instructions from data, constrain the blast radius, version and review prompts, and test adversarially. Operators should combine those controls with strict tool permissions because removing unnecessary access reduces the consequences of a bad instruction.

The broader AI automation stack makes the same systems point: a production workflow needs tools, permissions, guardrails, and monitoring around the model. Runtime logs can also guide later red-team work, while red-team findings can improve guardrails. That creates a feedback loop for the live system instead of treating security testing as a one-time launch activity.

What maturity roadmap does the framework propose?

The framework describes four maturity stages—Emerging, Developing, Controlling, and Leading—and aligns them with the NIST AI Risk Management Framework, OWASP AI Maturity Assessment, ISO/IEC 42001, and the EU AI Act. Its 15-question self-assessment assigns scores of 0–5 to Emerging, 6–10 to Developing, 11–13 to Controlling, and 14–15 to Leading. Teams can use the roadmap to describe their current operating level, but the score is only useful when it points to specific ownership, controls, and evidence.

The framework's practical message is that production AI security is a continuous operating discipline. Discovery becomes stale, tool permissions change, models reach end of life, and runtime behavior can expose risks that static checks do not see. A team moving from an early experiment toward controlled production should first make the agent inventory complete, narrow the tool and credential scope, keep approval and risk acceptance human-owned, and monitor both inbound instructions and outbound data.

What does this news change for AI operators?

The MarkTechPost report is a sponsored summary of Mend's guide, so readers should treat the product-specific deployment options as the vendor's framework rather than as a universal benchmark. The durable news is the structure of the problem: AI security needs an inventory of agents and MCP servers, evidence-backed triage, explicit tool and credential boundaries, runtime protection, and a maturity path. Operators can use those categories to compare their own controls without assuming that a framework or product removes the need for testing.

The practical starting point is small and concrete: list every model-connected application, record the tools and data each one can reach, require an owner and scoped identity, and test how the system responds to hostile context before granting more autonomy. That sequence keeps the source's central distinction intact—AI security has both a development-time side and a runtime side—and gives a production team a way to turn a broad warning into verifiable work.

Frequently asked questions

What are the five AI agent security layers in the Mend framework?

The framework divides the AI agent attack surface into interaction, agent, integration, model, and code layers. Interaction covers user inputs, retrieved documents, and inter-agent messages. Agent covers prompts, memory, configuration, and autonomy. Integration covers MCP servers, tools, plugins, and APIs. Model covers foundation models, fine-tuned models, and embeddings. Code covers AI-generated code, frameworks, SDKs, and packages.

How should a team discover shadow AI agents and MCP servers?

The framework recommends scanning repositories for agentic signatures, watching network egress for model API calls, auditing service accounts and API keys, making registration easy, and automating discovery continuously. The goal is to find shadow agents, unregistered MCP servers, and embedded AI frameworks before a point-in-time inventory becomes stale.

What should AI security triage automate?

The framework says teams can automate reachability and dataflow decisions, and can automate false-positive and true-positive assessment when evidence trails are available, with sampling. High-risk applications, novel AI behavior, findings without evidence, and risk acceptance should stay with human decision-makers. Automated closure should always carry evidence explaining why the finding was closed.

How can runtime guardrails protect an AI application?

The framework describes two deployment patterns: an in-application Python SDK that supports online or isolated offline modes, and a standalone Docker API Server that needs no code changes or Python dependencies. Inbound controls can check prompt injection, jailbreaks, and out-of-policy requests, while outbound controls can check credentials, PII, proprietary code, unsafe content, and policy violations.

Alex

Alex

Founder & Lead AI Writer

Alex is the founder of Yowox and lead AI writer since 2024, breaking down complex information into clear, actionable insights for thousands of readers every day. Alex has built AI automation systems for businesses since 2024, focusing on AI agents, workflow automation, and business process optimization.

Save hours. Save thousands.

Practical guides, real workflows, and the latest AI and automation news that matters — straight to your inbox.

More from Yowox