启动 HN:Trigger.dev(YC W23)——构建可靠 AI 应用的开源平台

24作者: eallam3 个月前原帖
嗨,HN,我是Eric,Trigger.dev的首席技术官(CTO)。我们是一个开发者平台,专注于构建和运行AI代理及工作流,采用Apache 2.0许可证开源([https://github.com/triggerdotdev/trigger.dev](https://github.com/triggerdotdev/trigger.dev))。 我们提供创建生产级代理所需的一切工具,您可以在代码库中部署、运行、监控和调试这些代理。您可以单独使用我们的基础组件,或者与Mastra、LangChain和Vercel AI SDK等工具结合使用。您可以选择自托管或使用我们的云服务,我们会为您处理扩展问题。这里有一个快速演示:[https://youtu.be/kFCzKE89LD8](https://youtu.be/kFCzKE89LD8)。 我们于2023年成立,旨在可靠地在TypeScript中运行异步后台任务/工作流([https://news.ycombinator.com/item?id=34610686](https://news.ycombinator.com/item?id=34610686))。最初,我们并不部署您的代码,而只是对其进行编排。但我们发现大多数开发者在编写具有隐式确定性的可靠代码时遇到了困难,拆分工作为小“步骤”也很棘手,他们希望能够安装所需的系统软件包。无服务器的超时限制使这一过程更加痛苦。 我们还希望允许您等待某些事情的发生:例如外部事件、其他任务的完成或时间的流逝。这些等待可能需要几分钟、几小时,甚至在事件发生的情况下可能永远无法结束,因此您不能仅仅保持服务器运行。 解决方案是构建并运营我们自己的无服务器云基础设施。使这一切成为可能的关键突破是意识到我们可以快照CPU和内存状态。这使我们能够暂停正在运行的代码,存储快照,然后在不同的物理服务器上恢复它。我们目前使用的是用户空间中的检查点恢复(Checkpoint Restore In Userspace,CRIU),自2018年以来,谷歌在Borg内部大规模使用这一技术。 从那时起,尤其是由于AI代理/工作流的推动,我们的采用率迅速上升。这开启了许多新的用例,例如生成视频的计算密集型任务(Icon.com)、实时计算机使用(Scrapybara)、AI增强管道(Pallet、Centralize)和氛围编码工具(Hero UI、Magic Patterns、Capy.ai)。 您可以通过Trigger.dev云服务([https://cloud.trigger.dev](https://cloud.trigger.dev))、自托管([https://trigger.dev/docs/self-hosting/overview](https://trigger.dev/docs/self-hosting/overview))开始使用,或者阅读文档([https://trigger.dev/docs](https://trigger.dev/docs))。 这里有一些即将推出的变化的预告:1)自托管的热启动 2)切换到MicroVMs进行执行——这将是开源的、自托管的,并将包括检查点/恢复功能。 我们很高兴能与HN分享这些内容,并欢迎所有反馈!
查看原文
Hi HN, I’m Eric, CTO at Trigger.dev (<a href="https:&#x2F;&#x2F;trigger.dev">https:&#x2F;&#x2F;trigger.dev</a>). We’re a developer platform for building and running AI agents and workflows, open-source under the Apache 2.0 license (<a href="https:&#x2F;&#x2F;github.com&#x2F;triggerdotdev&#x2F;trigger.dev" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;triggerdotdev&#x2F;trigger.dev</a>).<p>We provide everything needed to create production-grade agents in your codebase and deploy, run, monitor, and debug them. You can use just our primitives or combine with tools like Mastra, LangChain and Vercel AI SDK. You can self-host or use our cloud, where we take care of scaling for you. Here’s a quick demo: (<a href="https:&#x2F;&#x2F;youtu.be&#x2F;kFCzKE89LD8" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;kFCzKE89LD8</a>).<p>We started in 2023 as a way to reliably run async background jobs&#x2F;workflows in TypeScript (<a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=34610686">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=34610686</a>). Initially we didn’t deploy your code, we just orchestrated it. But we found that most developers struggled to write reliable code with implicit determinism, found breaking their work into small “steps” tricky, and they wanted to install any system packages they needed. Serverless timeouts made this even more painful.<p>We also wanted to allow you to wait for things to happen: on external events, other tasks finishing, or just time passing. Those waits can take minutes, hours, or forever in the case of events, so you can’t just keep a server running.<p>The solution was to build and operate our own serverless cloud infrastructure. The key breakthrough that enabled this was realizing we could snapshot the CPU and memory state. This allowed us to pause running code, store the snapshot, then restore it later on a different physical server. We currently use Checkpoint Restore In Userspace (CRIU) which Google has been using at scale inside Borg since 2018.<p>Since then, our adoption has really taken off especially because of AI agents&#x2F;workflows. This has opened up a ton of new use cases like compute-heavy tasks such as generating videos using AI (Icon.com), real-time computer use (Scrapybara), AI enrichment pipelines (Pallet, Centralize), and vibe coding tools (Hero UI, Magic Patterns, Capy.ai).<p>You can get started with Trigger.dev cloud (<a href="https:&#x2F;&#x2F;cloud.trigger.dev">https:&#x2F;&#x2F;cloud.trigger.dev</a>), self-hosting (<a href="https:&#x2F;&#x2F;trigger.dev&#x2F;docs&#x2F;self-hosting&#x2F;overview">https:&#x2F;&#x2F;trigger.dev&#x2F;docs&#x2F;self-hosting&#x2F;overview</a>), or read the docs (<a href="https:&#x2F;&#x2F;trigger.dev&#x2F;docs">https:&#x2F;&#x2F;trigger.dev&#x2F;docs</a>).<p>Here’s a sneak peek at some upcoming changes: 1) warm starts for self-hosting 2) switching to MicroVMs for execution – this will be open source, self-hostable, and will include checkpoint&#x2F;restoring.<p>We’re excited to be sharing this with HN and are open to all feedback!