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

Latent Space · 2026-05-24

<https://addtry.com/59597034-16ff-4df9-b5a5-be62e9ff1dd5>

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.

## Questions this episode answers

### How does Cloudflare's platform compare to Anthropic's Cloud Managed Agents for building AI agents?

Sunil Pai explains that Anthropic's Cloud Managed Agents offer a long-running agent platform, but he believes Cloudflare can do better using workers and two core primitives: Durable Objects (stateful serverless programming with actor model support at infrastructure scale) and Dynamic Workers (safe evaluation of LLM-generated code with zero startup time and controlled API exposure). These provide a more efficient architecture for agentic software.

[0:40](https://addtry.com/59597034-16ff-4df9-b5a5-be62e9ff1dd5?t=40000)

### What is the missing 'React' for AI agent frameworks according to Sunil Pai?

Sunil Pai says no single standardized architecture for building AI agents exists yet — the 'React' moment hasn't happened. While everyone is building harnesses, none have achieved a cross-language, cross-platform standard. He compares it to React's 2013 debut, which unified UI development, and suggests that original thinking is needed to create a reproducible foundation for agentic software.

[4:37](https://addtry.com/59597034-16ff-4df9-b5a5-be62e9ff1dd5?t=277000)

### What was the controversy over Sunil Pai's fork of Vercel's 'Just Bash' project?

Sunil Pai recounts forking Vercel's Just Bash to port it to Cloudflare using Anthropic's Opus, generating 5,000 lines of code. He planned a pull request, but the Vercel CTO publicly trashed it as an official Cloudflare project. The incident sparked debate about fork culture and corporate tensions, with Sunil emphasizing that forking is a sign of respect and fundamental to open source.

[6:36](https://addtry.com/59597034-16ff-4df9-b5a5-be62e9ff1dd5?t=396000)

## Key moments

- **[0:00] Intro**
  - [0:04] Sunil Pai claims credit for creating Code Mode, saying he's been thinking about it since childhood.
- **[0:30] Cloud Managed Agents**
- **[1:04] Core Primitives**
  - [1:21] Cloudflare's Durable Objects and Dynamic Workers are the two primitives for building AI agents, says Sunil Pai, enabling stateful serverless and safe code evaluation.
  - [2:43] Cloudflare's MCP server uses Dynamic Workers to execute JavaScript code in tool calls, allowing complex API tasks in one go, says Sunil Pai.
- **[4:20] Future Architecture**
  - [4:37] No one has built the 'React' for AI agents yet, says Sunil Pai, as the industry lacks a standardized harness that works across languages and companies.
- **[6:10] Vercel Drama**
  - [6:36] Sunil Pai recounts forking Vercel's Just Bash at JSConf, then waking to the CTO's Twitter criticism and receiving internet support.
- **[9:42] Slop Forks**
  - [10:04] Forking is a great sign of prestige and fundamental to open source growth, says Sunil Pai, enabling developers to own their dependencies.
  - [12:04] Open source repos have become adversarial with fake security reports, warns Sunil Pai, causing maintainers to limit contributions and fear popularity.
- **[13:02] Be Original**
  - [13:32] Sunil Pai urges: 'Build sci-fi stuff. Don't build because you think you're going to get a big enterprise deal. Be original.'

## Speakers

- **Sunil Pai** (guest)

## Topics

Agent Platforms

## Mentioned

Anthropic (company), Cloudflare (company), OpenClaw (company), Vercel (company), Agents SDK (product), Cloud Managed Agents (product), Code Mode (product), Durable Objects (product), Dynamic Workers (product), Just Bash (product), MCP server (product), Opus (product), Vercel AI SDK (product)

## Transcript

### Intro

**Host** [0:04]
Okay, we're here with Sunil Pai, uh, creator of Code Mode.

**Sunil Pai** [0:08]
No. Uh-

**Host** [0:08]
Co-inventor

**Sunil Pai** [0:09]
... I do take credit for, uh, creation of Code Mode. Dynamic isolates have been-

**Host** [0:12]
You said no, but-

**Sunil Pai** [0:13]
... software for a while.

**Host** [0:13]
You said no, but you take credit.

**Sunil Pai** [0: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.

**Host** [0:20]
You were built for this.

**Sunil Pai** [0:21]
It's my life's, it's my life's mission.

**Host** [0: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 Agents

**Sunil Pai** [0:34]
Mm-hmm

**Host** [0: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 Pai** [0: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."

**Host** [0:48]
Yeah.

**Sunil Pai** [0: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."

**Host** [1:00]
Yeah. Cloudflare is the i- is an ideal platform for this. You had workflows for a while.

**Sunil Pai** [1:04]
Mm-hmm.

### Core Primitives

**Host** [1: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 Pai** [1:11]
I think-

**Host** [1:11]
... that you see

**Sunil Pai** [1: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-

**Host** [1:21]
Yeah

**Sunil Pai** [1: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-

**Host** [2:49]
Mm

**Sunil Pai** [2: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.

**Host** [3:36]
I, I don't know if you've, you've, uh, looked at the sort of Cloud Managed Agents thing.

**Host 2** [3: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 Pai** [3: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.

**Host** [4:19]
Yeah.

**Host 2** [4: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 Architecture

**Host 2** [4:34]
Uh, do you have a vision, like, you see?

**Sunil Pai** [4: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.

**Host** [5:23]
It might just be Skills.

**Sunil Pai** [5:24]
Yeah.

**Host** [5:24]
I feel like Skills are the ultimate translation layer.

**Host 2** [5:27]
And they're, they're a version where-

**Host** [5:28]
It's just English

**Host 2** [5:29]
... they, they scale well. It's English. Uh, you know, you can abstract it down. You can create Skills on their own.

**Sunil Pai** [5: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"?

**Host** [5: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 Pai** [6:00]
Right. Yeah.

**Host** [6: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 Drama

**Host** [6:10]
Let's talk about slop forks.

**Sunil Pai** [6:12]
I love slop forks

**Host** [6: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 Pai** [6:18]
You know what? I'm happy to talk about it.

**Host** [6:20]
Okay, yeah.

**Sunil Pai** [6:20]
Okay, I, like, I'm happy to, like, talk about it.

**Host** [6:22]
Yeah.

**Sunil Pai** [6:22]
Because-

**Host** [6: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 Pai** [6:29]
Sure. I know, it does-

**Host** [6:31]
In, in your life

**Sunil Pai** [6:32]
... it does... Well, in my life, sure. But, like, about the importance of software. Okay, so for context-

**Host** [6:36]
Yes

**Sunil Pai** [6:37]
... okay? For context, uh, I've been in this industry long enough that I have friends everywhere.

**Host** [6:43]
Yeah, yeah.

**Sunil Pai** [6: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-

**Host** [8: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 Pai** [8:45]
I'm ju- exactly. It's Cloudflare did this. I was like, dude, I saw my career, like, fall apart with that message.

**Host** [8:52]
Oh.

**Sunil Pai** [8:52]
No, but that's just it. Like, that was my immediate reaction to seeing the CTO-

**Host** [8:56]
Yeah

**Sunil Pai** [8: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.

**Host** [9:18]
Ah.

**Sunil Pai** [9: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.

**Host** [9:42]
So let's talk about slop forks for a while, right?

### Slop Forks

**Host 2** [9: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-

**Host** [9:54]
Changing the Python to-

**Host 2** [9:55]
Yeah

**Host** [9:55]
... to avoid the DS-

**Host 2** [9:56]
Change the Python around, yeah.

**Sunil Pai** [9:57]
Of, like, Cloudflare itself.

**Host 2** [9:57]
You were the, you were the... Yeah, yeah, yeah. So-

**Sunil Pai** [9:59]
And people tagged me in those threads.

**Host 2** [10:00]
Yeah, yeah.

**Sunil Pai** [10:00]
They're like, "Is this you?" I'm like, "No, that's not me."

**Host 2** [10:02]
You were early, though.

**Sunil Pai** [10:02]
No.

**Host 2** [10:03]
And people love that version, right?

**Sunil Pai** [10:04]
I think it's weird because of the environment. Forking is a great sign of, uh, prestige-

**Host** [10:11]
Respect

**Sunil Pai** [10: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 2** [10: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 Pai** [10:24]
Please

**Host 2** [10:24]
... and do whatever. And why not port it to a different line?

**Sunil Pai** [10: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.

**Host** [10:48]
Yeah, yeah, yeah.

**Sunil Pai** [10: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 2** [10:57]
Right.

**Sunil Pai** [10:57]
Like, it actually breaks copyright.

**Host** [10: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 Pai** [11: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 2** [11: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-

**Host** [11:43]
Yeah, build versus buy has really changed.

**Host 2** [11:45]
Build versus buy, but then there's no fork in that, right?

**Host** [11:48]
Yeah.

**Host 2** [11: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 Pai** [11: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.

**Host** [12:10]
Yeah.

**Sunil Pai** [12: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.

**Host** [12:45]
Yeah.

**Sunil Pai** [12:45]
They look extremely valid, and you look at it, and it just doesn't make sense.

**Host** [12: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 Original

**Sunil Pai** [13:02]
Mm.

**Host** [13: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 Pai** [13:14]
Alpha thought leading.

**Host** [13:15]
Yeah, yeah. In 2018 was the React Rally where you were presenting your, its VR chest thing.

**Sunil Pai** [13:20]
That's right.

**Host** [13: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 Pai** [13:28]
You are one of the best in the game, I think, like, like- Look-

**Host** [13:30]
This is alpha thought leading AI-

**Sunil Pai** [13:32]
I-

**Host** [13:32]
... here.

**Sunil Pai** [13: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.

**Host** [14:23]
Yeah. Except yours. Except yours.

**Sunil Pai** [14:24]
Except-

**Host** [14: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 Pai** [14:29]
Thank you so much for having me

**Host** [14:30]
... stuff. Congrats on-

**Host 2** [14:30]
You did a great alpha

**Host** [14:31]
... CodeMod. Yeah.

**Host 2** [14:32]
CodeMod.

**Sunil Pai** [14:32]
I'll be talking about it in a couple of hours. It's pretty great.

**Host 2** [14:35]
Yeah. Yeah.

**Host** [14:35]
You can find the recording somewhere. Okay, great.

**Host 2** [14:37]
Cool.

---

This library is powered by PodHood (https://podhood.com), the podcast website platform.
