# Repository Briefing: triggerdotdev/trigger.dev
> Source: https://repoforai.com/repo/triggerdotdev/trigger.dev (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/triggerdotdev/trigger.dev
- **Official Docs / Website**: https://trigger.dev/changelog
- **Category**: Agents & Frameworks (智能体与框架)
- **Primary Language**: TypeScript
- **License**: Apache-2.0
- **Engineering Health**: A+ (96/100 · Maintenance 35/35 · Adoption 21/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v4.9.1 (2026-12-02) — https://github.com/triggerdotdev/trigger.dev/releases
- **Review Snapshot**: 2026-12-04
- **Deployment / Stack Signals**: MCP, Docker, Self-Hosted, CLI
- **Momentum**: 16,872 ★ total (+4 24h / +51 7d) · 1,557 forks
- **Topics**: `ai`, `ai-agent-framework`, `ai-agents`, `automation`, `background-jobs`, `mcp`, `mcp-server`, `nextjs`, `orchestration`, `scheduler`, `serverless`, `workflow-automation`
- **When to Use**: Best for: TypeScript teams building long-running AI conversations or background workflows that need retries, human approvals, run traces, and live progress in the product. Skip if: A simple queue or scheduled job already meets your needs, or your primary requirement is an offline model-serving stack rather than task orchestration.

## Overview
```text
### Architecture & Core Mechanics
Trigger.dev separates application-owned task code from the service that executes and tracks it. Developers define tasks with the TypeScript SDK and run them on Trigger.dev Cloud or a self-hosted instance. The platform manages queues, retries, and run state, while the application can subscribe to run updates or stream results. For multi-turn chat, `chat` from `@trigger.dev/sdk/ai` exposes `chat.agent`, which gives each conversation its own task lifecycle.

The pnpm workspace separates `apps/`, `packages/`, and `internal-packages/`, with deployment material under `docker/` and `hosting/`. The root manifest lists `@changesets/cli`, `@remix-run/changelog-github`, and `agentcrumbs`; it is not a complete inventory of execution-service dependencies. MCP is a project integration interface for assistants, distinct from the TypeScript task-authoring API and from model inference.

### Key Capabilities & Differentiators
The execution model supports long-running jobs, approval waits, and input streams that let backend code send data to an active run. Applications can expose progress through run subscriptions or stream AI output to users. The chat example uses `streamText` from the Vercel AI SDK with the `@ai-sdk/anthropic` adapter. This establishes one concrete provider integration, not an exhaustive compatibility list or evidence of bundled model serving.

Prompt templates can live in code, be versioned on deploy, and be overridden from the dashboard without a redeploy. Vercel AI SDK calls surface as spans with model identity, token usage, cost, and latency. TRQL powers custom real-time dashboards, while the health report separates Flow, Execution, and Liveness. Provider webhooks can route verified events to tasks, agents, or waiting runs, but the feature is in public beta.

### Trade-offs & Limitations
Compared with a plain queue worker, Trigger.dev puts retries, run traces, approval waits, and live app updates behind one task interface. That is useful when background work has a user-visible lifecycle. For short, independent jobs, the separate deployment and execution service may add more operational surface than it removes. Retries also do not make application side effects exactly-once: tasks that write externally or call third-party APIs still need idempotent behavior at those boundaries.

Cloud hosting avoids running the orchestration service yourself. Self-hosting gives you control over that service but makes capacity planning, monitoring, and upgrades your responsibility. If tasks still call external model APIs, those services remain separate dependencies. Before adopting, test how representative workflows behave across failures and deployments, and verify which operational features your chosen deployment mode provides rather than assuming cloud and self-hosted parity.

### Hardware & Deployment Guide
The shortest path is to create a Trigger.dev Cloud project, add SDK tasks to the application, and use the CLI as part of development and deployment. Development, Staging, Preview, and Production environments are available, and development branches isolate concurrent local sessions. For self-hosting, use Docker Compose or the official Helm chart on Kubernetes. Running the orchestration service on your own infrastructure does not make an external model API available offline.

The v4.9.1 release provides `ghcr.io/triggerdotdev/trigger.dev:v4.9.1` and lists `npx trigger.dev@latest update` as a CLI upgrade path. The Helm release publishes chart version `4.9.1` at `oci://ghcr.io/triggerdotdev/charts/trigger`. For production sizing, measure concurrent runs with representative task workloads. The external Anthropic API example does not require local GPU inference, but browsers, Python scripts, and FFmpeg can materially change worker resource needs.
```

## Key Capabilities
```text
- Task execution: TypeScript SDK tasks with queues, retries, and idempotency for long-running application work.
- Conversation lifecycle: `chat.agent` runs one task per conversation across refreshes, deployments, and crashes.
- Human interaction: Approval waits and backend input streams let external decisions reach a run already in progress.
- LLM tracing: Vercel AI SDK calls appear as run spans with model, token usage, cost, and latency.
- Operational interfaces: MCP connects assistants to Trigger.dev projects; health reports are available via CLI, MCP, or HTTP API.
- Deployment artifacts: Hosted service, Docker Compose self-hosting, and an official Kubernetes Helm chart.
```

## Quick Start / Clone
```bash
import { chat } from "@trigger.dev/sdk/ai";
import { stepCountIs } from "ai";
import { anthropic } from "@ai-sdk/anthropic";

export const myChat = chat.agent({
  id: "my-chat",
  run: async ({ messages, signal, streamText }) => {
    return streamText({
      model: anthropic("claude-opus-5-5"),
      messages,
      abortSignal: signal,
      stopWhen: stepCountIs(15),
    });
  },
});
```
