Quick start
Build AI agents
AI coding assistants
Guides & examples
Set up with AI
Copy this prompt into your AI coding assistant from your app’s directory:What is Trigger.dev?
Trigger.dev is the open source platform for building and running durable AI agents and workflows in TypeScript. You write tasks and agents in your existing codebase, and they run on Trigger.dev with retries, queues, waits, full tracing, and elastic scaling. There’s no execution timeout, and no queue or worker infrastructure for you to build. Trigger.dev’s core is Apache-2.0 licensed. Self-host it on your own infrastructure, or let Trigger.dev Cloud run it for you.Build agents with chat.agent
A chat.agent runs each conversation as one durable task. It wakes when a message arrives and idles between turns, and its state survives page refreshes, deploys, and crashes. Turn lifecycle, resuming a stream mid-reply, and approvals are handled for you, and your frontend connects with the AI SDK’s useChat, with no API routes to write.
trigger/chat.ts
Agent quick start
Sessions
Tools
Human in the loop
Slack agents
Linear agents
Run work
Writing tasks
Triggering tasks
Runs
Realtime
React to events
Webhooks
Scheduled tasks
Webhook waiters
Waits
Run in production
Queues & concurrency
Machines
Deployment
Errors & retries
Logs, traces & metrics
Query & dashboards
Frequently asked questions
Can I use Trigger.dev for background jobs, not just AI? Yes. The same durable tasks, queues, retries, and cron schedules run any background job or workflow, with or without AI. How long can a run take? As long as it needs. Runs have no maximum duration by default, and you can set amaxDuration for a project, a task, or a single run to cap it.
Do my serverless function timeouts apply? No. Tasks run on Trigger.dev, not inside your serverless functions, so your platform’s function timeout isn’t in the execution path. Your backend triggers the task and returns.
Can I receive webhooks without running a server? Yes. Declare a webhook endpoint in your code, and Trigger.dev hosts its URL, verifies each request, and delivers the event to your tasks and agents.
How do I add human-in-the-loop approval? Pause the run on a waitpoint until a person approves, or use a chat agent’s approvals for tool calls. A waiting run doesn’t use compute, so it can wait minutes or days.
Does Trigger.dev support tool calling and MCP? Yes. Agents call the tools you define, and the MCP server lets AI coding assistants trigger tasks, deploy, and read run traces.
Can I self-host? Yes. Trigger.dev is open source. Read the self-hosting overview, or set it up with Docker or Kubernetes.

