AI Engineer Europe 2026
Why Eval++ Is the Next Great Compute Primitive — Sunil Pai & Matt Carey, Cloudflare
Read the talk
Eval++: giving agents state, identity, and a place to run code
A broken serverless hit counter leads to a broader design: persistent agents coordinate work, while isolated Workers execute generated code with explicitly granted capabilities.
From a talk by Sunil Pai and Matt Carey
Before you start: Familiarity with JavaScript request handlers, serverless functions, and LLM tool calls will help; Durable Objects and Dynamic Workers are introduced from first principles.
Why the hit counter breaks
Why does a website hit counter work locally, then fail when deployed as a serverless function? That small problem introduces the infrastructure behind Cloudflare’s agent work. Sunil Pai and Matt Carey began building on Durable Objects a little over a year before this discussion. A Durable Object has a database, but it is not simply a database: it combines addressable compute with state. Those distinctive platform capabilities are also an architectural commitment—the same features that enable new designs can create vendor dependence.
Start with a function that receives a request and returns a response. Put a counter outside it and increment the counter for every visit:
javascript
let counter = 0;
export default {
fetch() {
counter++;
return new Response(String(counter));
}
};
This counts requests handled by that particular in-memory instance. Deployment breaks the assumption that every request will see the same memory. An isolate might be reused under traffic, but it can also disappear or be replaced by another instance with its own counter. The problem is unreliable persistence, not that every request necessarily starts from zero.
The conventional repair is to move the counter into a database. Durable Objects change the unit of computation instead: requests and WebSocket connections addressed to a particular ID reach the same logical object. The application can organize its behavior around that identity instead of reconstructing it in unrelated request handlers. This is the sense in which Cloudflare calls the model stateful serverless: serverless deployment and scaling, with an addressable owner for state. Stable identity does not mean that one in-memory instance lives forever.
Pai gives roughly 15 ms latency in London as an example, comparing it with the approximately 16.67 ms available per frame at 60 FPS; he supplies no measurement setup. The practical illustration is tldraw: open a shared drawing on several phones and watch changes appear together. The same properties matter for agents. They need an address, persistent state, background work that is not tied to an incoming request, hibernation, and connections to other services.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
From an object to an agent—and an MCP server
The Agents SDK adds an application interface to that execution model. Import from agents, extend its class, schedule work at startup, and expose methods that clients can call. React hooks and plain JavaScript clients connect the frontend to the agent. Pai’s scheduling example is deliberately mundane: every Friday at 9 PM, collect Git history, a wiki, and Notion notes, compile an update for a manager, and introduce spelling mistakes so it sounds like its author. Scheduling makes the agent useful even when nobody has a browser open.
The next layer is production chat behavior. Model calls alone do not provide coordinated tool execution, resumability, or synchronization across tabs. Cloudflare supplies a backend for Vercel’s AI SDK to handle those concerns. Pai’s descriptions of enormous instance counts and the world’s best backend express enthusiasm rather than measured capacity or a comparative evaluation. The recording describes the SDK at that time; current packages separate higher-level chat into @cloudflare/ai-chat.
MCP brought another reason to use stateful infrastructure. Carey describes the difficulty of hosting early remote MCP servers, whose HTTP/SSE transport maintained a receiving connection alongside a separate POST endpoint. That is narrower than saying all MCP required a persistent network connection: the original transport specification also supported stdio and custom transports. Durable Objects were a natural fit for the remote connection model. Carey and Pai name PayPal, Sentry, Twilio, Linear, and Intercom as early examples hosted on this infrastructure. Working on those servers led the team toward Code Mode.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Run a code string in a separate Worker
An ordinary Worker is a deployed serverless function. A Dynamic Worker starts from a different input: a string of code supplied to a running parent Worker. That string might come from a customer, a user, or an LLM. The parent loads it into its own isolated Worker and runs it without a separate deployment for each generated program.
The prospect of executing generated code produces sharply different reactions. At MCP Dev Summit, Carey encountered someone insisting that enterprises would never permit code they had not inspected; a Lockheed Martin attendee then approached with enthusiasm for precisely that capability. The disagreement makes the execution boundary central: accepting code is useful only if the host can constrain what it does.
A Dynamic Worker is an isolate, not a VM with a complete operating environment or filesystem. Carey describes on-demand scale reaching billions of isolates, without presenting a capacity test. The more immediate design opportunity is replacing an intermediate language. A product might currently turn form input into JSON, interpret that JSON as a DSL, and finally convert it into code. If the platform can execute untrusted code safely, the user or model can supply the code directly.
The sandbox model begins with restriction, then adds authority from outside. Pai contrasts this with starting from a VM or container and trying to secure everything around it. In the configuration he describes, generated JavaScript has no network access or application APIs until the host grants them. The host could expose four selected APIs, allow requests only to GitHub, or narrow access to a particular path such as github.com/xyz. A policy can itself be code—even a deliberately arbitrary failure rule using Math.random().
Explicit capabilities are stronger design tools than an outbound blocklist alone. Give generated code the operations it needs, while keeping environment variables and credentials outside its reach. Denied network access is a configured policy, not an immutable property of every Dynamic Worker: the host controls which bindings and outbound access it grants. That distinction separates executing a program from giving it the authority of the application that executes it.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
What Eval++ adds to code generation
The screen shows Cloudflare’s Dynamic Workers sandboxing article as the discussion turns to Code Mode. The proposed MCP demonstration is deferred to the speakers’ separate sessions; this discussion introduces the execution model rather than walking through that implementation.
Carey previews access to 2,600 Cloudflare API endpoints through approximately 1,000 tokens of tool definitions, not 1,000 total tokens for a completed task. The endpoint count is his spoken figure. The core idea of Code Mode is simple: have the model generate code, then execute that code. The details of endpoint discovery and the MCP implementation are left for his separate talk.
For decades, programmers have been warned away from eval, and ordinary eval is unavailable in Cloudflare Workers. Pai calls Dynamic Workers Eval++ because they revisit dynamic execution with a separate isolation boundary and controlled capabilities. His larger claim is that a discouraged branch of programming becomes worth exploring again when execution can be fast, secure, and inexpensive. Those are the product’s proposed advantages, accompanied by an invitation to try it—not comparative results established here. Interfaces can change when users and agents can supply executable programs rather than only fill predefined fields.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Generate the interface directly
An audience member asks for the missing bridge: how do these primitives map onto applications people already build? Carey starts with generative UI. In an approach such as json-render, the model produces JSON that a renderer turns into an interface. His question is why the model cannot instead generate HTML or React directly.
The missing capability is often a place to execute untrusted rendering code. Claude Artifacts provides a familiar example of generated content rendered in a browser. Moving that work onto a server changes the trust boundary: the generated program must not inherit unrestricted access to the server’s resources. Carey proposes Dynamic Workers as the execution environment for that server-side rendering.
| Approach | Generated input | Host responsibility |
|---|---|---|
| JSON-driven UI | Structured description | Interpret it through an approved renderer |
| Generated HTML or React | Interface code | Isolate execution and control capabilities |
The second approach removes the need for JSON merely as a substitute for executable code. It does not remove the need to secure the resulting browser experience.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Refresh the page without losing the agent
Pai’s next example uses the stateful side of the architecture. The Agents SDK supplies an execution environment that can work with LangChain, Vercel’s AI SDK, or another agent library. Ask an LLM for a long story, then refresh the page halfway through generation. In a request-bound design, continuing the stream may require separately coordinating storage, replication, and session routing.
With the agent attached to a Durable Object, reconnection has a stable destination:
- The browser reconnects to the same agent identity.
- If generation is still running, the backend supplies the beginning of the stream.
- It continues delivering new bytes as they arrive.
The browser connection can be replaced without making the browser the owner of the generation process. The same arrangement supports multiple tabs, browsers, a phone, and a laptop observing the same work.
This extends the original collaborative-sync use case into a multiplayer agent experience. Pai imagines sharing a conversation link so two people can work with an AI in the same conversation, rather than each interacting with an isolated copy. Cloudflare owns the underlying distributed coordination; the SDK team builds the JavaScript behavior on top. The application developer can spend more effort on what collaborators should do together instead of constructing the synchronization machinery.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Keep the coding loop in the cloud
The audience then proposes a cloud interface for Claude Code, including the awkward lifecycle of starting a VM, closing an application, and resuming it later. Carey separates the agent loop from its clients. Run the loop in the Agents SDK, then connect a terminal, chat interface, phone, iOS application, or web application to the same persistent backend. Each client sees synchronized state and can resume interaction.
Pai confirms that Cloudflare is building such a harness on Workers and Durable Objects and hopes to ship it imminently. At this point in the recording, it is work in progress. Its intended combination is stateful agents that can start and stop, resumable interactions, and generated code executed on demand.
A lightweight execution core does not have to perform every task itself:
- Containers: Delegate heavier work through Cloudflare’s Sandbox SDK.
- Browsers: Connect browser execution when the task requires it.
- Other providers: Use tools such as Daytona, Browser Use, or Lightpanda where appropriate.
Workers and the Agents SDK become the persistent coordination point connecting these environments. The proposed architecture does not require every execution tool to come from Cloudflare.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Let the agent extend itself
A further question makes the agent more autonomous: could a cloud bot receive a voice message, schedule work, and create its own skills? Carey begins with storage. SQLite lives inside the Durable Object, and R2 can hold additional data. He initially describes connecting these pieces as manual work that will soon become easier.
Pai breaks an OpenClaw-style system into concrete ingredients: a heartbeat, a virtual filesystem, connections to services, control over secrets, and extensions. The extension mechanism is generated code executed in a sandbox. He reports implementing extensions that morning. Running the pi coding agent directly on Workers is a further goal under discussion with Mario, not an integration presented as delivered.
The language question follows naturally from a discussion dominated by JavaScript and React. Pai describes JavaScript and Python as first-class infrastructure languages, while acknowledging unfinished Python integration work. Other languages can target WebAssembly. He reports production use of Zig for undisclosed work and says its Wasm bundles are smaller than comparable Go and Rust output, without giving programs, build settings, or sizes. If native execution matters, a container remains an option.
If an LLM writes the code, the execution environment may matter more than whether the language matches the developer’s personal preference. There is still a preparation step for application code, however. Worker Bundler runs inside a Worker, retrieves npm dependencies, handles TypeScript and JSX, and produces executable output. Pai says Cloudflare’s dependency caching reduces exposure to npm downtime.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
A virtual filesystem and isolated CMS plugins
An audience member returns to the storage ambiguity: what exactly will stop requiring manual wiring? Pai clarifies that @cloudflare/shell is already usable at the time of the discussion. It provides a virtual filesystem layered over Durable Object SQLite, with R2 for larger files. This is not a full Linux environment or POSIX shell. His expectation that the APIs should not break is not a stability guarantee; current package documentation explicitly marks the APIs experimental.
The next application of the execution boundary is EmDash, the CMS Pai says launched the previous week. It runs on Workers and Durable Objects, with plugins executed through Dynamic Workers. WordPress plugin security incidents supply the motivation: extension code should run inside a restricted environment rather than inherit broad application authority.
EmDash’s portability and its plugin isolation are separate claims. The CMS can deploy outside Cloudflare, but the speakers say support for the Dynamic Worker portion on other platforms is still being developed. They also mention vinext, a Next.js implementation running on Vite, and preview more announcements during Agents Week the following week. Those availability and timing statements belong to the recording; Pai describes the broader announcement weeks as a twice-yearly practice.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
The economics behind the execution model
The closing technical explanation concerns cost. Pai attributes Cloudflare’s low prices to infrastructure decisions made roughly a decade earlier: placing hardware near ISPs rather than relying on massive data centers, buying bandwidth in bulk, and using interconnection agreements to reduce the cost of traffic crossing network boundaries. In his account, free accounts follow from that business structure rather than functioning simply as marketing expenditure.
Pai cites a $5-per-month entry point and anecdotes of multimillion-dollar SaaS businesses built on the platform, without specifying included usage, overages, or total application costs. The economic proposition complements the technical one: persistent coordination and short isolated executions become more useful when developers can afford to apply them broadly.
The practical starting points are the Agents documentation and the Cloudflare Agents repository, where the speakers invite issue reports and agent-assisted feedback. The invitation is to build with the primitives: give work a durable identity, connect clients to that identity, and let generated programs act through capabilities the host deliberately grants.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Resources
From the talk
Current guides for durable agent state, connections, scheduling, tools, and deployment.
SDK source, examples, and issue tracker, including a persistent counter synchronized with React clients.
Sandboxed JavaScript and a virtual filesystem with durable SQLite storage and optional R2 backing.
Build and bundle application code at runtime for the Worker Loader.
Further reading
Matt Carey explains how search and execute tools expose Cloudflare's API with a small tool-definition footprint.
Kenton Varda and Sunil Pai explain generated TypeScript orchestration and capability bindings in the original Code Mode design.
Runtime-loaded isolates, host-controlled capabilities, outbound request policies, and supporting bundling and filesystem libraries.
- Introducing EmDashArticle
The CMS's developer-beta announcement explains its Astro foundation, deployment options, and capability-controlled plugins.
- Original MCP transport specificationDocumentation
The November 2024 protocol revision documents stdio and the original HTTP/SSE connection model.
Read the complete timestamped transcript
- 0:00
[upbeat music] Uh, yeah, well, uh, welcome.
- 0:16
Um, uh, I'm Matt, and this is Sunil. Um, we work on agents at Cloudflare. This, this thing. Um, so yeah, maybe you wanna introduce yourself a little better than me.
- 0:25
Uh, this is Matt Carey. Uh, I only hire my friends for our team. [laughs] Uh, say something. Make sure it's on the microphone.
- 0:32
Yeah, yeah.
- 0:33
Okay, yeah. Uh-
- 0:33
Mine's, mine's... Is mine on?
- 0:34
Like, I keep thinking about Cloudflare as a friends and family company. Uh, we love doing favors. All our closest friends- [laughs] ... no one pays for Cloudflare bills, which is already dirt cheap, by the way.
- 0:44
It's ridiculous. Um, so we started building out AI agents seriously a little over a year ago, and it's gone remarkably well. Uh, how many folks here are, like, Orange pilled?
- 0:55
Which is to say Durable Objects. Okay, yeah, like-
- 1:00
Oh, yeah
- 1:00
... worst named technology-
- 1:02
One
- 1:02
... but incredible, right? [laughs] Everyone's like, "It's a database?" I'm like, "No, but it has a database," and I'm like, "Ugh," but... Uh, but we started using that, and it turned out to work out really well.
- 1:12
There are some unique capabilities about it. Uh, some might call it vendor lock-in, some might call it innovation. [laughs] Uh, but, uh, like, and ever since then, the team has grown.
- 1:23
Uh, we are based in, like, most of us are in London. Well, you're, uh, [REDACTED:origin], but you just moved to Lisbon, which is amazing, by the way. Folks have...
- 1:30
Uh, you spend your days drinking wine, and you do fish, potatoes, bread. It's just- [laughs] ... king's life. Uh, I live in Newcastle. The weather is way worse, uh, uh, but I do like it.
- 1:41
Uh, I tried watching Geordie Shore, and I regret doing that. I will... No, that's not what I think of. Anyway, so we've been building agents and-
- 1:48
Back on topic
- 1:49
... Uh, sorry, yes, of course. Uh, and, uh, I don't know, uh, we can tell you about our journey so far, some of the tech we're using, some of the new upcoming stuff.
- 1:57
Uh, thankfully, none of this is recorded, so we can tell you about some secret features that are, uh, coming out. Uh, but, uh, I'd love to put it out there for a couple of minutes if you have any questions.
- 2:07
Otherwise, we have, like, five, like, topics we thought would be interesting to talk about. But what do you wanna know about Cloudflare and AI agents?
- 2:15
Tell us about this.
- 2:17
Amazing. So, uh, so it starts with Durable Objects, okay? So you know how everyone believes the way you build servers nowadays is you write a function that takes a request and returns a response, right?
- 2:31
Simplest model. And you decide you want to do, you want to build a hit counter for your website. So what you do is you say, uh, let x equal zero or let counter equal zero, and for every request, you say counter plus plus.
- 2:44
And it works locally, and you deploy it, and it immediately fails. Why does it fail?
- 2:50
No state.
- 2:51
There's no state. Like, it spins up, it does the thing, and it disappears. Counter will always be zero, most times at least. Like, like, on traffic, it might reuse the isolate.
- 2:59
So now you have to use a database to store state. You need to do a whole bunch of things. Instead, for a given ID, what if you could have a class that spun up once for a given...
- 3:11
Like, spun up once, and then every future request, every WebSocket connection lands in the same place. So we call this stateful serverless, which is the most confusing thing, because servers are stateful.
- 3:22
Uh, but it works like serverless in that it's, uh, it scales across the planet, uh, and because of the Cloudflare magical planetary network, it means... Like, in London, you get, like, fifteen-millisecond lat-latency.
- 3:34
Uh, for contrast, uh, sixty FPS is sixteen milliseconds, a little over sixteen milliseconds, which means if you are using, uh, if you folks have used TLDraw, it's built on this tech.
- 3:44
Uh, if you open up a bunch of phones on the same shared screen and you start, like, drawing on it, you'll see in, like, perfect sync on all phones.
- 3:52
It's, ugh, I know I'm biased, but so good. Anyway, so we just... It turns out that that's the perfect compute unit for building AI agents as well. They're addressable.
- 4:02
You can run long-running things in it, even if there are no requests going to it. They can run in the background. They hibernate. They go to sleep. They have persistence.
- 4:11
Uh, and they can connect to, like, everything else. So that was the original bet we made, and I wonder if I can scroll down. I wonder if, like, the API is available on this page.
- 4:24
Something, something marketing, marketing, marketing. Oh, yeah, see, that's kind of, like, what it looks like. You basically make a cla- you import from agents. Please don't ask us how much we paid for this NPM package. [laughs]
- 4:35
Uh, you extend it, and you can add. You're like, "Oh, when it starts up, schedule these things." Uh, you can make little callables. So, uh, agents also comes as a full stack thing.
- 4:44
We give you, like, React hooks and, like, for... It doesn't have to be React, but I assume, eh. Uh, uh, we have plain JavaScript clients as well. Uh, you can define things that are actually called from clients.
- 4:56
You can run things in the background. There's, like, like, scheduling is my favorite thing because it means you can say stuff like, "Every, every Friday at nine PM, look through my entire Git history and my, uh, Wiki and Notion, compile it, and send it to my manager.
- 5:12
Uh, uh, uh, make sure you mess up the spelling so it looks like I wrote it." [laughs] So you can do all of this. Like, it's nice. You can, and you can...
- 5:20
Like, it spins up to millions, trillions, some absurd Cloudflare number. Uh, that's, uh, that's where it starts. And over the last year, we have built a bunch of things.
- 5:30
So we have a first-class, uh, backend for Vercel's AI SDK. And it turns out the AI SDK is great. Is Nico around here somewhere? No. Anyway, um, we don't allow Vercel employees into our, uh, chat rooms. [laughs]
- 5:44
Uh, so, uh, it turns out there's a lot more to make it production ready to do tool calls, to do synchroni- to do resumability, things across tabs, make... So we have the world's best backend for, like, the AI SDK.
- 5:56
I'm, I'm saying a lot of things.
- 5:57
That's-
- 5:57
So we have that. We have-- I wanna talk to you about Code Mode, which is, by the way-
- 6:01
About maybe this point in the, in the journey, uh, like MCP got mega popular around April last year, and so it turns out Durable Objects are actually a great way to do MCP servers, 'cause if you know anything about MCP, uh, when it was originally launched, you needed to have, um, a stateful connection between client and server.
- 6:19
And this was one of the most annoying things about deploying MCP servers to production to the cloud. And Durable Objects maintain a stateful connection, like very, very easy. That's kind of the whole point.
- 6:28
And so we, we like jumped on that really early. We had some of the, like first MCP servers like PayPal, Sentry, Twilio.
- 6:35
All the big ones are on this.
- 6:36
All of the ones.
- 6:36
Linear, Intercom. Um-
- 6:38
Yeah
- 6:38
... name it. Yeah.
- 6:39
All of them. Um, some we can't name. Uh, [laughs]
- 6:43
and, uh, and yeah, so it turns out MCP was like really, really good for this and this, this led us down like very many more rabbit holes really, where, um, I think this is all leading to Code Mode really.
- 6:53
Sure, yeah.
- 6:54
Yeah. And then, so then we have, so we have Durable Objects. We have Workers, which is sort of like a serverless function as a service. Like a Lambda you think.
- 7:03
Like imagine a Lambda was designed 10, 15, 20 years later, something like that, like it's better. Um, then,
- 7:11
then we have this, this new, this new primitive, which we're calling Dynamic Workers, where it's like a Worker, but instead of having to deploy the Worker to the cloud, you can go from one Worker and be like, "I have this string of code that a customer sent me, or a user sent me, or an LLM generated, and
- 7:27
I'm gonna run that pi- piece of code in its own isolated Worker." So from a string, you can run, you can run the code, and this is like, kind of breaks a lot of people's brains.
- 7:37
I was at MCP Dev Summit last week, and there was a startup next to me, and th- th- this [REDACTED:gender] was just trying to convince me that no enterprise environment would allow people to run generated code an- that they'd never seen.
- 7:48
And then someone from Lockheed Martin came up to me and was like, "Oh, we love co- we love this like, uh," [laughs] "... generated code." And just like the dichotomy was really funny.
- 7:55
But basically you can run people's code that they generate in this thing called a Dynamic Worker, and we think it's a very, very good sandbox, um, in the sandbox used to the world.
- 8:06
Not a VM, not a full... It doesn't have a full file system. It doesn't have like all of the, the VM-like heaviness, but it is an isolate that you can spin up, and you can spin up billions of them on demand.
- 8:19
And so that's kinda cool. So anywhere where you want to have like user-generated code, or you previously would use something like a DSL, like you would have some JSON file that was generated or was built from some front ends, from some big form, and then you would take that and you would convert that to code.
- 8:35
Now just write code, at least I hope this is it. Yeah. Perfect.
- 8:38
So I lo- uh, uh, so, uh, I hate being that [REDACTED:gender] who's like, "Oh, you should read my blog," but you should read our blog, by the way. [laughs] The Cloudflare blog, really nice.
- 8:45
Incredibly technical. Like, the only part where we try to sell you something is where the marketing folks ask us to put a CTA at the, like very bottom. You can ignore that bit, but everything else is dope.
- 8:56
We go into details about this. So you know how like sandboxes start like from a VM or a container, and then you try to add security like from around it?
- 9:04
So like we start the complete opposite way. The only thing you can run is JavaScript in it, but it has no access to fetch, no APIs, nothing. And from the outside you can decide, okay, here are like four APIs, uh, and, um, only outgoing fetches to github.com are allowed.
- 9:18
Hell, [REDACTED:url] or math.random. I don't know, some requests fail. You can write code that does it. And the way we recommend it is don't just block outgoing fetches. You give the sandbox explicit capabilities that you can run in, no environment variables exposed to any of this code.
- 9:35
Uh, you should check this out. Should I do a demo of the MCP server? Like, can I show the MCP server a bit?
- 9:40
No, no, no, no, no. 'Cause I'm gonna do it in my talk. We can tease our talks now.
- 9:42
Okay. Oh, we get to tease our talks.
- 9:44
Yeah, we can tease our talks.
- 9:44
Okay, perfect.
- 9:45
So, so basically using this, we kinda claimed that we fixed MCP, not once, maybe twice. Um, and that is both of our talks, uh, yours is this evening.
- 9:54
That's right. Uh, 5:40 PM, I'm giving a talk about Code Mode, what we call Code Mode. I have the, I have the hat. Uh, for people who are asking where you can get Code Mode hat, we have a careers page on cloudflare.com. [laughs]
- 10:08
Uh.
- 10:08
Uh, and I'm doing a talk tomorrow about how you can use Code Mode in your MCP server to give access, uh, to all, uh, 2,600 API endpoints of Cloudflare in, uh, just only, only 1,000 tokens.
- 10:21
So Code Mode, like this, this idea of being able to generate code that you then run is super, super powerful. I don't think we have enough time here to like fully explain how that works, so I would just ask to come to our talks.
- 10:31
Yeah, you should ab- like, so the way I've been telling it to people is for the last 30 years, 30? [REDACTED:age] odd years, uh, you go to being such an old [REDACTED:gender] in the room so fast.
- 10:40
Uh, they've told you never to use eval in code. In fact, on Cloudflare Workers, eval, you, you don't have eval. It's dangerous. Uh, but we took it, and Dynamic Workers are like Eval++.
- 10:53
So I think about it how there's an entire branch of the tech tree that we haven't explored in like 30 years, and now we are giving you a fast, secure, and cheap way.
- 11:02
Is there such a thing as fast, good, fast, and cheap?
- 11:06
Yeah.
- 11:06
Che- maybe it's not good. I don't know. You have to try it out and let, uh, and let us know. Uh-
- 11:10
It's, I know it's fast
- 11:11
... and, and you get to reconsider the way you build interfaces and how things happen, especially in a world where all your users can write code, right? That's, uh, so that's, that's Dynamic Workers.
- 11:23
That's like... It's really cool, man. Like [laughs] I, I've been having a lot of fun playing with this. It's very new.
- 11:30
Yeah. Should we tease some stuff, or do you wanna talk about... We had, we had some other releases previous, recently. Go on, yeah. Question.
- 11:36
Just a quick one on that, 'cause I think it sounds like you guys are like, I mean, you obviously are like super ex- you know, maybe this is just me.
- 11:42
I'm struggling to find a way to like map all the things that I'm building to this world. I'm not quite whether it's just me. I'm, I'm trying to find a bridge.
- 11:49
I'd just love to hear sort of like what you think people are building in the, in the industry that like they really shouldn't be-
- 11:56
Like that, they should be building it this way or-
- 11:58
I, I've got a good anecdote
- 11:59
... I think that would be very helpful too.
- 12:01
Oh, I'd love to give examples. Okay.
- 12:02
Yeah. Let's, let's give examples. We do one each?
- 12:04
Uh, sh- I mean, we'll do five each. Go ahead. [laughs] [laughs]
- 12:08
Okay. So, um-
- 12:09
I mean, we are here to shill, bro. Like, that's-
- 12:11
Yeah [laughs]
- 12:11
That's why we're here.
- 12:14
So my favorite example is, uh, the... There's a big thing going around about generative UI at the moment, and people are g- basically, have you heard of JSON.render?
- 12:23
Yeah.
- 12:23
You're, like, generating JSON that then you render. It's kind of in the name. Why are you generating JSON? Why don't you just generate HTML or even generate React and then just render that?
- 12:33
Well, why, why, why can't you do that? Well, some platforms don't have a primitive to render untrusted code. Well, if... what happens if you did? You could literally get your users, get your, get your customers, get your clankers, get your agents living in the cloud to generate code that they run that then is rendered in a UI.
- 12:51
Like, a- a- anyone tried Cloud Artifacts?
- 12:54
Yeah.
- 12:54
That's basically... Yeah, that's it, right? It's just HTML, but it's rendered on your browser. So people don't care so much about that security. What they care about is when they're rendering it on their servers.
- 13:03
That's, that's when it starts getting a little bit dodgy, and now they're like, "Right, you need JSON." You don't need JSON anymore. You could render React, and that's... this is how you build it.
- 13:11
So this is like... There's one fun thing here. Um, yeah, do you wanna go to the next one? Uh-
- 13:16
Wait, which, which feature?
- 13:17
Uh, Dynamic Workers.
- 13:18
Dynamic Workers.
- 13:19
Yeah, yeah.
- 13:19
Dynamic Workers.
- 13:20
Uh, I'll go, like, a little simpler. Okay. So because our agent thing is, like, not, uh... is more the execution environment than the library use, like, you can use LangChain, AI SDK, anything with our Agents SDK.
- 13:30
We give you that. But because they're this durable object model, it means, uh... Let's say you wanted to build resumable streaming. Okay? So you tell the LLM, "Give me a long story," and you hit refresh in the middle of it.
- 13:43
Uh, how, how do you make sure it continues streaming in a serverless world? Okay, now you need to do a database, you need to do replication, you need to do sticky sessions.
- 13:54
Uh, in the Durable Objects world, in the Agents SDK world, you just reconnect to it, and if there's a stream going on, it just says, "Well, here's the beginning of the stream, and I'm just going to continue giving you bytes."
- 14:05
Uh, it means that you automatically get multi tabs, multi browser sync. Like, you're looking at your phone and the laptop same time. All of these things come out of the box for you.
- 14:13
Uh, in fact, like, the killer use case where we started with Durable Objects was for building real-time collaborative sync. Now, I'm a believer that AI should be a multiplayer game.
- 14:24
You know, have you noticed? Like, why can I not share a link to my ChatGPT chat with you, and both of us work in the same conversation? Uh, it's because OpenAI hasn't, like, built that, and they're like, "Oh, we have, like, bigger problems to solve.
- 14:38
Half our people quit, like, every three weeks," or something like that. [laughs] Uh, it turns out, like, with primitives like this, you don't have to patch it in user land and become this crazy distributed systems engineer.
- 14:49
You make it Cloudflare's problem. Well, our problem. Well, I say our problem, but we take credit for the people who actually build it.
- 14:55
Yeah.
- 14:55
We do the JavaScript on top of it. Uh, so I really like that. Like, the fact that you get sync, streaming, et cetera, out of the box, it just...
- 15:03
It means you can play with... You can build your own. You can focus on the things that, like, you care about.
- 15:08
Yeah. That's the killer demo, isn't it?
- 15:10
I j- I like it so much. Like, just showing, like, the sync is just so fun because then it, like, unlocks. They're like, "Oh, okay, fine. If you can do that, I'm going to worry about making money."
- 15:19
It's- [laughs] ... it's a fun thing to do.
- 15:20
So, like, would, would it be fair to say you could rebuild a cloud code cloud interface, which is just-
- 15:29
Uh, should we start leaking secrets?
- 15:31
Yeah, we can start leaking secrets now. [laughs] Okay. Um, yes.
- 15:33
You have the problem of starting a VM-
- 15:35
Yes
- 15:36
... and killing the app and resuming the app-
- 15:37
Yes
- 15:37
... and it's always hot loading.
- 15:39
Yeah. So, so there's some cool things you can do here. Um, because imagine an agent loop that ran in the Agents SDK that did the back end of Cloud Code.
- 15:49
Now, you have a server that runs, that's persistent, and you can connect to it from any client, so a terminal, from a chat, from a phone, from an iOS app, from, from a web app.
- 16:01
It doesn't really matter. Like, like, e- everything is synced between all, between all of your clients. Everything is resumable. Everything is stateful. And, and I guess that-
- 16:10
So I guess it's up to Cloudflare to now build a harness- [laughs] ... right? A coding agent that runs purely on Workers and Durable. Hmm, should we build that, Matt? [laughs]
- 16:20
Should we, should we be building this? We're... Oh, we are building it, just so we're clear. [laughs] Uh, if I wasn't obvious enough, uh, we hope to ship it imminently.
- 16:31
Uh, it ju- Like, the, the conference is taking my time away from burning tokens is what it is. [laughs] Uh, as quickly as I can go back to that. No, but no, we believe in that world.
- 16:41
Look, everyone's building a harness, and everyone's leaning into the benefits of their infrastructure or their philosophy. This is ours, where not only do you have these spin up, spin down stateful agents, but with capabilities of generating code on the fly and running it, like, instantly, uh, really fast, uh, resumability, et cetera, out of the box.
- 17:00
And if you want to delegate to a big container, you should absolutely be able to do that. We ha- uh, well, our team also handles Sandbox, Cloudflare Sandbox SDK.
- 17:10
Uh, you want to run it in a browser? Well, we have a browser. You really have to use our stuff. You want to use Datona? Great product, by the way.
- 17:16
Love their Sandbox stuff. Uh, you wanna use BrowserUse, or you want to run... What's the... LightPanda, is that what it's called?
- 17:23
Yeah.
- 17:23
You can do that. But Workers and our Agents SDK becomes the, the nexus of where, like, it connects around all of the things. That's the vision we have. It's, uh,
- 17:34
happening sooner than later on this.
- 17:35
And particularly, how would you then create a cloud bot, particularly one that can, like, create its own skills? 'Cause I think that, for me, is the, the thing I love the most. [laughs]
- 17:44
Is the ability to just say, like, send it a voice message, and it starts... I've got a cron that does-
- 17:49
Yeah
- 17:49
... a really great thing now.
- 17:50
So, so we have, um, we have a bunch of storage solutions. Uh, we have one in the Durable Object. So we have, uh, like, SQLite directly in the Durable Object.
- 18:01
So you can store stuff there. You can store stuff in, uh, R2. Um, and all of that, at the moment, you have to kind of wire up.
- 18:09
Mm-hmm.
- 18:09
But imminently, you won't.
- 18:11
Closer.
- 18:11
All right, so here's the thing. What is OpenClu? You want a thing that has a heartbeat-
- 18:15
Yeah
- 18:15
... you want a thing that has a virtual file system-
- 18:17
Yeah
- 18:17
... and you want a thing that's connected to services.
- 18:19
And then I control secrets, I can say I, I-
- 18:22
Exactly. And you want extensions.
- 18:24
Yeah.
- 18:24
Which means you want to generate code that's run in a safe sandboxed environment.
- 18:28
Exactly. [laughing] Yeah.
- 18:30
Uh, I implemented extensions, uh, this morning. It works really well, uh, on our thing. Uh, by the way, I'm friends, like, with Mario. Hi, Mario. Uh- [laughing]
- 18:40
Uh, and, uh, yeah, 100%. We love Py, by the way, the Py coding agent. In fact, we want to run Py directly on Workers as well. We've been talking to him about it, because why not?
- 18:49
Uh, but this is the future. Yes, we are, we are working, I'm, we are working nonstop on this right now. If it wasn't for you people, I'd be burning tokens.
- 18:59
Do you have any more questions? How much time do we have? I don't even know how long we've got.
- 19:02
I think we're maybe done.
- 19:03
There's a lot of, um, JavaScript and React love. Um, what about other languages?
- 19:08
Would you like Python?
- 19:09
Sure.
- 19:09
Amazing, so we'll do Python as well. The, uh, dynamic Workers, our Workers itself supports Python. We just need to spend a little time, like, polishing the rough edges.
- 19:17
Is it first class or...?
- 19:18
Uh, Python is first class, JavaScript is first class, everything else is Wasm. Uh, the thing we have been playing with lately is Zig. Uh, our [REDACTED:gender] here as well.
- 19:26
I think you're the first person to bring Zig into production in Cloudflare Workers-
- 19:30
Yeah
- 19:31
... for a bunch of things that we actually cannot talk about today. Uh, but Zig, the nice thing about Zig is the Wasm bundles are, like, tiny compared to, like, Go and Rust.
- 19:40
Uh, so other languages do, we do Wasm, or if it is that important to you to run it, like, natively, you spin up a container instead. Again, like, we have a first class SDK that lets you spin it up and do things.
- 19:51
That being said, brother, your LLM is writing code at this point. Like, why does it matter, right? Like, whether it's JavaScript or not.
- 19:58
That's, that's kind of my point as well. Like, why, if, if it can write whatever it wants and-
- 20:03
Yeah
- 20:03
... you get to write whatever you want.
- 20:04
Yeah, yeah. So the infrastructure right now, first class is JavaScript, Python. Uh, and, uh, y- as you could tell, I'm a React programmer, so I'm like, "Eh, Python too hard."
- 20:12
Uh, but no, we'll polish off those rough edges and we'll do that as well. Hell, we have a thing which lets you run a bundler inside a Worker right now.
- 20:20
It's literally called Worker Bundler. It pulls down dependencies from NPM, strips out types, JSX, TypeScript, all of that, and generates, like, the thing that you would, like, run inside it.
- 20:30
So fun because then it uses the Cloudflare cache for dependencies instead of worrying about NPM, uh, downtime. It's quite nice.
- 20:40
Hi. Uh, when you said you have to wire up the SQLite storage right now and soon you won't, what, what do you mean by soon you won't?
- 20:49
Um, oh, no, it actually works. It's called @cloudflare/shell. Uh, the APIs shouldn't break, uh, but it's usable today. Uh, it gives you a full file system inside, uh, layered on top of both Durable Object, SQLite, and R2 for, like, bigger files.
- 21:03
I see.
- 21:04
It works today. You can use it today.
- 21:07
That's awesome.
- 21:07
Actually, that's just it. I, I don't want to talk about the history of that project. Uh, anything else? [laughing]
- 21:13
If you search Sunil's name on Twitter, you'll find the history of that project.
- 21:16
Yeah, it was a little dramatic. Uh, anything else we can help you folks with? Anyone want free credits and shit? Like I said, friends and family company, so [laughing]
- 21:27
Uh, we, uh, I don't know if you wanted to, uh, talk otherwise about the new CMS that we launched last week. Uh, it's called MDash. Great name for a product in this day and age.
- 21:38
Uh, it runs fully on Workers Durable Objects, et cetera. And, like, the nice thing about MDash is the plugin system is built fully on dynamic Workers. So un- so you know how, like, WordPress has a bunch of security incidents because of its plugins?
- 21:52
Well, you just lock down where you run the plugins, and it just works out of the box. MDash otherwise deploys actually completely on any platform. It's not Cloudflare specific, and we are working on other platform support for this dynamic Worker bit that we, that we have right now.
- 22:08
Yeah.
- 22:09
Uh, other things-
- 22:10
It's live
- 22:10
... is We Next. We have a version of Next.js that runs fully on Wheat, and it's so fun to use. Uh, what else do we, what, what do we do, bro?
- 22:19
What do we do?
- 22:21
Uh-
- 22:21
Well, the problem is it's like next week is our, in a, one of our, is our agents week, so you'll be seeing a lot from us next week.
- 22:27
Oh, yeah, like twice a year we have these announcement weeks where we get really noisy, and next week's is gonna be particularly noisy, where we announce a bunch of fun stuff.
- 22:38
Yeah. Any more questions? Go on.
- 22:41
How do we become friends and family, us across the-
- 22:43
Uh, send account ID and optionally bribes. [laughing] [laughing] See, it's, it, it, you can consider it a bribe or protection money. Like, I'm trying to also develop a little, like, mafioso vibe around our relationship. [laughing] [laughing]
- 22:57
Uh, but no, dude, like we l- we...
- 23:01
The way that Cloudflare is constructed, the reason it's so cheap is because of decisions made 10 years ago. We don't build massive data centers. Instead, we, uh, install hardware near ISPs.
- 23:11
We buy bandwidth in bulk from, uh, level zero, uh, like top level ISPs, and we do agreements where bytes that cross boundaries, you don't really pay for it and stuff.
- 23:22
So our free accounts aren't marketing expenditure. It's just how the business is constructed. Uh, and I need more people to know that. Like, I spent a sh- a bunch of time, I was like, "How do they give it out for so cheap?"
- 23:33
So it's otherwise $5 a month, and we know people building multimillion dollar, like, SaaSs on top of that. But if you want less than $5, well- [laughing] [laughing]
- 23:43
... you become friends, friends with us.
- 23:46
Yeah. That's cool. I think we are-
- 23:48
Uh, other fun stuff we have-
- 23:50
We are at time.
- 23:51
Uh, is that time? Oh, well, I guess we are at time. How is no one knocking at... Oh, you're, you're... I'm so sorry. [laughing] [laughing] Uh, especially after we made a-
- 23:59
Yeah. [laughing]
- 23:59
... thing about the previous session. Thank you so much. We have a booth on the expo floor. I'm speaking today at 5:40 PM. He's speaking tomorrow. You should watch both talks.
- 24:08
Uh, like, look at us, like, uh, I got a haircut for this, you guys. Like, it, it's like- [laughing] Uh, it's gonna be fun. Also, just come hang with us.
- 24:15
We love just, like, chatting with people. Uh, agents.cloudflare.com or developers.cloudflare.com/agents for all the docs. Uh, [REDACTED:url] agents, you can file issues. We love... That, that's just it, like, have your clanker talk to our clankers.
- 24:32
Uh, and, uh, looking forward to seeing what you build. [upbeat music]