LALatent SpaceMay 24, 2026· 14:47

⚡️ Why you should build Science Fiction — Sunil Pai, Cloudflare

Sunil Pai (Cloudflare) argues that Cloudflare's Durable Objects and Dynamic Workers offer a more efficient architecture for AI agents than Anthropic's cloud-managed agents by providing stateful serverless computing and safe execution of LLM-generated code. He explains that Durable Objects enable millions of stateful serverless actors, while Dynamic Workers allow running user- or LLM-generated code in a zero-startup-time sandbox with controlled API exposure. Pai notes that no one has yet built the 'React' for agent harnesses, and the industry needs a standardized cross-platform abstraction. He recounts a personal 'slop fork' incident where his fork of Vercel’s Just Bash was misinterpreted as a Cloudflare move, highlighting the importance of candor in a tight-knit industry. He observes that open source repos have become adversarial grounds, with fake security reports being a top attack vector. Pai concludes by encouraging developers to build original 'sci-fi' projects instead of incremental improvements or chasing enterprise deals.

Transcript

Intro0:00

Host0:04

Okay, we're here with Sunil Pai, uh, creator of Code Mode.

Sunil Pai0:08

No. Uh-

Host0:08

Co-inventor

Sunil Pai0:09

... I do take credit for, uh, creation of Code Mode. Dynamic isolates have been-

Host0:12

You said no, but-

Sunil Pai0:13

... software for a while.

Host0:13

You said no, but you take credit.

Sunil Pai0:14

I did. It is mine. I, it, it is, uh... I did create, uh, f- uh... Since, since I was a child, I was... I've been thinking about it.

Host0:20

You were built for this.

Sunil Pai0:21

It's my life's, it's my life's mission.

Host0:22

I wanted to just catch up on everything going on in Cloudflare lands, and also, like, obviously you and I have caught up over the years. The more recent thing, which just launched yesterday, was this cloud, uh, Cloud Managed Agents thing-

Cloud Managed Agents0:30

Sunil Pai0:34

Mm-hmm

Host0:34

... which I, which I know that you're, you're also, like, w- interested in. Maybe we can talk about that, 'cause it's kinda like breaking news, and you seem excited about it.

Sunil Pai0:40

Cloud Managed Agents is dope because, uh, Anthropic is saying, "Here is a platform for you to build and deploy your agents that are, like, long-running."

Host0:48

Yeah.

Sunil Pai0:49

Uh, and I like it because I like the people at Anthropic, and, uh, they're super ambitious about these things. Except I looked at the product and I was like, "I think I want to compete. I think we can do something better with workers and Durable Objects."

Host1:00

Yeah. Cloudflare is the i- is an ideal platform for this. You had workflows for a while.

Sunil Pai1:04

Mm-hmm.

Core Primitives1:04

Host1:04

What is... What functionalities are available in Cloudflare? Like, why can't you just come on and say, "Yeah, we, we already had this"? Like, what, what's the difference-

Sunil Pai1:11

I think-

Host1:11

... that you see

Sunil Pai1:12

... uh, like anything else, I think we are, like, discovering the architecture of... the new architecture of building software, of which I'm talking about on stage in a couple of hours. Uh-

Host1:21

Yeah

Sunil Pai1:21

... 5:40 PM, please show up to the main stage. Uh, but interestingly, our primitive... The two primitives that I think are critical that I suspect every platform will eventually get, one is Durable Objects, which are stateful serverless programming.

Uh, I think that's a true innovation. It's the f- world's first implementation of the actor model in, on an, in an infrastructure layer, not in user land. It means you can spin up millions of these stateful things that run in the background, et cetera, and it runs with serverless, uh, characteristics instead of spinning up a whole VM.

That's one. The second, which we announced just a few weeks ago, is what we call Dynamic Workers. Famously, eval has been considered a bad idea, evaluating code, user-generated code, or now LLM-generated code, but we built this thing that lets you run it in a safe environment with zero startup time.

And when I say safe, I mean you can expose only the APIs that you want into it, and you can control all outgoing traffic. In fact, the default way we recommend people using it is to cancel all outgoing traffic and only use the exposed endpoints.

So given these things, we feel we can build a much more efficient and much sm- uh, a new kind of architecture for building AI agents. Uh, one of, o- one of the, uh, applications of Dynamic Workers, we made a little noise about it a while ago, is my colleague Matt Carrie built our MCP server.

Uh, the Cloudflare API is 2,600 API endpoints. So if you exposed a tool for each one of them-

Host2:49

Mm

Sunil Pai2:49

... you're screwed. And you could say, "Oh, I'm going to do progressive disclosure. I'm going to do this." No. We said you can have two tool calls. One is search and execute, and to each one of these, you actually submit code that we run in an isolate.

