Blog

Can AI Agents Do Real Penetration Testing? What Two Builds Taught Us

Can AI agents handle real-world penetration testing? Lead Security Engineer Richard Smith explains why his first multi-agent build failed against production applications, how a simpler single-agent design fixed it, and where agents help testers most.

5 min

Richard Smith

Blog

Can AI Agents Do Real Penetration Testing? What Two Builds Taught Us

Can AI agents handle real-world penetration testing? Lead Security Engineer Richard Smith explains why his first multi-agent build failed against production applications, how a simpler single-agent design fixed it, and where agents help testers most.

5 min

Richard Smith

Blog

Can AI Agents Do Real Penetration Testing? What Two Builds Taught Us

Can AI agents handle real-world penetration testing? Lead Security Engineer Richard Smith explains why his first multi-agent build failed against production applications, how a simpler single-agent design fixed it, and where agents help testers most.

5 min

Richard Smith

Richard Smith

Richard Smith

Lead Security Engineer

In this article

No headings found on page
No headings found on page

Join our newsletter

Receive the latest advancements, playbooks, and industry insights in software change security understanding.

We'll store and process this information in line with our privacy policy to provide you our products and services. You may opt out of this at any time.

The AppSec AI Paradox

In my research, System Prompt to System Compromise, I address a pressing question facing application security engineers today: can AI agents perform effective penetration testing?

In the current security landscape, two contrasting narratives exist. On one hand, agentic AI is envisioned as a force capable of uncovering hidden zero-day vulnerabilities. On the other hand, vulnerability disclosure programs are drowning in low-quality reports generated by unguided AI models.

As a lead security engineer at Cytix, my research shifts the focus from asking whether AI can find basic vulnerabilities to evaluating whether AI agents possess the operational competency needed for real-world pentesting and vulnerability validation.

"Over one hundred million tokens consumed on single tasks with zero actionable security findings"

The Pitfalls of Over-Engineering in Version 1

My initial iteration, Version 1, served as a cautionary tale in multi-agent complexity. We designed a system with an orchestrator delegating tasks to specialised sub-agents for testing and validation. In practice, this fragmented architecture created isolated context silos where decision-making data failed to flow back up the execution chain.

Providing vague instructions, such as asking the system to find all vulnerabilities in an authentication module, triggered non-converging loops. Tooling bloat compounded these failures, as raw browser snapshots and DOM logs saturated the context window with ten thousand to one hundred thousand tokens per turn.

This led to severe context drift, non-converging execution runs, and over one hundred million tokens consumed on single tasks with zero actionable security findings.

Beyond Synthetic Benchmarks

A major takeaway from my early evaluation phase was the gap between synthetic benchmarks and production environments. Evaluating Version 1 against gamified vulnerable applications like OWASP Juice Shop provided a useful baseline for verifying tool call mechanics. However, such open-source environments feature simple logic and predictable structures that do not reflect modern enterprise security.

Furthermore, extensive public write-ups and target source code are often embedded within model pre-training data. In our experiments, frontier models like Claude Opus recalled plaintext credentials directly from memorised training datasets rather than performing genuine security analysis. When deployed against complex real-world applications with multi-factor authentication and intricate business logic, benchmark-oriented agents failed.

Radical Simplification in Version 2

To establish real-world reliability, my team pivoted to Version 2 with radical architectural simplification. We replaced the multi-agent hierarchy with a single agent and a single model, making system failures immediately traceable. We reduced the tool set from nearly fifty tools down to eight core utilities.

To manage memory without overloading the context window, we introduced a persistent scratchpad notebook tool. This allowed the agent to write session states, active user cookies, and execution logs directly to disk and retrieve them as needed. Coupled with prompt caching, these design changes dramatically lowered latency and operating costs.

Empirical Findings and Practical Guidance

To evaluate performance systematically, we expanded the open-source AppSec Detection Framework, incorporating seventy-five discrete vulnerability test cases spanning common weaknesses like cross-site scripting and remote code execution.

Our comparative evaluations demonstrated that scoped, structured context drastically improves detection performance across models. When provided with targeted investigation strategies and reporting rules, Claude Opus 4.6 achieved a top weighted detection score of one hundred percent, compared to forty-nine percent under generic prompting. Non-frontier models like Kimi K2.5 similarly jumped from thirty-one percent uncued to seventy-two percent scoped.

Our agentic harness significantly outpaced traditional scanners like Burp Suite and ZAP when guided by effective context.

Ultimately, my research highlights that agents excel as force multipliers for specific security validation tasks, leading to big productivity gains for testers using agents for tasks like parsing JavaScript files for hidden endpoints, testing APIs with formal specifications, and automating the discovery of complex access control and business logic flaws.

Join our newsletter

Receive the latest advancements, playbooks, and industry insights in software change security understanding.

We'll store and process this information in line with our privacy policy to provide you our products and services. You may opt out of this at any time.


Join our newsletter

Receive the latest advancements, playbooks, and industry insights in software change security understanding.

Join our newsletter

Receive the latest advancements, playbooks, and industry insights in software change security understanding.

We'll store and process this information in line with our privacy policy to provide you our products and services. You may opt out of this at any time.

Legal

101 Princess Street, Manchester, United Kingdom M1 6DD

© 2026 Cytix Ltd. All rights reserved.

Join our newsletter

Receive the latest advancements, playbooks, and industry insights in software change security understanding.

We'll store and process this information in line with our privacy policy to provide you our products and services. You may opt out of this at any time.

Legal

101 Princess Street, Manchester, United Kingdom M1 6DD

© 2026 Cytix Ltd. All rights reserved.

Join our newsletter

Receive the latest advancements, playbooks, and industry insights in software change security understanding.

We'll store and process this information in line with our privacy policy to provide you our products and services. You may opt out of this at any time.

Legal

101 Princess Street, Manchester, United Kingdom M1 6DD

© 2026 Cytix Ltd. All rights reserved.