← All AI Engineer talks

AI Engineer World's Fair 2026

Gadgets: Personal app vibe coding that is actually safe

About this talk

Cloudflare's Kenton Varda argues that personal AI-generated applications require a different infrastructure model from conventional centrally hosted software. He demonstrates Gadgets for collaborative whiteboarding, email filtering, and GitHub pull-request review, then describes an isolation architecture using null-origin sandboxed iframes, Content Security Policy, postMessage, Cap'n Web RPC, Durable Objects, and Cloudflare Workers to constrain potentially unsafe AI-generated client and server code.

Chapters

  1. 0:24Personal AI code generation breaks traditional cloud infrastructure
  2. 1:09From centralized feature requests to AI-personalized applications
  3. 9:07Demonstrating collaborative and personal productivity Gadgets
  4. 13:46SVG, XSS, iframe sandboxing, and Cap'n Web RPC
  5. 16:23Cloudflare Workers, self-hosting, and integrations

Talk transcript

  1. 0:00

    [intro jingle] Okay.

  2. 0:24

    Hi. All right. I've got a lot to talk about, so I'm gonna launch right into it here. Um, so Swyx says that you only get to make one point at every talk, uh, one key takeaway, and so I figured I'd just lead with that.

  3. 0:37

    My, uh, key point is personal AI codegen breaks traditional cloud infrastructure. And to clarify what I mean about that, the word personal here is, uh, is, is doing a lot of work.

  4. 0:49

    It's, uh, load-bearing, as Claude would say. Um, my point is that, um, if we want to see this future where, um, everyone has personal apps and, like, can personalize, uh, the apps that they run, um, the infrastructure we're using today, um, uh, for, for software in general is, is not the right thing, and we need something completely

  5. 1:09

    different. So to explain what I mean, um, so think, think about the way that, uh, uh, software is produced and distributed today. You have a developer in an ivory tower who builds an app and then sends it down to the, the people, the users who use the app, and many of them are happy with it, but some

  6. 1:29

    of them are not. Some of them, uh, say, "This app needs, uh, some additional features for my use case." And so they go to the developer, and they say, "Oh, great developer, will you please grant my feature request?

  7. 1:43

    Your app is literally unusable without it." And so then the, the developer's representative, the product manager, takes these feature requests and files them into Jira, where they are never seen again.

  8. 1:56

    Um, but sometimes, sometimes the product manager sees the feature request and says, "Ah, I, you know, I want that too." And then that feature request goes onto the roadmap, and the developer, um, works on it.

  9. 2:09

    And the developer is implementing all these features, features that, uh, you know, each one is only used by a small subset of users, and each one is adding all these if statements to their code and making things messy, and, uh, they don't like it because the code base is becoming a mess, and each of these features are

  10. 2:26

    really kind of boring to implement. And so the developer says, "Ah, I know what I need to do.

  11. 2:32

    We need a rewrite. We need to-- We need a new architecture that has a plug-in system, and then every one of these features can be a plug-in, and it can be nice and clean and easy to build, and the core can stay clean."

  12. 2:48

    And so the developer goes off and starts working on the, the new architecture with the plug-in system, and, uh, there are still feature requests coming in. And the developer says, "Well, we can't do those features yet because, uh, we need the plug-in system.

  13. 3:03

    This will be so much easier once we have the plug-in system, and if we do it now, we're just delaying that, and we'll just have to redo it later anyway."

  14. 3:09

    And so, um, the years go by, and, uh, the new architecture is not ready yet, and none of the features are being implemented, and people are saying, "What are they doing?

  15. 3:21

    This developer has given up their product," and, uh, everybody is sad.

  16. 3:27

    So AI seems to present a new alternative to this. What if, uh, the developer could create their app, the first version of their app, give it to the users, and the users, if they need a new feature, could say-- uh, could ask their AI agent to write that feature just for them, add it to the app?

  17. 3:51

    Um, then everyone gets the features they need. No one is bogged down in everyone else's features, uh, and the developer gets to keep the, the core app nice and clean and beautiful.

  18. 4:03

    But there's a, there's a problem with this, which is that none of the, the infrastructure we build software on today is, like, remotely designed for this. You've got, uh, Apple and Google for the past fifteen years, uh, gatekeeping their systems to the point where there's, like, five companies that can build mobile apps now, and, uh, 'cause everyone

  19. 4:26

    else has been banned. Um, and it's almost, like, easier to, in the United States, to buy a gun than it is to, like, get access to your own phone to, like, install unsigned software.

  20. 4:36

    You go to Google, and you say, "I want to install unsigned software," and now they're gonna say, "Oh, whoa, hold on, buddy. Uh, you seem upset. Uh, you should, uh, go home and think about this.

  21. 4:46

    Uh, if you still want that unsigned software in twenty-four hours, yeah, then you can come back and talk to us."

  22. 4:53

    Um, [laughs] fortunately, we have a workaround for all of that, which is the web. On the web, everyone can build whatever they want, and it turns out it's fine. It's not the security disaster that Apple and Google keep telling us would happen.

  23. 5:07

    So you can build whatever you want on the web, but there's a different problem on the web, which is that for the past, uh, twenty-five years of, uh, cloud architecture, we've been running in the wrong direction.

  24. 5:21

    Uh, w- when you distribute a web app,

  25. 5:25

    you run it on your own server. Like, put it on your server, and then users send requests to your server where the one version of your app, the one, um, you know, blessed version runs, uh, for every single user.

  26. 5:39

    And so that's convenient for developers. That's why we've done it is so the developer can make sure things stay updated and everyone's on the same version. But, um, it obviously means that users cannot customize their apps.

  27. 5:53

    So, you know, last year, uh, vibe coding comes along, and we have all these vibe coding, um, uh, platforms out there, and the-- most of them are-

  28. 6:05

    Targeting web apps because that's the easy thing to target, but they're all targeting this existing infrastructure, which is actually, like, not the right way to do it.

  29. 6:14

    Um, we need something entirely different, and hence my point. Do you, uh,

  30. 6:22

    do you like how the word breaks kind of wiggles every now and then?

  31. 6:25

    That was, uh, that was something Claude put in there, and, uh, it was so stupid, I just had to keep it. Um, uh, I wanna know where in Claude's training data it, uh, it, it learned that you could make words wiggle to give them emphasis 'cause, like,

  32. 6:42

    I, you know, I understand the red, I understand the underline, but, uh, the wiggle, like, I don't think that's, that's from humans. I thi- I think that's an AI original. [laughs]

  33. 6:53

    Thi- this is ASI, folks, uh, you know. This is beyond my puny human brain's ability to comprehend. Um, anyway,

  34. 7:03

    uh, so you might be wondering at this point, like, who is this, this guy who hasn't introduced himself up on stage, um, giving a Richard Stallman-esque rant about how we should have the freedom to modify our own software, and what does he know about, uh, cloud infrastructure?

  35. 7:17

    So I'm Kenton Varda. I created Cloudflare Workers. I started the project, um, back in 2017 when I joined Cloudflare. I am still the lead engineer today. Um, it now is, uh, you know, it's a serverless application hosting platform.

  36. 7:32

    We have millions of developers. We serve trillions of requests per day.

  37. 7:36

    But what I'm gonna talk to you a little bit about today is, uh, sort of a side project I've been working on on top of Workers which is, um,

  38. 7:45

    uh, designed to... I- is my exploration in how to, uh, uh, solve this problem.

  39. 7:52

    So, uh, this thing you're looking at right now is actually a little app that I created in this platform. But,

  40. 8:00

    um, going to the, the front page here.

  41. 8:04

    So you have your, your vibe code prompt. You know, these things are a dime a dozen. Um, you s- all seen this before, but I'm just gonna put in a little prompt to ma- to show that it works.

  42. 8:13

    Uh, make a silly counter app. Silly max it.

  43. 8:20

    Something silly. All right. But I'm not actually gonna sit here and watch it. Oh, no, it said error.

  44. 8:29

    Yep, the internet doesn't work. That's okay. That's not the most important part of my talk. So, um,

  45. 8:37

    huh. So wh- what I w- what I want you to understand about this environment

  46. 8:45

    is, uh, this is not like your typical vibe coding environment where you're deploying apps to a webpage. This is, um, uh, y- you need to think about it more like a, like an Office suite.

  47. 8:58

    So think about Google Docs. You open Google Docs, you have a bunch of documents, hundreds, maybe thousands of documents. You open one, you edit it, you share it with people.

  48. 9:07

    This is the same thing except instead of documents, you have gadgets, and each gadget is an application with code. They can all be different code. I have, um, I have an app here which is, like, a collaborative whiteboard app.

  49. 9:21

    Like, this is a one-shot prompt. Um, I have a, uh, an app here which... So I get a lot of email in Spanish. It's a long story. I don't know Spanish, but I need help, like, filtering all the Spanish email.

  50. 9:34

    So I made a little app to help me do that, uh, a gadget. Um, I have a gadget to help me sort, uh, pull requests that I need to, uh, review on GitHub.

  51. 9:44

    And, uh, but those are, you know, things that I just, like, vibe coded from scratch, but we also have this concept over here of blueprints. And, um, a blueprint is someone made a gadget, and they decided that it was useful, and they took a, a blueprint of it, which is just taking the code, exporting the code without

  52. 10:04

    the data, which they can then share with someone else, and then other people can, uh, instantiate gadgets from these blueprints.

  53. 10:12

    So, um, we have like a, you know, document editor app here, a Kanban board, and, um, uh, a slide builder. So, like, you know, typical Office apps. Uh, I'm gonna instantiate...

  54. 10:24

    So, so this, this slide builder, um, was built my, my colleague Philip here, um, who's a product manager at Cloudflare, and of course, these days, all product managers are also prolific engineers.

  55. 10:35

    Um, so he, you know, he vibed this in, in an afternoon, I believe. But, uh, if I instantiate this gadget, I get this nice little slide deck. Um, you know, it has things.

  56. 10:46

    I can edit it and so on. Yay. And if I shared it, it would... Well,

  57. 10:52

    so an important point here is that when I instantiate this app, it is only for one slide deck. If I want multiple slide decks, I make multiple instances of the gadget, uh, one for each.

  58. 11:04

    And the reason for that is that all gadgets are, um, shareable and, uh, you know, you can collaborate with other people on them. And the sharing model is implemented by the platform instead of by the app itself.

  59. 11:18

    So if I click up here, I get sort of a, a share dialog, kind of like a Google Docs share dialog, and I can create a share link and send it to people.

  60. 11:25

    And, uh, because each gadget is just the one thing that you wanna share, that means that the platform can implement the sharing model and the access control such that the gadget itself can't possibly get that wrong.

  61. 11:40

    So I'm gonna go over to actually another instance of the same, uh, slides app. This is the, um, the slides I originally wrote for this talk, which yesterday I decided, uh, these slides were trash, and I threw them all away and rewrote it.

  62. 11:55

    Um, but the, the reason they're bad is, is entirely my fault. It's not Philip's fault. It's, uh, not the software's fault. Um, but this, this can still serve as an example, uh, to, to demonstrate some of what you can do on this platform.

  63. 12:10

    So if I, uh, click on here, I can see the conversation. You know, of course, I didn't edit the slides myself by hand. I asked the agent to make them for me, right?

  64. 12:19

    Um, and every app in this platform automatically integrates with agents so that you can do that. And so what I did is I gave Claude a link to this document, this Google Doc, where I had described all of the gadgets that I wanted or the, all the, the slides that I wanted in my, um, in my presentation.

  65. 12:41

    And crucially, though, this is the interesting point, I said, "If you need, uh, if you need to add any new features to the Slides app itself to support some of these slides, feel free to do so."

  66. 12:54

    And it did. Um, Claude read all the code for the app and read my doc and said, "Yes, actually, let's see. Slide three needs a, uh, strikethrough formatting. That's not implemented."

  67. 13:06

    Um, we can add that. Um, some of the slides require things to be centered and, you know, I guess Philip's design taste is too good for centering text, uh, but my, uh, more pedestrian taste called for some centering, and that's okay.

  68. 13:21

    Claude can add that. Um, more interestingly, slides, uh, five and six here, so I asked for this, like, really crappy diagram of the cloud, right? And the, the app, um,

  69. 13:36

    didn't support sort of, like, arbitrary diagrams. It supported, you know, uh, box diagrams and arrows and such, but not an arbitrary drawing like this. And so Claude said, "Okay, that's okay.

  70. 13:46

    We can add a feature. We'll add a feature that allows, uh, you to insert a bunch of SVG." Just paste it into this box here, and now it becomes, uh, part of the slide.

  71. 13:56

    And now that's not very useful for any human, but it was perfectly useful for Claude, who then generated the SVG.

  72. 14:03

    Now, at this point, you might be looking at this and saying, "That's a little scary. SVG can contain JavaScript. Uh, are there XSS bugs here?" And the answer to that is, uh, it doesn't really matter because of the way this environment is set up.

  73. 14:18

    So the UI that you see for the app here is running inside a null-origin iframe sandbox, um, with Content Security Policy set so that it basically cannot talk to anything, any of the rest of the world, can't access any cookies, so on.

  74. 14:35

    Um, the only thing it can do is postMessage to the parent frame. And through that postMessage channel, we set up a, a Cap'n Web RPC, uh, session, which forwards onto the server and all the way back to the server code for this gadget, which is, uh, this code here, which is written as a, a Durable Object on

  75. 14:58

    Cloudflare Workers. And, uh, basically, that means-- So, so this, this server code runs in a dynamic worker sandbox, uh, on the server side, where it too is prevented from talking to any of the rest of the world.

  76. 15:13

    So now we've set up this environment where there's a Vibe-coded client and a Vibe-coded server, and they can only talk to each other and produce the UI, uh, for the user.

  77. 15:23

    And so if you have an XSS bug, it actually doesn't end up mattering because it, it can't leak anything. Um, they're prevented from doing so, and it'll basically-- There is no security bug you can have in this code that matters.

  78. 15:38

    Um, and that makes it safe to, you know, go and do things.

  79. 15:44

    So, uh, I, uh, there's a whole lot that I would like to talk about that I won't have time for here, unfortunately.

  80. 15:53

    So the, um, uh... So there, there, like, for instance, the, uh, we created a whole system by which these apps can talk to external services in a safe way, but I could give, you know, two more talks about that.

  81. 16:11

    Um, we created, um, uh, there's a lot of stuff here.

  82. 16:18

    The, the points that I wanna make in the time that I have left, though, is,

  83. 16:23

    so everything you see here is, uh, is built on-- Everything except for the LLM is built on Cloudflare Workers. Um, a lot of people don't know this, but you can actually build complex apps on Workers.

  84. 16:35

    There are no containers involved here. There's just dynamic workers. There are no, there's no database involved. It u- just uses Durable Objects. Um, and furthermore, all of this is actually running locally on my laptop, which is why it doesn't matter that, uh, the internet didn't work.

  85. 16:52

    Because, uh, so this is all running on, uh, workerd, which is our open source runtime. A lot of people don't know this, the Cloudflare Workers runtime is open source.

  86. 17:01

    You can self-host it. And I'm excited about that because we have in here a, uh, home assistant, uh, connector and a Spotify connector, and I wanna run this in my basement and, uh, use it to do home automation tasks.

  87. 17:17

    Um, so this is where, though, I have to give a little bit of an apology. Um, so a couple of months ago, when I submitted the, the, uh, the proposal for this talk, this was, like, a side project I was working on.

  88. 17:33

    And the plan was I was gonna come here, and I was gonna present it, and then I was just at the end of the talk gonna yeet it onto GitHub so that everyone could go and download it and play with it themselves.

  89. 17:43

    In the last couple of weeks, um, there's been a lot of excitement inside Cloudflare, and this has become a more serious project. And so last Thursday, Dane, our CTO, pulled me, uh, into a room and said, "Kenton,

  90. 17:58

    I don't think you should yeet this. I don't think this is yeet material. I think we need a, uh, we need to be more careful and disciplined and intentional about how we release this.

  91. 18:08

    So let's hold it off for a few weeks." And I was pretty upset about that because I promised in the abstract that I was going to open source it, but sorry.

  92. 18:17

    Uh, that's not happening today. It will happen soon, though.

  93. 18:21

    Um, and I wish the silly counter worked because GPT makes some silly counters, but, um, oh well, it's not a big deal.

  94. 18:31

    And that's, uh, that's all I got. [audience applauding] [upbeat music]