So you can say, "Here's some JavaScript code that searches the entire OpenAPI JSON," and the second time you can say, "Here's some code to actually run that. Hey, find all my workers, find the DNS things they're, uh, uh, used in, and if it starts with the letter Z, then apply DDoS protection for it."

In one tool call, no back and forth with the LLM, and it's type-checked and, uh, well, Tensor LLMs are great at running code. So this is fundamental capabilities. It's not something you can patch on in user land, so that makes me excited about Cloudflare for the future of agentic software.

Host3:36

I, I don't know if you've, you've, uh, looked at the sort of Cloud Managed Agents thing.

Host 23:40

I looked briefly. There's, like, interesting takes, right? So separate the context from what's happening, and then there's, like, a little quote about, okay, recursive models do this. Any, any takes on that?

Sunil Pai3:49

I do like their thing. Uh, they made a point of pointing out that the hardness runs separate, like, from the execution environment, because they're preparing for a world of software that hasn't existed in the past. What a wonderful way of looking, uh, towards the future, by the way.

It's not that you're just going to build the next CRUD API. We're like, we don't even know the shape of what's going to happen, and while that needs to run in a sandboxed environment, we do have ideas on how to expose capabilities and, uh, in- an intelligence layer via the hardness.

I think that's, like, excellent.

Host4:19

Yeah.

Host 24:20

Do you think that becomes sort of standardized? Like, Cloudflare is someone that would probably plug in support. Is there a standard unified layer around that? Is there bets you take, different ways that you see it? Like, everyone is building for a version of the future of software agents.

Future Architecture4:20

Host 24:34

Uh, do you have a vision, like, you see?

Sunil Pai4:37

It's so hard, but the way I'm framing it in my head is no one has built the React yet. You know? Like, the moment React came in, it wasn't... I mean, it annoyed a bunch of people because it seemed so different.

The fact that you can build a... describe a component tree with XML. I, I, I, I don't know if you remember, in 2013, people were walking out of the talk wh- while they were introducing the thing, saying Facebook hates JavaScript, but that is...

that established every framework in the future, and React is still massive. I suspect we... Everyone... Now everyone is building a hardness, and everyone's like, "Well, it should be in this shape. It should be in that shape." Uh, someone needs to come out with some original thinking around something that is reproducible across languages, across companies, across infrastructure.

I suspect we haven't done that yet.

Host5:23

It might just be Skills.

Sunil Pai5:24

Yeah.

Host5:24

I feel like Skills are the ultimate translation layer.

Host 25:27

And they're, they're a version where-

Host5:28

It's just English

Host 25:29

... they, they scale well. It's English. Uh, you know, you can abstract it down. You can create Skills on their own.

Sunil Pai5:35

Is that it? Like, by the way, I'd be so happy if you say the future of, uh, software is Markdown files. Beautiful. Instantly accessible, a multi-language, bridges the world. Uh, could just be Skills. But, like, do you, do you end up with that problem with Skills where you have to start getting more and more specific, at which point you're like, "I might as well just express it as code"?

Host5:55

Yeah, yeah. I'm being very precise about my, my stuff. Um, yeah, I mean, uh, and Skills bundle code as well, right?

Sunil Pai6:00

Right. Yeah.

Host6:01

So it is a whole, a whole bunch of things. Okay. There's, uh, there... I mean, there's other topics that we can al- also touch on. You, you are... you're, you know, happy to indulge in a lot of different ranging topics.

Vercel Drama6:10

Host6:10

Let's talk about slop forks.

Sunil Pai6:12

I love slop forks

Host6:13

What happened with you and Vercel? Let's, let's get in, let's right, get right into it. I don't know if you want to, uh, maybe s-

Sunil Pai6:18

You know what? I'm happy to talk about it.

Host6:20

Okay, yeah.

Sunil Pai6:20

Okay, I, like, I'm happy to, like, talk about it.

Host6:22

Yeah.

Sunil Pai6:22

Because-

Host6:22

Tell, tell... Some people, you know, they're not always on Twitter, so maybe they missed it, but I think it's an important event.

Sunil Pai6:29

Sure. I know, it does-

Host6:31

In, in your life

Sunil Pai6:32

... it does... Well, in my life, sure. But, like, about the importance of software. Okay, so for context-

Host6:36

Yes

Sunil Pai6:37

... okay? For context, uh, I've been in this industry long enough that I have friends everywhere.

Host6:43

Yeah, yeah.

Sunil Pai6:43

Competitors, not competitors, previous jobs, p- uh, future jobs. Uh, we describe the industry as a forest of revolving doors. Uh, it's why you maintain, like, just candor and being friendly with everyone. In fact, uh, we love Vercel's AI SDK.

