← All AI Engineer talks

AI Engineer Europe 2026

Spec-Driven Testing for Agents With A Brain the Size of A Planet — Steven Willmott, Safe Intelligence

About this talk

Safe Intelligence CEO Steven Willmott argues that increasingly capable AI agents require implementation-independent behavioral specifications rather than evaluation datasets alone. Drawing on formal verification and robustness testing, he discusses jailbreak exposure, expanding attack surface, explicit customer-service constraints, domain-specific distinctions, input variation, and reusable specifications that remain useful when agent frameworks or models change.

Chapters

  1. 0:00Safe Intelligence and formal verification for machine-learning validation
  2. 1:13Why agent specifications must go beyond evaluation datasets
  3. 2:32Planet-sized brains, jailbreaks, and agent attack surface
  4. 5:31Business rules, domain semantics, and specification-driven tests
  5. 9:24Robustness and implementation-independent, version-controlled specifications

Talk transcript

  1. 0:00

    [upbeat music] So nice to meet you.

  2. 0:15

    I'm, I'm Steve. Um, I'm the CEO of Safe Intelligence. We're a company, we've been around for three years. Um, we really go very, very deep into ML, uh, validation.

  3. 0:26

    Um, and actually, we use formal verification techniques on... Especially, we started out on vision models, tabular data models, a bunch of other types of models, um, where we actually have the model available, and we look at whole regions of the input space and see whether or not the test points that are there actually tip over and do

  4. 0:41

    the wrong thing, um, uh, under perturbations. So that's where the company started out. We have a whole bunch of products in that space. Um, and uh, actually, yesterday, we, we released a new product, which is doing something analogous for, for language models.

  5. 0:54

    Obviously, we don't have the language model, so what we're trying to do instead is, is be very clever about how we generate edge cases and test cases. So I won't talk about the product too much.

  6. 1:02

    We have a booth, so, so come and, come and chat, chat to us, um, at the booth for that. If you've seen these ducks around, these are ours. If you didn't get one, I have a whole box of them here, so feel free.

  7. 1:13

    They say, "Think harder," on the front, so you can put that on your desk just to be reminded, um, about what you should be doing. And today, I'm gonna talk about something which is very similar to what, um, or very related to what Phil talked about just now from Braintrust.

  8. 1:26

    Uh, we like what Braintrust does a lot. Um, and I think one of the inherent problems is, like, how do you actually specify what an agent is supposed to do?

  9. 1:33

    Um, so I think pe-people are familiar with spec-driven development. This is not gonna be about developing code with specs. That's also very important. We do a lot of that in the company for the products that we build.

  10. 1:43

    This is-- But this is about how you specify what an agent or an AI system is supposed to do. And in ML, you typically use a dataset to do that.

  11. 1:50

    You basically have your dataset and you run it, all those examples, and you look at F1 accuracy and things like that. And that's sort of telling you what you want the a- what the, what you want the agent or the system to do.

  12. 2:02

    Um, but as, as we'll see, there's actually a lot more to it, um, uh, when, when you deploy things. So that's what the focus of the talk is, like, how do we actually specify what agents are supposed to do?

  13. 2:11

    And I guess my, my key starting point is this, this seems like an obvious question. Like, a smarter agent is a better agent, right? So if I have a smarter agent, I'm using a bigger model, uh, it's gonna be better at doing the job that it's supposed to do.

  14. 2:24

    Um, in, in general, you'd expect that to be right. But that's-- I think probably most people have the experience that that's not always true, in fact. Um, so there's some problems.

  15. 2:32

    Um, if you're familiar with, uh, the, the book, The Hitchhiker's Guide to the Galaxy, there's a robot called Marvin, uh, who has the brain the size of a planet, and he's normally asked to do things like make the tea.

  16. 2:42

    And he gets extremely bored, and he's extremely depressed. So this depressed robot, uh, kind of is a theme in the book. Um, if you haven't read the book, by the way, you absolutely have to read, read the trilogy, um, which is five, five-part trilogy.

  17. 2:55

    That will tell you something about the, the style of the humor. Um, in any case, Marvin, there are challenges with having, like, massive models. Some of the jailbreaks actually, uh, work better on large models because, uh, they're smarter.

  18. 3:06

    So if you en-encapsulate something in a poem and you give that to a relatively low-end model, the low-end model doesn't even understand the poem. Whereas a larger model will be like, "Oh, I can take this out, and I can execute the bad instruction that's wrapped up in the poem."

  19. 3:19

    So it's not obvious that, um, bigger is safer, and it's not obvious that bigger is better. Another thing is, if you're building agents that have a very broad remit, they can do a lot of things, that creates a lot of surface area for someone to actually exploit, and it creates a lot of surface area to test if

  20. 3:35

    you wanna be sure that the a-agent is actually doing things that you want it to do. And obviously, there is a cost issue, right? So if you're using large models to do something which is relatively simple, like, like just simple math, you're gonna be paying for tokens, and it's gonna be slower, um, rather than something that's very

  21. 3:50

    optimized. So in general, if you're building agents for deployment, for especially automated use, uh, fully automated use, there's this trade-off between smart and safe in some sense, and, um, smart and, and capable in the other direction.

  22. 4:05

    And so what you're really seeking is, like, a model or an agent that's built on a model that's good enough to perform, but it's not capable of doing arbitrary harm.

  23. 4:12

    And that arbitrary harm is, uh, kind of two parts to it. One is, you know, what kind of instructions can it receive? How flexible is it about how those are formulated, what the, what the prompts look like?

  24. 4:23

    Um, that's one part of it. And the other part is, like, what tools and tasks can it carry out in your infrastructure? So if it's able to wire millions of dollars to people, that's obviously a lot more risky than if it can just answer questions, and so on.

  25. 4:36

    Right. So this is the balance that most people-- that you're basically looking for. But how do you actually define what good looks like? I think it's pretty obvious that it's not just a dataset of inputs and outputs that, that are pretty good, and then the rest is, like, guesswork.

  26. 4:50

    Uh, and it's also sometimes hard to define what harm looks like, because maybe an agent doesn't do the right thing, um, but it's, it's kind of just failing at the task, and sometimes it's doing exactly the wrong thing when it's asked to do something bad.

  27. 5:03

    So what is this idea of spec-driven validation? Um, spec-driven testing, um, you could call it that as well. Um, it's basically, what are the things we would want to do if we were just designing the role or the task benchmark by itself, like, independent of the agent?

  28. 5:19

    So we already talked about datasets. So the ground truth, having a bunch of examples of what good looks like is one thing, so that's kinda one component. Often, we see, uh, customers that we work with also have rules.

  29. 5:31

    So if they've got a customer support agent, you wanna say things like, you know, "Don't ever give a discount more than ten percent. Uh, we don't allow refunds if, um, if, you know, it's more than thirty days past the purchase."

  30. 5:42

    And there are sort of these rules, right? So your alarm bells should be going off a little bit already because, like, how do you actually test for sure that a rule is never violated?

  31. 5:50

    It's pretty hard. Um, sometimes you also, um, have, uh, ontologies or dictionaries that are relevant. So an example would be if you're building an airline chat, um, bot- That particular airline might only fly to certain, uh, might only fly to certain destinations, so that's the relevant universe of things you need to think about.

  32. 6:09

    Um, you may have internal terminology in your company that apply to your policies that no one else in the rest of the world actually knows about, so that's also part of the spec, right?

  33. 6:17

    Because if you're gonna actually, um, build an agent, you will be building that into the agent, but if you're gonna test it, you actually need to tell the testing system what these things are and what is a, a valid substitution.

  34. 6:29

    There's domain knowledge, so you may have very specific, you know, scientific, um, finance agents, other things that are-- that need to know what ter-terms are substitutable. So if you, for example, if you do substitutions on something like, um,

  35. 6:45

    uh, you know, gross profit and gross sales, for example, if you're sort of talking to an LLM generally, it might actually confuse those two terms, but in business, they're very different things.

  36. 6:55

    Um, so this specific domain knowledge is relevant to testing as well. And then you might have rights and roles, like the agent may perform differently if you're logged in, if you're logged out, if you have certain rights and permissions and things like that.

  37. 7:06

    And then the last one, which is, um, pretty important, is robustness requirements. So one is I've got my test set. That should work, right? Um, but it m-needs to work under stress.

  38. 7:18

    So in vision, where we started out, it's things like can I detect this runway for the, the plane to land on, but can I detect it at sunset, sunrise, under fog?

  39. 7:25

    Like, and how much fog can there be? How much can the camera shake before the thing doesn't work? And that's actually similar in, in agents. You know, if you're building a customer-facing agent, could typos disrupt it?

  40. 7:35

    How many typos disrupt it? Like, how frustrated will people get rephrasing? How, how stable under change are, are the results? And so really this is... The point here is we need to go beyond the test set to have, like, task and role-specific benchmarks that are for the agent itself.

  41. 7:53

    Um, and what do you then do with that? Or maybe I already talked about some of these examples, but these are just examples of the kind of things if you had a product support agent.

  42. 8:00

    So we've worked with quite a few people doing this. So you can kind of think of it as there's an... In, in LLM land, people have started to call the eval kind of the test set, which sort of makes sense, but I just think that the eval itself, like, we have to think of going beyond the eval

  43. 8:16

    as well. There's this concept of an agent card, which comes from the A2A spec. It's been in other things as round, which describes what the agent does. It's also relevant here.

  44. 8:26

    And then obviously there's all the context around this. And if you're a company deploying agents, you kind of want your, your tests to look, um, like something that has these various elements that are relevant.

  45. 8:37

    That's a fair eval, and you want to build more and more of these tech. These look like integration tests if you're from an engineering perspective. Um, often some of these things are implicit, but you wanna make them explicit.

  46. 8:48

    So what do we... What can you do with this? So what we do with this in our platform, we do two things. We do security checks. So we actually pull the, the specs, um, that an agent is supposed to fulfill into security testing.

  47. 9:00

    Why do we do that? Generally, if you know what an agent is trying to do, you know the edges of where it's vulnerable because it's gonna be willing to talk about those domains that it's supposed to act in, right?

  48. 9:11

    So that's actually where it's most likely to be vulnerable. Second, the tasks it performs, it will have more power to act in the infrastructure on those tasks. Like, if it's a banking agent or something like that, it will have-- be able to work in that area.

  49. 9:24

    So we-- That's a place you can pull things like this spec information in. And then the robustness side is, like, does it do its job properly? Especially the robustness side, can we vary the inputs and see how, how much of a range it has in terms of answering the questions properly?

  50. 9:39

    Um, so we built a product to do this, but my, my point here is not to show the product. Um, I think it's just something if you're testing agents in any context using any infrastructure, trying to, like, be explicit about the various bits of-- that are on this slide and bringing that together is, is a useful thing

  51. 9:56

    to try to do. Um, from an industry perspective, I think there's lots of things going on, but just calling out two. I mean, there are, there are a lot of prompt management platforms that allow you to be fairly elaborate about why this test exists and things like this.

  52. 10:08

    This is all useful when you actually wanna generate, um, variants of the test because you want this context. As I said, from the A2A spec, you've got agent cards.

  53. 10:18

    They're quite long, but here's an example of a skill. Um, you would also realize that even if you have this, that doesn't give you enough to actually evaluate the agent.

  54. 10:26

    You still want to know, well, what, what range of change could be-- is, is valid, you know, uh, for maybe in this case, what kind of people could, could the meeting be booked for and, and so on.

  55. 10:38

    Um, I can talk a lot more about how it, how hard it is to create variations within these sort of envelopes that a spec might create. Um, but I think just in general, my, my point here is, like, as you think about evaluating agents, start thinking about not just the eval data set or benchmark.

  56. 10:54

    Um, uh, also think about the task and the context for the task and how you, how you capture that. So, um, hopefully, we can make Marvin a little bit happier because he has the specs and he kinda knows what he's supposed to do.

  57. 11:08

    Um, um, and then, yeah, specify the behavior of your agents. That's kind of the key thing to do here. Stay independent of the implementation because often you may, you know, may, you may be building in LangSmith or something, uh, or Vertex agents or, or, or, or so on, but then later on you may change to a different

  58. 11:25

    infrastructure. You actually wanna keep those integration tests, the little unit tests and penetration tests and, and run them independently. And this is also a way to close the loop.

  59. 11:34

    So part of our inspiration of thinking about what should go into a spec is, like, what would you need, uh, to actually run the agent automatically, get the results, and then start to iterate and try to fill the robustness gaps that have appeared?

  60. 11:46

    So it's like a backyard type of RL. It's not proper RL because you're not doing it on the model, but you're kinda like, uh, jury rigging something around the outside.

  61. 11:55

    Um, that's the key point. Um, where do we go from here? So we're obviously building product around this, but I've, I've been in computer science for a long time.

  62. 12:04

    My last company, we did API infrastructure, so if you've used OpenAPI spec, I'm a-- I apologize. It's partly my fault. So I helped write that spec way back in the day.

  63. 12:13

    Uh, so we're all about open. So we're thinking about, like, how do you express these things in a way that you could just have in a GitHub repo, pull them into whatever tool you wanna do, and then pull all the different pieces and kind of just version the hell out of that stuff.

  64. 12:26

    So if anyone's interested in stuff, love than that, love to chat. Um, that's my talk. Um, come to our booth. We have a, a game you can play. Uh, if you play by four, uh, you can win some of the Lego prizes, uh, up there.

  65. 12:39

    Uh, you need a bit of knowledge, to be fair, or you need to be insanely lucky. Um, but yeah, that's my talk. Thanks a lot. [audience applauding] [upbeat music]