Trigger.dev

Build and deploy fully-managed AI agents and background jobs in TypeScript — with no timeouts, durable retries, real-time observability, and elastic scaling built in.

15.6Kstars
1.3Kforks
Apache License 2.0
TypeScript

Trigger.dev is an open-source platform designed for developers who need to run long-lived background tasks, scheduled jobs, and AI agent workflows without the constraints of serverless timeouts. It integrates directly into your TypeScript codebase — tasks live alongside your application code in version control, get reviewed like any other code, and deploy through a CLI with zero infrastructure to manage.

The platform is purpose-built for the era of AI workloads. Running an LLM pipeline, orchestrating a multi-step AI agent, processing a large batch of documents, or waiting on a human to approve a decision — these are workflows that can run for minutes or hours. Trigger.dev removes artificial execution limits while adding durable checkpointing, so a task interrupted mid-flight resumes exactly where it left off rather than starting over.

Observability is a first-class citizen. Every run produces a full OpenTelemetry trace, structured logs, and real-time streaming output you can pipe directly into your frontend using React hooks. You can subscribe to live run updates, stream AI-generated responses to end users, and attach metadata that updates as the task progresses — turning background jobs into foreground experiences.

Self-hosting is fully supported via Docker Compose and Kubernetes Helm charts, and a managed cloud tier at cloud.trigger.dev handles scaling automatically. Whether you’re a solo developer needing reliable cron jobs or an enterprise team orchestrating thousands of concurrent AI agents, Trigger.dev grows with the workload.

What You Get

  • A TypeScript SDK for defining tasks with the task(), schedules.task(), and schemaTask() APIs that live in your existing codebase
  • A CLI for deploying tasks to the cloud or your own Docker/Kubernetes infrastructure with zero cold-start configuration
  • A web dashboard with full OpenTelemetry trace views, structured logs, run filtering by tags, and real-time streaming output for every job
  • Realtime API with React hooks (useRealtimeRun, useTaskTrigger) to subscribe to live run state and stream AI responses to your frontend
  • Human-in-the-loop waitpoint tokens that pause execution until an external signal — webhook, SDK call, or expiry — completes them
  • Concurrency controls, priority queues, and rate limits configurable per task or per queue with atomic versioning for zero-downtime deploys

Common Use Cases

  • Running AI agent pipelines that call multiple LLMs, search tools, and external APIs over many minutes without timeout failures
  • Processing large files or datasets in parallel batch runs with automatic retry on partial failures and idempotent re-runs
  • Scheduled ETL jobs, nightly aggregations, and periodic report generation with cron syntax and durable execution guarantees
  • Approval workflows where AI output is generated, surfaced to a reviewer via webhook, and resumed after a human decision

Under The Hood

Trigger.dev is built on a TypeScript monorepo managed with pnpm workspaces and Turborepo for incremental builds. The SDK (@trigger.dev/sdk) exposes the task(), schemaTask(), and schedules APIs that compile into deployable workers using a custom esbuild-based build pipeline with pluggable extensions. Workers communicate with the Trigger.dev platform over a secure WebSocket protocol managed by the coordinator and supervisor apps.

The runtime uses a checkpoint-resume system backed by Kubernetes checkpointing (or in-memory snapshotting in Docker mode) that serializes task execution state to persistent storage. This is what enables durability across interruptions — a pod eviction or crash does not lose in-flight work. Waitpoints are implemented as distributed tokens stored in a Redis-backed queue; completing a token wakes the paused run without polling.

Observability is wired throughout the stack via OpenTelemetry. Every SDK operation — task start, subtask trigger, wait, retry, log statement — emits a span. These roll up into a hierarchical trace visible in the dashboard. The @trigger.dev/core package exposes the tracer, semantic attributes, and serialization utilities used across all packages.

What sets Trigger.dev apart architecturally is its hybrid execution model: developers write standard TypeScript functions, but the platform wraps them in a durable execution envelope at deploy time. There is no special API to learn for retries or checkpointing — they are ambient properties of every task. The AI layer (ai.ts, chat.ts, streams.ts in the SDK) adds first-class support for streaming LLM responses and composing agent skill graphs directly inside durable tasks.

Self-Hosting

Trigger.dev Cloud offers managed infrastructure with SOC 2 compliance, SSO, role-based access control, and priority support SLAs. Enterprise teams can also self-host using the official Helm chart for Kubernetes, enabling data residency and integration with internal secret managers. Volume pricing, dedicated infrastructure, and professional services are available — contact the team at trigger.dev for details.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack

No spam. Unsubscribe anytime.

Join 750+ subscribers
No spam. Unsubscribe anytime.

Search