Trigger.dev 是一个开源平台,用来在 TypeScript 代码库中编写并部署后台任务与 AI 工作流。你照常使用熟悉的框架和 LLM 写代码,平台负责调度执行:任务没有超时限制,可运行数小时甚至更久;失败会自动重试;支持队列与并发控制,以及幂等、等待、断点续跑等能力。它提供完整的运行追踪和日志,可通过 Realtime 向应用实时推送进度或流式输出,并支持在关键节点暂停任务、等待人工审批。内置开发、预览、预发、生产多环境与原子版本发布,不干扰正在运行的任务;还允许在构建阶段安装系统依赖,以便运行浏览器、Python 脚本或 FFmpeg。可托管使用,也能自托管。

Website | Docs | Issues | Example projects | Feature requests | Public roadmap | Self-hosting
Trigger.dev is the open-source platform for building AI workflows in TypeScript. Long-running tasks with retries, queues, observability, and elastic scaling.
Build AI agents using all the frameworks, services and LLMs you're used to, deploy them to Trigger.dev and get durable, long-running tasks with retries, queues, observability, and elastic scaling out of the box.
Long-running without timeouts: Execute your tasks with absolutely no timeouts, unlike AWS Lambda, Vercel, and other serverless platforms.
Durability, retries & queues: Build rock solid agents and AI applications using our durable tasks, retries, queues and idempotency.
True runtime freedom: Customize your deployed tasks with system packages – run browsers, Python scripts, FFmpeg and more.
Human-in-the-loop: Programmatically pause your tasks until a human can approve, reject or give feedback.
Realtime apps & streaming: Move your background jobs to the foreground by subscribing to runs or streaming AI responses to your app.
Observability & monitoring: Each run has full tracing and logs. Configure error alerts to catch bugs fast.
Create tasks where they belong: in your codebase. Version control, localhost, test and review like you're already used to.
import { task } from "@trigger.dev/sdk";
//1. You need to export each task
export const helloWorld = task({
//2. Use a unique id for each task
id: "hello-world",
//3. The run function is the main function of the task
run: async (payload: { message: string }) => {
//4. You can write code that runs for a long time here, there are no timeouts
console.log(payload.message);
},
});
Use our SDK to write tasks in your codebase. There's no infrastructure to manage, your tasks automatically scale and connect to our cloud. Or you can always self-host.
We support Development, Staging, Preview, and Production environments, allowing you to test your tasks before deploying them to production.
View every task in every run so you can tell exactly what happened. We provide a full trace view of every task run so you can see what happened at every step.

The quickest way to get started is to create an account and project in our web app, and follow the instructions in the onboarding. Build and deploy your first task in minutes.
If you prefer to self-host Trigger.dev, you can follow our self-hosting guides:
We have a large active community in our official Discord server for support, including a dedicated channel for self-hosting.
To setup and develop locally or contribute to the open source project, follow our development guide.
内容由编辑整理,部分信息来自 GitHub 与项目官网,版权归原作者所有。发现错误?报告问题