Trigger.dev | The open source platform for durable AI agents
Build and deploy durable AI agents and workflows
Trigger.dev is the open source platform for building AI agents in TypeScript. Long-running tasks with retries, queues, AI observability, and elastic scaling.
Start building now AI agents Webhooks Media processing Media generation Human in the loop Streaming Run Python Marketing Browser automation Scheduled tasks Concurrency Retries Semantic search Email sequences// Durable AI chat agent: survives refreshes, redeploys, and crashes
const tools = {
searchDocs: tool({
description: "Search the product docs",
inputSchema: z.object({ query: z.string() }),
execute: async ({ query }) => searchIndex(query),
}),
refundOrder: tool({
description: "Refund an order",
inputSchema: z.object({ orderId: z.string() }),
needsApproval: true, // pauses for human approval; the run stays alive
execute: async ({ orderId }) => payments.refund(orderId),
}),
};
export const supportAgent = chat.agent({
id: "support-agent",
tools, // declared once, threaded everywhere and typed in run()
run: async ({ messages, tools, signal }) =>
streamText({
// Wires the system prompt, tool approval (HITL),
// compaction, mid-turn steering, and telemetry
...chat.toStreamTextOptions({ tools }),
model: anthropic("claude-sonnet-4-5"),
messages,
abortSignal: signal,
stopWhen: stepCountIs(15),
}),
});
Build durable AI agents that survive refreshes, redeploys, and crashes. Stream to your frontend with no API routes, plus tool calling, human-in-the-loop, and full observability.
Build durable chat agents Powering billions of runs at companies like:"We run millions of workflows a month on Trigger.dev: orchestration, calendar sync, an AI agent for phishing, fraud, and billing. Encrypted snapshots keep PII out of the platform, retry.onThrow handles the failures we expect, and batched replays handle the ones we don't."
Morgan Vernay
Cal.com
Visit Cal.comHow it works
Play
Replay
Full screen
Write tasks in your Trigger folderBuild invincible AI apps
Offload any long-running async AI tasks to our infrastructure. Create AI agents with human-in-the-loop functionality and stream responses directly to your frontend.
AI agents overviewAutonomous agent
Prompt chaining
Routing
Parallelization
Orchestrator
Evaluator-optimizer
Deploy and scale to any size
No timeouts
Write simple, reliable code and never hit a timeout.
Pay for what you use
Only pay when your code is actually executing.
No servers to manage
We deploy your tasks and handle scaling for you.
Find and fix bugs fast
Alerts for errors
Get notified via email, Slack or webhooks when your tasks or deployments fail.
Advanced filtering
Find runs fast using advanced filtering options, then apply bulk actions to multiple tasks at once.
Versioning
Each deploy is an atomic version ensuring started tasks are not affected by code changes.
Bring your tasks to the foreground
Trigger.dev Realtime
Display the status of your tasks anywhere in your app
Show the run status (in progress, completed, failed) and metadata to provide real-time, contextual information for your users as your tasks progress.
Realtime docsUpdate your UI in real-time with the run status
Realtime streams
Stream LLM responses from your runs to your users
Forward streams from any provider through our Realtime API. Build AI agents with tools and context from your runs.
Realtime streams docsPipe streams to your frontend from your runs
True runtime freedom for developers
Unlike restricted runtimes, Trigger.dev lets you freely customize every aspect of your build process, resulting bundle, and final container image.
Python
Execute Python scripts with automatic package installation through requirements.txt
Learn morePrisma
Copy files to the build directory, generate the Prisma client, migrate databases, and more.
Learn morePuppeteer
Automate browser capabilities and control web pages.
Learn moreesbuild
Add custom esbuild plugins to your build process.
Learn moreFFmpeg
Add FFmpeg binaries to your project during build time, enabling video manipulation tasks.
Learn moreapt-get
Easily install any system packages you need, from libreoffice to git
Learn moreadditionalPackages
Add additional packages which aren't automatically included via imports.
Learn moreaudioWaveform
Produce visual renderings of audio using waveform data.
Learn moreCustom build extensions
Integrate custom tooling and project-specific requirements directly into your build pipeline.
Get startedAll the tools you need to ship
View all featuresDevelopment
AI Prompts
Write tasks in regular code
Durable cron schedules
Realtime updates & streaming
React hooks
MCP Server
Python support
Max duration
Batch triggering
Typed, validated payloads
Waits
Durable webhooks
Wait for HTTP callback
Preview branches
Input Streams
Dev branches
Production
Durable chat agents
Multi-region workers
Static IPs
AWS PrivateLink
Concurrency & queues
Human-in-the-loop
Multiple environments
Elastic infrastructure
Automatic retries
Build extensions
Checkpointing
Machines
Vercel integration
GitHub integration
Version skew protection
Observability
LLM observability
Observability & monitoring
Logging & tracing
Tags
Advanced run filters
Run metadata
Bulk actions
Real-time alerts
Query
Dashboards
Errors
Reliable by default
Docsimport { task } from "@trigger.dev/sdk";
export const simpleTask = task({
id: "simple-task",
retry: {
maxAttempts: 3,
minTimeoutInMs: 1000,
maxTimeoutInMs: 5000,
factor: 2,
randomize: true,
},
run: async (payload, { ctx }) => {
logger.log(`Attempt ${ctx.attempt.number}`);
try {
throw new Error("This is an error.");
} catch (error) {
// The error was caught, so no retry
}
throw new Error("This will cause a retry.");
},
});
Works with your existing tech stack...
We love open source. Trigger.dev is Apache 2.0 licensed so you can view the source code, contribute and self-host.
16.9k+
stars on GitHub
Apache 2.0
open source license
5.1k+
Discord members
Loved by developers
Join our communityTrigger.dev is redefining background jobs for modern developers.
Paul Copplestone
Supabase
Trigger.dev is one of those tools that you set up once (takes like 30 minutes) and then never have to worry about again. We use it heavily at Magic Patterns and wish we used it earlier. Previously, we had a homegrown cron job solution.. not good.
Alex Danilowicz
Magic Patterns
With Trigger.dev, we've summarized over a million student interactions in just a couple of weeks. We're incredibly thankful for tools like Trigger.dev that are empowering us to bring AI-driven solutions to educators and students at scale.
Ben Duggan
MagicSchool AI
Trigger.dev lets us focus on AI logic, not infrastructure. We can now ship workflow orchestration the same way we ship backend features.
Karl Kaiser
Pallet
We have critical business functionalities that need to be reliable and replayable in the event of a failure. Trigger.dev helps us deliver messages over WhatsApp, run thousands of jobs with custom LLM workflows, and execute ETL processes to sync our data across multiple databases without breaking a sweat!
Patryk Maron
DRPCRD
We love Trigger.dev and it's had a big impact in dev iteration velocity already.
André Neves
ZBD
The reliability of Trigger.dev's job scheduling has been essential as we've scaled our evidence collection automation and built our open source community of 600+ compliance professionals.
Lewis Carhart
Comp AI
We migrated from an AWS background job service that required a dedicated expert for maintenance. Trigger.dev's TypeScript support, simplicity and visual feedback let us focus on making AI excellent at UI creation instead of managing infrastructure.
Junior Garcia
HeroUI
Trigger is a central part of our architecture. It's allowed us to build a resilient system to orchestrates data across multiple systems. We love its observability, replayability, and how easily it slots into our existing codebase. It allows us to refine over time how to set the boundaries between async tasks and synchronous business logic.
Agree Ahmed
Flowglad
Trigger.dev is undoubtedly one of my most cherished services. Throughout my two-decade career, it's rare to encounter a product or service that truly resonates and makes a significant impact. It just clicks - an absolute game-changer for us. The support is beyond exceptional, and they genuinely care about the product and their users. I wholeheartedly recommend Trigger!
Aaron J. Spurlock
Midtown HI
For AI powered products, Trigger.dev is my clear go-to tool for building robust serverless pipelines stitching together various LLM calls.
Evan Sandler
Blee
The Trigger.dev developer experience is unparalleled for building durable agents. Queues, streaming, retries, logging and more, all with just a few lines of code.
Justin Sun
Capy
Teams routinely find 200% more opportunities and increase proposal output by 70% using GovSignals. We build on Trigger.dev to make that level of scale practical.
Conner Aldrich
GovSignals
Trigger.dev was the missing piece in our journey to go fully serverless. It enables us to focus entirely on building our product without worrying about the complexities of background jobs. The best part? We're continuously adding more jobs as we scale!
Pontus Abrahamsson
Midday
We found software that's open-source friendly called MuPDF which runs in Node.js environments. Combined with using Trigger's tasks and runs, it solved our problem instantly. We are now easily processing around 6,000 documents per month anywhere from one page to hundreds of pages.
Marc Seitz
Papermark
The platform transformed my workflow, I'm thrilled with it! Migrating my agentic workflow from Python to Trigger.dev has been a major win. Rare to find powerful features paired with such responsive assistance.
Gerasimos
Tierly
Changelog
View allIntroducing the new Alerts
See a whole agent session on one timeline
Our docs got a big upgrade
You can now search all your logs from one place
Deploy your first agent today
Get set up in minutes, either on your own or with your coding assistant.
Get started for freeSimple pricing
Only pay for what you use and scale with your needs.
Explore pricingSelf-host
Trigger.dev is open source and self-hostable.
Self-hosting docs