The Sphex is a hunting wasp that never leaves anything to chance. Her sting stops her prey completely, paralysing it without killing it. And before she carries anything into her nest, she inspects it first, every single time, even if her prey has been moved. Nothing ever enters the nest unchecked.

The AI industry could learn a lot from that wasp. To protect what matters, you have to hunt as well as guard, and the guard at the door has to behave the same way every single time.

AI can’t secure AI

Every guard we rely on works on one principle, determinism: the idea that the same situation, under the same rules, always leads to the same result. The word comes from the Latin determinare, meaning to set a boundary. A password check, a digital signature or a firewall rule gives the same answer whoever is asking. We would never accept a lock that could be persuaded to open, or a payment system that was right most of the time.

AI agents break this pattern. They do not follow fixed rules; they respond to whatever they read, which means a few carefully chosen words, hidden in an email or a web page, can change what they do. Yet today they are given access to real systems and kept in line largely by well-written instructions.

And it’s already happening. Earlier this year, researchers at Salt Labs sent a single email to an account connected to the Manus agent. The agent read it, treated the hidden instructions as its own, and ran the attacker’s code, exposing the accounts the user had connected to it. Nobody broke into anything; the agent was simply persuaded. Nor is this a weakness of one product. In a large-scale red-teaming study of around 272,000 attack attempts, every model tested could be hijacked in the same way. The lesson is that an AI agent cannot be relied on to protect itself, however well it is instructed.

The usual fix is to give the agent a supervisor. Most of the more than 450 companies now working on agentic AI security use AI for this: a second model that watches the first, scores its risk or judges whether an action is safe. The problem is that the supervisor reads the same words as the agent, and can be misled by them in the same way. When HiddenLayer tested OpenAI’s AI-based guardrails, they simply hid instructions aimed at the judge inside their attack, and the judge let it through. A recent study looked at how well AI judges spot attacks when someone is actively trying to fool them. Their accuracy fell to roughly that of a coin flip, and when several judges were combined they tended to be fooled together, because they share the same blind spots. Adding another probabilistic system does not remove the uncertainty. It only moves it somewhere harder to see.

AI to attack, determinism to defend

We took a different path, and it is why we carry the wasp’s name. The Sphex is both hunter and guard, constantly tracking her surroundings. When she hunts, she is adaptive and relentless, and her sting finds exactly the right spot. When she guards her nest, she is the opposite: she does not weigh up opinions, she cannot be talked out of her routine, and nothing gets past her unexamined. Sphex is built the same way, with each side doing the job it is best suited for.

On the attack side, we use AI, and we do it on purpose. Real adversaries are adaptive, patient and creative, so the only honest way to test an agent is to face it with something equally capable. Our red-teaming engine runs on models we have trained specifically to attack agentic systems; drawing directly on our years of experience probing production AI in the wild, and anchored by our CTO’s track record on global AI red-teaming leaderboards (including topping Lakera’s Agent Breaker and Gray Swan Arena). Rather than working through a fixed list of known tricks, it runs campaigns the way a real attacker would. It slips hidden instructions into emails, shared documents, repositories and web pages, and steers agents towards tools and data they should never touch. It poisons their memory over time, and chains together actions that each look harmless into a genuine breach. And it is trained to find attacks that work across different agent frameworks, not just to score well on a benchmark.

On the defence side, we never let AI make the call. The layer that decides what an agent may do is deterministic by design. It sits outside the model, where no email, web page or clever phrasing can reach it. Every action is checked before it happens, the same situation always receives the same answer, and every decision can be shown, step by step, to an auditor, a regulator or a customer who needs to know they can trust it.

Hunting and guarding are only part of the story, because trust also needs proof. That is the job of the third part of Sphex: tracking. Every action an agent takes, and every decision to allow or block it, is recorded together with the rule that applied and the reason why. This evidence is kept in an isolated ledger that no person (or agent) can quietly change. The result is evidence that an auditor, a regulator or a customer can actually check, already mapped to frameworks such as ISO 42001, DORA, and every emerging standard that a CEO, CIO or CISO might be judged against. Hunt, secure, track: each part does one job, and does it exactly.

Attack and defence feed each other. Every attack path our engine discovers is verified and turned into a precise, deterministic rule in the boundary. The hunter teaches the guard, so our defences are shaped by real attacks rather than assumptions, and they grow stronger every time a new attack is found. AI is free to be as inventive as possible where inventiveness helps, in finding weaknesses, and is kept out entirely where certainty matters, in deciding what is allowed.

We believe in determinism not because AI has no place in security, but because the final decision can never be left to chance. AI is already moving into our banks, our hospitals and the infrastructure our lives depend on. The people who rely on those systems deserve more than a guard that is usually right. They deserve one that has faced the toughest attacks we can build and still holds its ground, every single time, just as that small wasp does.

Hunt like an attacker. Secure with certainty. Track every decision.

Sphex is based in Cambridge, UK. To evaluate your agent architecture with an offline, read-only Trace Audit, get in touch →