Назад к подкастамLatent Space
⚡️ Why you should build Science Fiction — Sunil Pai, Cloudflare
Okay, we're here with Sunil Pai, creator of Code Mode.
好,我们现在请到了 Sunil Pai,Code Mode 的创造者。
No, I do take credit for creation of Code Mode.
不,我确实要为 Code Mode 的诞生居功。
Dynamic Isolates have been
Dynamic Isolates 一直以来
no, you said I did create it.
不,你说是你创造的。
It's mine.
这是我的。
I
我
It is I did create
确实是我创造的
Since
从
Since I was a child, I was I've been thinking about it.
从小,我就一直在想这件事。
It's my life's
这是我毕生的
It's my life's mission.
这是我毕生的使命。
I wanted to just catch up on everything going on in Cloudflare lands and also like you obviously you and I have caught up over the years.
我想来聊聊 Cloudflare 最近的动态,还有你我这些年的交流。
The more recent thing which just launched yesterday was this Cloud Cloud Managed Agents thing which I which I know that you're you're also like interested in.
最近刚发布的是昨天上线的 Cloud Managed Agents,我知道你也很关注这个。
Maybe we can talk about that cuz it's kind of like breaking news and you seem excited about it.
也许我们可以聊聊,因为算是一个突发消息,你看起来对此很兴奋。
Cloud Managed Agents is dope because Anthropic is saying here is a platform for you to build and deploy your agents that are like long-running.
Cloud Managed Agents 太酷了,因为 Anthropic 在说:这是一个让你搭建和部署长时间运行智能体的平台。
Yeah.
对。
And I like it because I like the people at Anthropic and they're super ambitious about these things.
我喜欢它,因为我喜欢 Anthropic 的人,他们对这些事情非常有野心。
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.
我觉得我们可以用 Workers 和 Durable Objects 做得更好。
Yeah, Cloudflare is the is an ideal platform for this.
对,Cloudflare 是做这件事的理想平台。
You have workflows for a while.
你们有工作流已经一段时间了。
Mhm.
嗯。
What is what functionalities are available in Cloudflare?
Cloudflare 现在有哪些功能?
Like why can't you just come on and say yeah, we we already had this?
你为什么不直接出来说:我们早就有了?
Like what what's the difference?
有什么区别?
I think
我觉得
that you see.
你看吧。
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.
就像其他任何事情一样,我觉得我们正在摸索构建软件的新架构,这也是我几个小时后在台上要讲的内容。
5:40 p.m.
下午5点40分。
Please show up to the main stage.
请来主舞台。
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.
第一个是 Durable Objects,也就是有状态的无服务器编程。
I think that's a true innovation.
我认为这是一个真正的创新。
It's the world's first implementation of the actor model in an in an infrastructure layer, not in user land.
这是世界上首个在基础设施层而非用户层实现 actor 模型的方案。
It means you can spin up millions of these stateful things that run in the background, etc.
这意味着你可以在后台启动数百万个有状态实例并运行。
And it runs with serverless 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.
第二个是我们几周前刚宣布的,叫做 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.
众所周知,eval 一直被认为是个坏主意,运行用户生成的代码或者现在 LLM 生成的代码,但我们构建了一个东西,让你可以在安全环境中以零启动时间运行它。
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.
我说的安全,是指你可以只暴露你想要的 API,并控制所有出站流量。
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 um a new kind of architecture for building AI agents.
所以,有了这些,我们觉得可以构建一种更高效的、用于构建 AI 智能体的新型架构。
Uh one of one of applications of dynamic workers, we made a little noise about it a while ago, is my colleague Matt Carey built our MCP server.
Dynamic Workers 的一个应用,我们之前稍微提到过,是我的同事 Matt Carey 构建了我们的 MCP 服务器。
Uh the Cloudflare API is 2,600 API endpoints.
Cloudflare API 有 2600 个 API 端点。
So, if you expose the tool for each one of them, 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 open API JSON."
所以你可以说:这是一段 JavaScript 代码,搜索整个 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 used in, and if it starts with the letter Z, then apply DDoS protection for it."
第二次,你可以说:这是一段代码,找出我所有的 Workers,找到它们使用的 DNS 记录,如果以字母 Z 开头,就为其启用 DDoS 防护。
In one tool call, no back and forth with the LLM, and it's type checked, and well, turns out LLMs are great at running code.
一次工具调用,无需与 LLM 来回交互,而且是类型检查的,事实证明 LLM 非常擅长运行代码。
So, this is fundamental capabilities.
所以这是基础能力。
It's not something you can patch on and use it and so, that makes me excited about Cloudflare for the future of agentic software.
这不是你可以打补丁然后用的东西,这让我对 Cloudflare 在智能体软件未来的前景感到兴奋。
I I don't know if you've you've looked at sort of Cloud managed agents thing.
我不知道你有没有看过 Cloud Managed Agents 这个东西。
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?
有什么看法吗?
I do like their thing.
我确实喜欢他们做的东西。
They made a point of pointing out that the harness 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 towards the future, by the way.
顺便说一句,这是一种面向未来的绝妙思路。
It's not that you're just going to build the next crowd API.
你不只是要构建下一个云 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 an intelligence layer via the harness.
我们甚至不知道未来会是什么形态,而在需要在沙箱环境中运行的同时,我们确实有一些想法,如何通过编排器暴露能力和智能层。
I think that's like excellent.
我认为这非常出色。
Yeah.
对。
Do you think that becomes sort of standardized?
你觉得这会变得标准化吗?
Like Cloudflare is someone that would probably plug in support.
比如 Cloudflare 是可能会接入支持的玩家。
Is there a standard unified layer around that?
这方面有统一的标准层吗?
Is there bits you take, different ways that you see it?
你看到了哪些不同方向?
Like everyone is building for a version of the future of software engines.
大家都在为软件引擎的未来某个版本而构建。
Uh, do you have a vision that you see?
你有什么愿景吗?
It's so hard, but the way I'm framing it in my head is no one has built the React yet.
这太难了,但我在脑子里这样框架:还没有人构建出那个 React。
You know, like the moment React came in, it wasn't I mean, it annoyed a bunch of people because it seemed so different.
你知道,React 出现的时候,很多人感到恼火,因为它看起来太不同了。
The fact that you can build uh, describe a component tree with XML.
用 XML 描述组件树这个概念。
I I don't know if you remember in 2013, people were walking out of the talk 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.
我不知道你是否记得2013年,人们在介绍 React 的演讲中途就走出去,说 Facebook 讨厌 JavaScript,但它奠定了未来每一个框架的基础,React 至今仍然举足轻重。
I suspect we everyone
我猜我们所有人
Now everyone is building a harness 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.
我猜我们还没做到这一点。
It might just be skills.
也许就是 skills。
I feel like skills are the ultimate translation.
我觉得 skills 是终极的翻译层。
And they're they're a version where
它们有一个版本是
It's just English.
就是英文。
They scale well, it's English.
它们扩展性好,就是英文。
Uh, you know, you can abstract it down, you can create skills on their own.
你可以向下抽象,可以自己创建 skills。
Is that it?
就是这样吗?
Like, by the way, I'd be so happy if you say the future of software is markdown files.
顺便说一句,如果你说软件的未来是 markdown 文件,我会非常开心。
Beautiful.
完美。
Instantly accessible, a multi-language, bridges the world.
即时可访问,多语言,连接世界。
Uh, could just be skills.
也许就是 skills。
But like, do 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?
但是,用 skills 最终会不会碰到那个问题,就是你必须变得越来越具体,到了某个点你就想:我还不如直接写代码?
Yeah, yeah.
对,对。
I'm being very precise about my my stuff.
我在写的东西非常精确。
Yeah, I mean and skills bundle code as well, right?
对,我的意思是 skills 也打包了代码,对吧?
So, the whole whole bunch of things.
所以是一整套东西。
Okay, there's I mean there's other topics that we can also touch on.
好,我是说还有其他话题可以聊。