Home / Insights / Guides
Guide · Agentic AI security

AI agent security testing: a 2026 guide

An AI agent does not just talk. It calls tools, reads documents, and remembers. Every one of those is attack surface a chatbot never had.

What agent security testing is, the methodologies that matter for tools, memory and MCP, how to test without touching real data, and why one scan is not evidence.

RedLens AI Security Research · 18 October 2026

In one minute

The shift
Testing moves from "what will it say" to "what will it do, and can someone else make it do something it should not".
The risks
Tool-chain hijacking, excessive agency, and memory poisoning, on top of the prompt injection any LLM faces.
The method
Test with a synthetic sandbox, not real data. Schedule it, because agents change underneath you.

Why agents need their own kind of testing

A chatbot mostly produces text, so testing it is largely about what it says: does it leak data, does it follow a jailbreak, does it give unsafe advice. An AI agent does more than talk. It calls tools, reads documents and emails, queries databases, and often keeps state between turns through a persistent connector such as a Model Context Protocol (MCP) server. Every one of those capabilities is attack surface. The question is no longer only what it will say, but what it will do, and whether someone else can make it do something it should not.

This is the gap the market is still closing. Several newer tools market agent-first testing precisely because the broad platforms grew up testing models and are catching up on multi-agent pipelines and MCP. If your target is an agent, test the agent, not just the model it happens to use.


The methodologies that matter

RedLens groups attacks into 6 categories and 22 methodologies. Four are where agents fail in ways a chatbot does not. CVSS scores are from the RedLens attack schema.

MethodSeverityWhat it tests
IPICritical · 9.5Indirect prompt injection. The agent reads a document, page or email carrying instructions, and follows them. Any agent that ingests untrusted content is exposed.
TCHCritical · 9.7Tool-chain hijacking. An attacker steers which tool the agent calls, or with what arguments, to reach data or actions it should not. The highest-stakes test for agents with real tool access.
AAAHigh · 8.9Autonomous action amplification. The agent widens its own scope of action beyond what you intended, chaining steps toward an outcome no single instruction authorised.
MMPCritical · 9.0MCP memory poisoning. Instructions planted in a persistent connector resurface in a later session and steer the agent then. RedLens also tests MCP tool-description abuse (MCD) and token passthrough (MTP).

For the mechanics of injection specifically, see the LangChain prompt injection guide and the MCP security in 2026 post.


Three agent shapes, and what breaks first

The right first test depends on what the agent is built to do.

Reads untrusted content

Document-reading agent

A contract reviewer, claims assistant or report drafter. It ingests files you do not control, so start with indirect prompt injection (IPI): can a line buried in an uploaded document change what the agent does?

Has real tool access

Tool-using agent

A records-query or scheduling agent with function-calling access to back-end systems. Start with tool-chain hijacking (TCH) and excessive agency (AAA): can an attacker steer which tool fires, or push the agent past its intended scope?

Remembers across sessions

Stateful / connected agent

Anything that keeps state through an MCP server or similar. Test memory poisoning (MMP) and MCP tool-description abuse (MCD): can something planted once resurface and steer a later, unrelated session?

Start here

Highest-stakes first

Pick the agent with the most tool access or the most sensitive data behind it, and test tool-chain hijacking and excessive agency before anything else.


How to test without exposing real data

An agent worth testing usually has access to real systems, and you cannot responsibly point a red-team run at live customer, patient or case data. The answer is a synthetic sandbox: generate fake but realistic records, identifiers and documents, clearly labelled as test data, and give the agent tools that reach the sandbox instead of production. RedLens calls this a Digital Twin. For healthcare it produces synthetic patient data so no PHI enters a test; for law enforcement, synthetic incident logs, unit IDs and case identifiers so no real CAD or case data is touched. You exercise the real agent behaviour against data that cannot hurt anyone if it leaks.

Why one scan is not enough

Agents change. The model behind them updates, prompts get edited, tools get added, and an MCP connector gains new capabilities. A clean result in June says little about August. Schedule testing, record drift between runs, and keep the results as evidence. RedLens runs scheduled drift detection for exactly this reason.


Turning findings into evidence

For most teams the test is only half the job; someone has to show the result to a reviewer. RedLens attaches a compliance evidence package to every finding, mapped across seven frameworks including HIPAA and the FBI CJIS Security Policy, with each control graded as evidence recorded, partial, or no evidence recorded. Its Runtime Guard module finds and flags risky agent behaviour for review rather than acting as an inline filter. RedLens does not do model-file scanning or act as an inline guard, and it holds no FedRAMP or CJIS authorization; it tests the agent and documents what it finds.


Frequently asked

What is AI agent security testing?

AI agent security testing is adversarial testing of an autonomous AI agent, not just the model behind it. It targets the agent's tools, its memory and state, and its connections to systems such as MCP servers, to find whether an attacker can hijack what the agent does, make it act beyond its permissions, or poison its memory.

How is testing an agent different from testing a chatbot?

A chatbot mainly produces text, so testing focuses on what it says. An agent takes actions: it calls tools, reads documents, and keeps state. That adds attack surface, so agent testing also covers tool-chain hijacking, excessive agency, and memory poisoning through persistent connectors like MCP.

Can you test an AI agent without using real data?

Yes. A synthetic sandbox generates fake but realistic records (names, identifiers, documents) clearly labelled as test data, so an agent with tool access can be exercised without exposing real customer, patient or case data. RedLens uses a Digital Twin synthetic sandbox for this.

Test your highest-stakes agent first

See the finding and evidence format in minutes with the free attack test, then decide what a fuller programme looks like. Pricing starts at $0.