A whole portion of my agent's SDK is built on top of them. We feel like we have built the best back-end for them, and we have personal relationship with them. Like, I'll be hanging, we'll be grabbing a beer with Nico, uh, as, at some point today.

But there is this tension. Twitter amplifies, like, drama, and particularly, like, management and, you know what? I kinda stay away from that. There's a little bit of tension amongst competitors, especially because the medium encourages that kind of thing.

Okay, the event is I was at JSConf. I was hanging out with Javi from Vercel, and I love him, 10 out of 10 human being. What a wonderful time I had there. I loved Spain. Uh, and I was playing with this project that, uh, Vercel Labs had just come out with called Just Bash.

I loved it. What a, what a great idea. A pure, a pure implementation of Bash in, uh, JavaScript. And I was like, "Oh, of course I wanna make some of this stuff work with, uh, Cloudflare." And the way I did it in 2026 is I just point Opus at it and I go out, like, for lunch, et cetera, right?

Like, and I come back, and it spat out 5,000 lines of code. And I'm like, "Yeah, okay, fine." Like, I'll just, like, publish it. And my entire plan there was I would... Because I look up to, I won't name names here, but because I look up to these people, I was like, "I'm gonna have a great time in Spain.

I'm gonna go back home, polish this, and on Monday, like, I'll send a PR. We'll have a issue description," which is how I interact with every other open source repo in my entire life. I went back, I crashed, I woke up, and I have, uh, DMs from, uh, Cloudflare management saying, "Have you checked Twitter?"

I go on Twitter, and the Vercel CTO is, uh, trashing my work saying, "Oh, Cl-

Host8:38

It's like, it's a, you know, one guy, you know, side projects and, and, and suddenly it's Cloudflare did this.

Sunil Pai8:45

I'm ju- exactly. It's Cloudflare did this. I was like, dude, I saw my career, like, fall apart with that message.

Host8:52

Oh.

Sunil Pai8:52

No, but that's just it. Like, that was my immediate reaction to seeing the CTO-

Host8:56

Yeah

Sunil Pai8:56

... of a $10 billion company, and I was like... I, I didn't think I would get fired, but I was just like, "Well, this is not it at all." So I responded in the most earnest way. I was like, "Bro, I wanted to talk to you.

I came back and napped." Like, I s- You know what's funny? The talk I gave at JSConf España is now online, where I talk so warmly about Vercel and Just Bash and their sandbox project.

Host9:18

Ah.

Sunil Pai9:18

This was the context it was happening in. Uh, anyway, so I wake up to this and I responded. I'm like, "I'm sorry. That's how I, I did it." And then something strange happened, which is, like, half the internet decided to, like, stand up for me, and they were like, "Sunil's the nicest guy.

Why'd you have to do this?" And I spent the next 24 hours just awash in this love.

Host9:42

So let's talk about slop forks for a while, right?

Slop Forks9:42

Host 29:44

I think we also have to mention the most recent, right? There was a leak of some repo, some cloud code leak, and what did we do? We, someone, uh, someone forked it and then rewrote it in, uh-

Host9:54

Changing the Python to-

Host 29:55

Yeah

Host9:55

... to avoid the DS-

Host 29:56

Change the Python around, yeah.

Sunil Pai9:57

Of, like, Cloudflare itself.

Host 29:57

You were the, you were the... Yeah, yeah, yeah. So-

Sunil Pai9:59

And people tagged me in those threads.

Host 210:00

Yeah, yeah.

Sunil Pai10:00

They're like, "Is this you?" I'm like, "No, that's not me."

Host 210:02

You were early, though.

Sunil Pai10:02

No.

Host 210:03

And people love that version, right?

Sunil Pai10:04

I think it's weird because of the environment. Forking is a great sign of, uh, prestige-

Host10:11

Respect

Sunil Pai10:11

... respecting my culture. You're in my culture. It's how the React community grew. It's h- like, it's one button, and it's, like, how you sh- like, no one makes money off this, bro.

Host 210:20

It's, it's very core to what open source is, right? You wanna build on it. You should take our work, fork it-

Sunil Pai10:24

Please

Host 210:24

... and do whatever. And why not port it to a different line?

Sunil Pai10:27

Like, I encourage... Like, uh, every time, um, someone talks, uh, to me about the agents SDK, they, and they tell me, "Oh, it's kinda shit. Uh, we think we can build something better," I'm like, "Bro, go for it."

Like, everyone wins if you do this. I don't make less money if I'm successful or not successful. Like, I mean, like, if you're in it for the love of the game, then do it for the love of the game.

Host10:48

Yeah, yeah, yeah.

Sunil Pai10:49

