WebAssembly Brings Deny-by-Default Sandboxing to AI Agents
Sandboxing and security dominated the conversation at KubeCon this year. WebAssembly is emerging as a strong answer for running AI agents safely. Its runtime is deny by default, so it starts with nothing inside.
Cosmonic CEO and Co-Founder Liam Randall examines that shift with Alan Shimel at KubeCon + CloudNativeCon in Salt Lake City.
From the Browser to AI Security
Wasm began as a way to bring performant languages to the web. Unlike Flash or Silverlight, it is an open standard. Anyone can participate on equal footing.
Standards for server-side Wasm have matured in recent years. Randall says Wasm now runs on phones, TVs and browsers, often unnoticed. Its security properties make it especially timely for AI.
Two Kinds of Agents
Randall sees enterprises deploying two types of agents. Engineers get general purpose coding agents with broad access. Customers get special purpose agents, like a wealth manager or retirement planner.
Those special purpose agents only need a fixed set of tools. That is where Cosmonic fits. A small footprint also allows very high density on a single Kubernetes server.
Building Better Together With Kubernetes
Randall doesn’t see Wasm replacing Kubernetes. Kubernetes still handles ingress, egress, admission control and telemetry. It also brings a large ecosystem of vendors.
Cosmonic deploys Wasm components side by side with existing containers. Engineers and security teams keep the tools they already know. Randall adds that Wasm is not a panacea, and teams should pick the right tool.
What a Sandbox Really Means
Shimel calls sandbox the most overused word at the show. Randall points to the NIST definition: only what is necessary in the runtime.
Containers are built for packaging, not sandboxing, he says. They carry tools an AI could use to break out. Each Wasm invocation gets a fresh, isolated environment, so no state carries over.
Cosmonic now writes its docs for agents as well as people. The goal is to teach AI to build more secure software with WebAssembly.
Transcript
Hey everyone. Welcome back here to our final day of KubeCon coverage. We saved some of the best for last.
The gentleman right here to my left was the first person I think I saw when I got in on Sunday- Yeah, possibly ... into Salt Lake City for this year's KubeCon. And we made an appointment to come for the interview, and I had to wait till Thursday to get it done.
Look, I think we're both super busy. Sure. This conference has been all about sandboxing and security, and that's the domain we're in.
So, it's like get in early, grind hard, and you just make new connections. Right? You jumped the shark.
I didn't introduce you yet. All right. This is my friend Liam Randall.
Liam, welcome. It's good to have you back on, man. For those who don't know Liam, he is the CEO founder of Cosmonic.
And a lot of you may have heard Cosmonic, especially if you follow Techstrong TV. We've covered Cosmonic for, six years, five years at least. A little while.
And, a lot of people may know Cosmonic about Wasm. That's right. One of the people who really pioneered- Yes, and still lead ...
WebAssembly and lead the Wasm community. But like everything else with the advent of AI, as technology changes, so is Cosmonic, so is the Wasm community. And as Liam hinted at, a lot of Wasm now is about sandboxes, about security.
Yeah. Liam, I'm going to make you the official historian of the Wasm market, of community. Sure.
Absolutely. Happy to do so. Take us from Wasm five, six years ago whenever to today.
Wasm's original idea was around how do we bring performant languages to the web. And it wasn't a new idea. People have heard of Silverlight and Flash and even Java to a certain extent had this idea.
Right. The difference is, is that Wasm is an open standard, which means anybody can participate on equal footing. And, because of that, we've seen wide embrace and adoption.
Now, Wasm is a standard, and over the last few years, we've seen standards form for server-side Wasm, which is what we specialize in, and we've seen the standards get better in the browsers and on edges. And at this point, whether people realize it or not, Wasm is just a part of your day-to-day life. It's on your TV, it's on your phone, if it's running in your app, in your browsers.
And what the current momentum in the market has done is made the technology more important than ever because it has some unique properties to it. Sure does. It is denied by default, so as a runtime, it starts with nothing in it.
And, for things like AI and AI security, it's the sort of the timely technology for what we need in order to go faster with AI. It's literally a zero trust built in, right? That's right.
Yeah. The consequence of choosing containers or microVMs for AI is that you then need to secure those runtimes. They bring a whole operating system.
And the unit of tenancy is to the OS or to the container, not to a function. So you end up with problems around reusing real estate and side effects and state in some of the existing tech. But it is also a little like comparing apples and oranges.
What we see in the market today is that enterprises want to deploy two different kinds of agents. Let's say you're a giant bank or a defense contractor, you might have 10,000 engineers, and every one of those engineers is going to get one to two general purpose agents, a quad code. And it, by definition, is going to have general access to things so that you can use it as a little AI factory for that employee.
But that is not what you want to put into production. And if you're a big bank or a big defense contractor, you might have 10,000 employees, but you might have 100 million customers. And those customers, you might want to give them a wealth management agent, a shopper, a retirement planner, a virtual CFO, a college planner.
All of these special purpose AIs. And those AIs, you will only want to have access to a very fixed and limited set of tools. And that's where Cosmonic plays.
Our runtime is denied by default, so if you can count the capabilities or tools that that AI agent needs, we're the best runtime because we deliver this secure by default approach to the tech. And because we're only giving agents a small footprint, we can run a million of them on a single Kubernetes server, which is incredible density when we compare it to the new Axon Substrate from Google, which will let you oversubscribe to 3,000 agents on a server. Now, again, that's a little apples and oranges because Google is enabling general purpose agents.
And what we're enabling is special purpose agents. True. So it is really back to a building better together story.
Choose the right tools for the problem at hand. And both of them, though, are addressing a fundamental issue, which is AI scale. That's right.
Both speed and breadth- Yep ... " Because we didn't really design it-- We just had this conversation on the gang. Do we need something other than Kubernetes?
Well, I say you go to war with the army you have. Absolutely. Yeah.
And what we got is Kubernetes. We got to make it work. And these are the kinds of things to do that.
So I think it is a nuanced discussion, but let's take this apart because it's really just two pieces. Mm-hmm. There's the compute construct that we have in Kubernetes.
Think of it as the container. Or what gVisor does is it gives you a secure layer on top of part of that container for the system calls and the network calls. That's what gVisor is doing.
What we do is we bring in a really tiny secure runtime here in the compute layer. That's where all this innovation is happening because that's where the AI wheels hit the road, if you will. Now, let's imagine a world where you wanted to put something new into play, like we'll call it a compute layer or a quantum layer, right?
A quantum layer would still need all of the other things that Kubernetes does for you. So if you are not going to use Kubernetes, you're still going to need to solve hundreds of tiny problems around ingress and egress, around admission controls, around telemetry. And the wonderful thing that Kubernetes does do is that for each one of these common control points or policy enforcement points, we have a whole ecosystem of vendors here on the show floor.
So for OpenTelemetry, Kubernetes has standard plug-ins and guardrails, and you can go and pick out of the 10 vendors that are there. So when Bailey and I analyzed this, it was obvious to us that it's a building better together story. We bring our new deny by default, secure for AI compute construct to Kubernetes because we want to hijack and use all of the investments that we've run.
And the reality is, is that WebAssembly is not a panacea. There's lots of times where WebAssembly is the right choice, and there's lots of times where it's not the right choice. Yeah.
So this really is a building better together story where, with the way that we go to market and deploy is we deploy WebAssembly components side by side with your existing containers in your existing namespaces. And it means a really simple integration story, operation story. All of your engineers already know how to use Kubernetes.
All of your security teams know how to secure it. " They love it, and it's an easy way to adopt AI faster with guardrails that you can trust. Love it.
I got a pet peeve I got to go over with you, Liam. Let's hear it. If I had to pick the most overused word at KubeCon this year, sandbox.
I agree with you. " Sure I do. There's this line in there.
I've been to see it. This word sandbox, I don't think it means what you think it means. It doesn't mean anything.
Exactly. I think, let's start with a crisp definition. Good.
If we look at the NIST definition for a sandbox- Mm-hmm ... it says only what is necessary in the runtime. And there's even a stronger definition in the intelligence community in what's called a CNSSI overlay that you need to comply with.
And they both essentially say deny by default. Right? Start with only what you need.
And containers are great, but they bring with them a lot of other tools. And what has sort of driven the-- There's two things that have driven all these AI breakouts. The first is vulnpocalypse.
Right? AI is discovering more vulnerabilities, and we can't patch them as fast. The second is, is all the ambient authority, all the tools that ship by default with a container.
It's like trying to like MacGyver in a garage. There's going to be a breakout. AI can get out, and will find a way to do that.
In our runtime, that bar is dramatically higher because the prisoner, if you will, is in a jail cell with no doors, no walls, no matches, or anything to do a breakout. Mm-hmm. Every input and output is not only highly structured, but strongly typed.
So we know how to monitor it. We know how to compose it. We're not just throwing blobs of data between jail cells, and we're certainly not reusing a jail cell between prisoners- Yes ...
where one prisoner can leave a shiv for another. Of course. Or in the AI world, you maybe call that a prompt injection.
Right. Right? Well, no, you have agents who leave messages for each other.
Absolutely. Absolutely, you do. And ultimately, when we think about the principles that go into designing a secure sandbox, containers do not meet those principles by design.
They're designed for packaging, not for sandboxing. We're designed for sandboxing. If we take a single principle, isolation, not only do we give you isolation of process, isolation of resources, I can't consume so many resources that I impact my neighbor, but also isolation of time.
I don't reuse that jail cell. Every invocation in Wasm is a new jail cell, so I'm not leaving state that can be abused by a future run. I love it.
I appreciate that. Yeah. Yeah, we- No.
Yeah, please go ahead. No, no, I'm just saying I think you've given it a great definition. I just wish we could get everyone else here to standardize on it.
I think it is. I think that we have a problem in the industry with how people have adopted AI. I think that a lot of people haven't adopted AI as a great thought partner, and they've adopted it as a thinker.
Right? And they simply just do what AI was trained on in the model. Now, what we've tried to address this by, we in February, we saw this inflection point where on our docs, we see more agents than we see people.
So we started writing our docs for agents so we can teach AI the definition, right? Like, you raise a great problem. How do we drive awareness?
There is certainly user education that goes into that. There's training, there's reference architecture, all of these kind of things, demonstrations, social proof. People want to know, what is that bank doing?
What is that org doing? Oh, I admire them. They're doing it right.
Let's copy them. The next thing we can also do is we can train the agents on how to build more secure software, which is what we're in the process of doing now. Love it.
Liam, I got to... I think these next people are waiting for us already. It's my life here at KubeCon.
Hey, you're a popular guy. No, I'm not. You always have a great conversation.
Come on. When you got a camera, that's all. I appreciate you, man.
Come on. No, come on. Always a great conversation.
Always, man. Always appreciate it, man. Hey, Liam Randall, Cosmonic.
com. That's right. com.
com. Check them out. com's not just at KubeCon.
Where are you next? We're at a DoD event next week in Arlington, Virginia. If you're in that- Check our website for more details.
Absolutely. We've got lots more coming. Well, at least till 2:00 mountain time today, and then we're done.
You need a break. Yes. But you're watching Techstrong TV.