Actually, that was quite hilarious because they thought that they could get away by rewriting cloud code in Python, but I think some lawyer saw it and they're like, "Nope, this is a derivative work."

Host 210:57

Right.

Sunil Pai10:57

Like, it actually breaks copyright.

Host10:59

You know, one thing I've been thinking about slop forks is that actually you maybe want to encourage more slop forks because, uh, then you own the dependency, right? So then you don't have the, like, LLM issue. You don't have the Axios issue.

You can just vendor Axios, but in your own slop fork of Axios, and then now you own it.

Sunil Pai11:17

Yeah, no, 100%. Like, it's... Bro, it's how the inter- Like, before NPM, before whatever, like, software used to be distributed on Usenet, on email, and then you take it, you change it, you'd share something, and now the cycles have become shorter.

But I... Forking is so fundamental to how we build software.

Host 211:35

It's interesting. It's very non-agentic, right? Like, there's a lot of, will I use a microservice or will I just vibe code a little, you know, a replica for that? I, I, I-

Host11:43

Yeah, build versus buy has really changed.

Host 211:45

Build versus buy, but then there's no fork in that, right?

Host11:48

Yeah.

Host 211:48

There's no go see prior work, fork it, and adapt it, simplify it, whatever wi- We don't see that side of the pattern, right? We just see rebuild it, use it, but people don't fork.

Sunil Pai11:58

I think there's also this tendency now which is open source repos have become adversarial grounds. So on the agents SDK, for example, we had to shut down contributions. We only allow issues right now.

Host12:10

Yeah.

Sunil Pai12:10

And, like, we, we are, like, we can have the longest description there because the end result is I'm going to take a resolution and paste it into Opus. Now, whether you're burning your tokens or my tokens, well, I prefer my tokens because I'm great at asking questions.

Uh, and, uh, I do like taking credit for the Clanker work. I think open source repos have become adversarial to the point that people are almost afraid of gaining, um, popularity in that space. I've spoken to at least, like, four or five open source maintainers here, and they're like, "Yeah, it's, it's really bad out there right now."

Yeah. The worst ones are the fake security reports.

Host12:45

Yeah.

Sunil Pai12:45

They look extremely valid, and you look at it, and it just doesn't make sense.

Host12:48

Yeah, we had that, uh, uh, talk in the morning with, uh, Peter from OpenClaw. Uh, it is the number one source of attacks right now. You compromise OpenClaw, you get access to everyone, uh, for, for remote code execution, let's call it.

Be Original13:02

Sunil Pai13:02

Mm.

Host13:03

Yeah. Any other CTAs, uh, just in general? You know, I, we, we were- we do have to wrap up, but I always appreciate you, uh, coming by and dropping your wisdom. Alpha thought leading is, is, is the, the term that always comes to mind.

Sunil Pai13:14

Alpha thought leading.

Host13:15

Yeah, yeah. In 2018 was the React Rally where you were presenting your, its VR chest thing.

Sunil Pai13:20

That's right.

Host13:21

And you were like, "I'm first I'm gonna do some alpha thought leading," and, uh, ever since then I was, I was- I've been trying to do alpha thought leading as well.

Sunil Pai13:28

You are one of the best in the game, I think, like, like- Look-

Host13:30

This is alpha thought leading AI-

Sunil Pai13:32

I-

Host13:32

... here.

Sunil Pai13:32

The real, the real thing I encourage people to do is to be original. Okay? In such a crazy world where any idea seems to work now, like the Clanker, like, will make it work for you, don't even try to do something incrementally better.

Build sci-fi stuff. Build stuff, like, for your family. Use Agents SDK for doing it. Uh, don't build it, like, because you think you're going to get, like, a big enterprise deal. You own so much agency in changing the world, and I want people to just be original.

I want them to try the wild stuff for which infrastructure and LLMs almost fail you at this moment. Like, how do we get to the next step change? Uh, I... Th- th- this is my only thing I desire of people.

Like, just, just, I, I'm begging you to be original and to have courage to try a new idea. I don't need another agent framework. Nobody needs it. You should use Agents SDK.

Host14:23

Yeah. Except yours. Except yours.

Sunil Pai14:24

Except-

Host14:25

Okay. Thank you. I'm really looking forward to your talk. Thank you for dropping by, and thank you for sharing wonderful, uh-

Sunil Pai14:29

Thank you so much for having me

Host14:30

... stuff. Congrats on-

Host 214:30

You did a great alpha

Host14:31

... CodeMod. Yeah.

Host 214:32

CodeMod.

Sunil Pai14:32

I'll be talking about it in a couple of hours. It's pretty great.

Host 214:35

Yeah. Yeah.

Host14:35

You can find the recording somewhere. Okay, great.

Host 214:37

Cool.