---
title: Run your startup's background workers on Vercel Daemons
description: Run your startup's queue consumers and background workers on Vercel Daemons, with graceful shutdown, health checks, tracing, scaling, and cost controls.
keywords: ["Daemons","Startups","Background workers"]
url: "https://vercel.com/kb/guide/startups-on-vercel-daemons"
published: 2026-12-03
last_updated: 2026-12-03
authors: Ben Sabic
related_resources:
  - title: "The Complete Guide to Vercel Daemons"
    url: "/kb/guide/vercel-daemons"
    description: "Run background workers with Vercel Daemons. Learn how to deploy container images, configure resources, handle shutdowns, and manage instances."
  - title: "Running background workers on Vercel"
    url: "/kb/guide/background-workers-on-vercel"
    description: "Run background jobs on Vercel with waitUntil, Cron Jobs, Queues, Workflows, Daemons, or Sandbox. Compare the options and pick the right one for your workload."
  - title: "How to choose between Functions, containers, and Daemons on Vercel"
    url: "/kb/guide/vercel-functions-containers-daemons"
    description: "Choose Vercel Functions for HTTP requests, container images for custom runtimes, and Daemons for continuous background workers."
  - title: "Build your startup's product on Vercel Sandbox"
    url: "/kb/guide/startups-on-vercel-sandbox"
    description: "Build code interpreters, app previews, and upload-processing features with Vercel Sandbox, including authentication, persistence, security, and cost controls."
  - title: "Build your startup's AI features on Vercel AI Gateway"
    url: "/kb/guide/startups-on-vercel-ai-gateway"
    description: "Build customer-facing AI features with Vercel AI Gateway, including authentication, model fallbacks, usage attribution for each customer, data controls, and budgets."
install_vercel_plugin: npx plugins add vercel/vercel-plugin
search_with_vercel_cli: npx vercel@latest kb search "<query>"
read_with_vercel_cli: "npx vercel@latest kb inspect startups-on-vercel-daemons"
---

[Vercel Daemons](https://vercel.com/docs/daemons) runs continuous background workers from container images in the same project as your web app and API. Vercel builds each image, maintains your configured instance count in each region, and restarts instances that exit or crash.

Your team has no separate worker infrastructure to operate, but your code still owns the loop. It pulls work from a queue, a database, or an external API, makes each job safe to run twice, and shuts down cleanly when Vercel sends `SIGTERM`. If you're still choosing a host, compare [where to host background workers](https://vercel.com/i/where-to-host-background-workers).

## Decide whether Vercel Daemons fits your product

Vercel Daemons is in [Public Beta](https://vercel.com/changelog/vercel-daemons-is-now-in-public-beta) on the Hobby, Pro, and Enterprise plans. Each daemon is a named entry under the `daemons` key in `vercel.json` that points at a `Dockerfile` or `Containerfile`. Vercel builds the image during the build and, when the deployment becomes your production deployment, starts the instances on [Fluid compute](https://vercel.com/docs/fluid-compute), the compute platform that also runs Vercel Functions.

Daemons are pull-based. They accept no inbound HTTP or TCP traffic, so each instance fetches its own work over outbound connections. If you haven't mapped your workloads yet, start with the [types of backend workloads](https://vercel.com/i/backend-workload-types) and the guide to [choosing between Functions, containers, and Daemons](https://vercel.com/kb/guide/vercel-functions-containers-daemons).

The beta has boundaries to plan around:

- Daemons run only in production. Preview deployments don't start them.
  
- Vercel doesn't autoscale daemons. You set instance counts in `vercel.json` or override them yourself.
  
- Local storage is ephemeral, so store [files and state that must survive restarts](https://vercel.com/i/serverless-container-storage) in [Vercel Blob](https://vercel.com/docs/vercel-blob) or another external service.
  
- `vercel dev` skips daemons, so you test the image with Docker.
  
- The project's root directory must be the repository root.
  
- Images build for Linux `amd64`.
  

Continuous workers can support these product workloads, each with different operational requirements:

| Product pattern                             | What the daemon does                                                          | Plan for                                                  |
| ------------------------------------------- | ----------------------------------------------------------------------------- | --------------------------------------------------------- |
| Queued media and document jobs              | Polls Vercel Queues and processes jobs with tools such as `ffmpeg`            | Queue polling, memory, and shutdown time                  |
| Existing workers and multi-service backends | Runs Celery, BullMQ, or Sidekiq against its broker and calls private services | Worker commands, broker credentials, and service bindings |
| Agents, bots, and CI workers                | Runs agent sessions, chat bots, or CI workers                                 | Instance counts, probes, and OIDC rotation                |

Small teams already keep their backends in one Vercel project so they don't operate separate infrastructure. [Delphi](https://vercel.com/blog/how-delphi-ships-100-times-a-day-with-its-python-backend-on-vercel) has ten engineers and no dedicated infrastructure role. It moved its Python backend from AWS ECS to Vercel and runs its background jobs on Vercel Queues.

[General Intelligence](https://vercel.com/blog/how-general-intelligence-used-agents-to-build-an-agent-platform-on-vercel) is an 8-person company that migrated its Python backend from Render so its engineers and coding agents work through one CLI, one API, and one observability layer. Neither team reports using Daemons. Daemons [extends that single-project model](https://vercel.com/blog/backends-on-vercel-python-containers-and-daemons) to workers that stay running and pull their own work.

### When Daemons doesn't fit

Choose another product when a request, a message, or a schedule starts the work:

- For webhooks and other HTTP requests, use [Vercel Functions](https://vercel.com/docs/functions) or [Vercel Services](https://vercel.com/docs/services).
  
- For jobs that Vercel can deliver to a function, use [Vercel Queues](https://vercel.com/docs/queues) in push mode, which scales consumers with traffic and works in preview deployments.
  
- For multi-step work that has to keep its progress, use [Vercel Workflows](https://vercel.com/docs/workflows). Compare [queues and workflows](https://vercel.com/i/queues-vs-workflows) to choose between the two.
  
- For recurring work, use [Cron Jobs](https://vercel.com/docs/cron-jobs).
  
- For code that a customer or a model wrote, [build on Vercel Sandbox](https://vercel.com/kb/guide/startups-on-vercel-sandbox). Daemon instances receive your production environment variables.
  

If a worker needs a persistent local disk, autoscaling, or its own copy in every preview deployment, keep it on its current host for now.

## Prerequisites

Before you begin, make sure you have:

- A [Vercel account](https://vercel.com/signup) and a project whose [root directory](https://vercel.com/docs/builds/configure-a-build#root-directory) is the repository root. The queue example assumes an existing Next.js App Router project.
  
- Permission to deploy to production, where daemons run during the beta.
  
- [Docker](https://docs.docker.com/get-docker/) to build and run the image locally.
  

For local development, use Node.js 24+ and the latest [Vercel CLI](https://vercel.com/docs/cli).

## Build with your agent

Use this prompt in your application's repository to add a queue consumer, move an existing worker, or run an agent, bot, or CI worker on Vercel Daemons.

### Agent prompt

```txt
Help me add a background worker to this application with Vercel Daemons, using https://vercel.com/kb/guide/startups-on-vercel-daemons and its linked documentation. Read and follow the guide using the Vercel CLI: `npx vercel@latest kb inspect startups-on-vercel-daemons`.

Inspect the repository and its dependencies first. If the intended workload isn't clear, ask whether I want a consumer for queued customer jobs, an existing Celery, BullMQ, or Sidekiq worker, or a long-running agent, bot, or CI worker. If the workload needs inbound requests, preview deployments, autoscaling, or a persistent local disk, stop and tell me which Vercel product fits instead.

1. Create the worker in its own directory with a Dockerfile for Linux amd64 and an exec-form `CMD`. Declare it under the top-level `daemons` key in `vercel.json`, with the smallest memory size that fits and one instance in the region of the queue or database.
2. Handle `SIGTERM` by taking no new work, finishing the job in progress within the grace period, and exiting. Back off when no work is available.
3. For Vercel Queues, publish and poll with the same fixed region, `deploymentId: null`, and topic. Use the same consumer group for worker instances that share the jobs. Make sure the worker resolves `@vercel/oidc` 4.0.0 or later. Let a failed job throw so the message is redelivered, and make every job idempotent.
4. Apply the application's authentication, authorization, and input validation in the route that enqueues jobs. Identify missing application-specific integrations instead of inventing them.
5. Read secrets from environment variables at runtime, and keep them out of image layers. Read the daemon's OIDC token on each use.
6. Add a `livenessProbe` only after the worker serves a health endpoint.
7. Build and run the image locally with Docker, and test startup, a successful job, a failed job, and shutdown with `docker stop`. Don't poll the production topic and consumer group from a local machine.

Return the changed files, the required environment variables without printing secrets, the checks performed, and the remaining deployment steps. Explain the plan quotas and the Provisioned Memory and Active CPU costs before deploying to production.

To find other KB guides, such as ones on related topics or next steps, search the Vercel Knowledge Base with the Vercel CLI: `npx vercel@latest kb search "your topic"`
```

## Set up and test your first daemon

Start with a worker that has no dependencies, so you can confirm the build and the shutdown path before real jobs depend on them.

### Write the worker

Create a `worker/` directory at the repository root, and add `worker/package.json` so Node.js treats the worker as an ES module:

```json
{
  "name": "worker",
  "private": true,
  "type": "module"
}
```

Create `worker/worker.ts`. Node.js 24 runs TypeScript files directly, so the worker needs no build step:

```typescript
import { setTimeout as sleep } from 'node:timers/promises';

const shutdown = new AbortController();

process.once('SIGTERM', () => shutdown.abort());
process.once('SIGINT', () => shutdown.abort());

console.log(`Worker started in ${process.env.VERCEL_REGION ?? 'local'}`);

while (!shutdown.signal.aborted) {
  // Replace this wait with one unit of work.
  console.log('Waiting for work...');
  await sleep(5000, undefined, { signal: shutdown.signal }).catch(() => {});
}

console.log('Received a shutdown signal, exiting');
process.exit(0);
```

The wait ends early when a signal arrives, and the loop exits. Vercel sends `SIGTERM` before it stops or replaces an instance, then terminates the process if it's still running after the [grace period](https://vercel.com/docs/daemons#graceful-shutdown), which is 30 seconds by default.

### Package the worker in a container

Create `worker/Dockerfile`:

```docker
FROM node:24-slim
WORKDIR /app
COPY package.json worker.ts ./
USER node
CMD ["node", "worker.ts"]
```

The exec-form `CMD` lets Node.js receive shutdown signals directly. The daemon's `root` is the build context, so the `COPY` paths are relative to `worker/`.

### Declare the daemon

In the root `vercel.json`, add this entry alongside your existing settings:

```json
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "daemons": {
    "worker": {
      "root": "worker/",
      "entrypoint": "Dockerfile",
      "instances": { "iad1": 1 },
      "resources": { "requests": { "memory": "1Gi" } }
    }
  }
}
```

This declares a daemon named `worker` that builds from `worker/Dockerfile` and runs one instance in `iad1` with 1 GiB of memory and 1 vCPU. Without `resources`, each instance gets the default 2 GiB. Daemon names contain only lowercase letters and separators, so `worker1` is invalid. The [configuration reference](https://vercel.com/docs/daemons/config-reference) lists every field.

### Test the image locally

Build the image and run it from the repository root:

```bash
docker build -t worker worker/
docker run --rm --name worker worker
```

The container logs `Worker started in local`, because `VERCEL_REGION` isn't set outside Vercel, and then `Waiting for work...` every five seconds. From a second terminal, stop it the way Vercel does:

```bash
docker stop -t 30 worker
```

`docker stop` sends `SIGTERM` and force-stops the container after the 30 seconds that `-t` sets, which matches Vercel's default. The worker logs `Received a shutdown signal, exiting` and stops right away. If the container runs for the full 30 seconds, the process isn't handling the signal. For an image that runs locally and fails once deployed, check the [reasons a container works locally but fails in production](https://vercel.com/i/docker-works-locally-fails-in-production).

> **Warning:**
>
> Once the worker polls a queue, don't run it locally against production work. Local processes that poll the same project, environment, topic, and consumer group as your deployed daemon can claim jobs meant for it, so use a separate Vercel project for local tests.

For local environment variables, follow the [container setup instructions](https://vercel.com/docs/daemons#local-development).

### Deploy and confirm the daemon is running

> **Warning:**
>
> Each running instance uses Provisioned Memory for every hour it runs, including idle time. Pro bills that usage, and Hobby counts it toward the monthly quota, so [stop the daemon](#control-what-you-spend) when you finish testing.

Deploy to production from the repository root, or push to your production branch:

```bash
vercel deploy --prod
```

On a production deployment, Vercel starts one `worker` instance in `iad1`. [List the project's daemons and inspect the worker](https://vercel.com/docs/cli/daemons):

```bash
vercel daemons ls
vercel daemons inspect worker
```

`inspect` reports the image, the memory allocation, and the instance count in each region. Then read the daemon's output from [Runtime Logs](https://vercel.com/docs/logs/runtime):

```bash
vercel logs --query 'source:daemon'
```

The logs show `Worker started in iad1`, followed by `Waiting for work...`. Select the worker under **Daemons** in your project's dashboard to see the same output.

## Process queued customer jobs without blocking requests

Report exports, video transcodes, and document parsing take longer than a customer should wait on a request. With a [message queue](https://vercel.com/i/message-queue), a route publishes the job to [Vercel Queues](https://vercel.com/docs/queues), which is in Beta, and responds. The daemon consumes the topic in [poll mode](https://vercel.com/docs/queues/poll-mode) and does the work.

### Enqueue a job from your app

Install the [Queues SDK](https://vercel.com/docs/queues/sdk) in your Next.js project, from the repository root:

**pnpm**

```bash
pnpm i @vercel/queue
```

**npm**

```bash
npm i @vercel/queue
```

**yarn**

```bash
yarn add @vercel/queue
```

**bun**

```bash
bun add @vercel/queue
```

Create `app/api/reports/route.ts`. Authentication, rate limiting, and the check that the customer owns the report depend on your application and are omitted here. Add them before you deploy:

```typescript
import { QueueClient } from '@vercel/queue';

const queue = new QueueClient({ region: 'iad1', deploymentId: null });

export async function POST(request: Request) {
  const body = await request.json().catch(() => null);
  const reportId = body?.reportId;

  if (
    typeof reportId !== 'string' ||
    reportId.length === 0 ||
    reportId === '.' ||
    reportId === '..'
  ) {
    return Response.json({ error: 'Invalid reportId' }, { status: 400 });
  }

  // Check here that the signed-in customer owns this report.

  const { messageId } = await queue.send(
    'report-jobs',
    { reportId },
    { idempotencyKey: `report-${reportId}` },
  );

  return Response.json({ reportId, messageId }, { status: 202 });
}
```

Three options in the route decide which messages the worker sees:

- `region: 'iad1'` fixes the queue's region. Messages can only be received from the region they were sent to, so the route and the worker name the same one.
  
- `deploymentId: null` turns off deployment pinning. By default, Queues [partitions a topic by deployment ID](https://vercel.com/docs/queues/poll-mode#versioning-with-deployment-ids), so each deployment consumes only its own messages. Without pinning, a new daemon version can process the backlog that earlier deployments published.
  
- `idempotencyKey` deduplicates a repeated publish of the same report. It covers publishing only, and delivery stays [at-least-once](https://vercel.com/docs/queues/concepts#at-least-once-delivery).
  

With pinning off, deployments in the same project and environment share the topic. Queues still separates production and preview traffic using the environment in each client's OIDC token.

### Poll the queue from the daemon

Each daemon instance authenticates to Queues with an OIDC token that Vercel writes to the file named in `VERCEL_OIDC_TOKEN_FILE`. `@vercel/oidc` 4.0.0 and later reads that file. Older versions, which `@vercel/queue` can resolve as a dependency, read only an environment variable and can't authenticate from a daemon.

Configure the worker's dependency override for your package manager, preserving any existing settings. pnpm uses `worker/pnpm-workspace.yaml`; yarn, npm, and bun use `worker/package.json`:

**pnpm**

```yaml
packages:
  - '.'
overrides:
  '@vercel/oidc': '^4.0.0'
```

**yarn**

```json
{
  "name": "worker",
  "private": true,
  "type": "module",
  "resolutions": {
    "@vercel/oidc": "^4.0.0"
  },
  "packageManager": "yarn@4.19.0"
}
```

**npm**

```json
{
  "name": "worker",
  "private": true,
  "type": "module",
  "overrides": {
    "@vercel/oidc": "$@vercel/oidc"
  }
}
```

**bun**

```json
{
  "name": "worker",
  "private": true,
  "type": "module",
  "overrides": {
    "@vercel/oidc": "^4.0.0"
  }
}
```

Install the dependencies from `worker/` with your package manager. The pnpm and yarn commands use [Corepack](https://github.com/nodejs/corepack#how-to-install) to keep versions consistent between local development and container builds:

**pnpm**

```bash
npm pkg set --prefix . packageManager=pnpm@12.7.0
corepack pnpm add @vercel/queue '@vercel/oidc@^4.0.0'
```

**npm**

```bash
npm install @vercel/queue '@vercel/oidc@^4.0.0'
```

**yarn**

```bash
touch yarn.lock
corepack yarn config set nodeLinker node-modules
corepack yarn add @vercel/queue '@vercel/oidc@^4.0.0'
```

**bun**

```bash
bun add @vercel/queue '@vercel/oidc@^4.0.0'
```

Replace `worker/worker.ts` with a polling loop:

```typescript
import { setTimeout as sleep } from 'node:timers/promises';
import { PollingQueueClient } from '@vercel/queue';

interface ReportJob {
  reportId: string;
}

const queue = new PollingQueueClient({ region: 'iad1', deploymentId: null });
const shutdown = new AbortController();

process.once('SIGTERM', () => shutdown.abort());
process.once('SIGINT', () => shutdown.abort());

async function generateReport(job: ReportJob): Promise<void> {
  // Replace this with your own work. A job can be delivered more than
  // once, so make it safe to run twice for the same reportId.
  console.log(`Generating report ${job.reportId}`);
}

console.log(`Worker started in ${process.env.VERCEL_REGION ?? 'local'}`);

let idleMs = 1000;

while (!shutdown.signal.aborted) {
  try {
    const result = await queue.receive<ReportJob>(
      'report-jobs',
      'report-worker',
      async (job, metadata) => {
        await generateReport(job);
        console.log(`Completed message ${metadata.messageId}`);
      },
      { limit: 1 },
    );
    if (result.ok) {
      idleMs = 1000;
      continue;
    }
  } catch (error) {
    console.error('Could not process a job:', error);
  }

  // The queue is empty or the poll failed. Wait before polling again,
  // doubling the wait up to 30 seconds.
  await sleep(idleMs, undefined, { signal: shutdown.signal }).catch(() => {});
  idleMs = Math.min(idleMs * 2, 30_000);
}

console.log('Worker stopped');
process.exit(0);
```

`receive()` hands one message to the handler and acknowledges it only when the handler succeeds. If `generateReport()` throws, the message isn't acknowledged and Queues [retries it](https://vercel.com/docs/queues/concepts#retries). The same job can therefore arrive twice, and your code has to make that safe, for example by storing the result under the `reportId`. Jobs that fail every time are retried until the message expires, so catch errors you can't recover from and record them in your database.

On `SIGTERM`, the loop starts no new poll and waits for the current `receive()` call, so a job in progress finishes if it fits in the grace period. An empty queue or a failed poll doubles the wait from 1 second up to 30 seconds, and a processed job resets it. The first job after an idle stretch can wait up to that cap, so lower it if customers are watching for the result.

Replace `worker/Dockerfile` with the version for your package manager. Each version installs from the worker's lockfile and runs the worker with Node.js 24:

**pnpm**

```docker
FROM node:24-slim
WORKDIR /app
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
RUN corepack pnpm install --prod --frozen-lockfile
COPY worker.ts ./
USER node
CMD ["node", "worker.ts"]
```

**yarn**

```docker
FROM node:24-slim
WORKDIR /app
COPY package.json yarn.lock .yarnrc.yml ./
RUN corepack yarn install --immutable
COPY worker.ts ./
USER node
CMD ["node", "worker.ts"]
```

**npm**

```docker
FROM node:24-slim
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci --omit=dev
COPY worker.ts ./
USER node
CMD ["node", "worker.ts"]
```

**bun**

```docker
FROM node:24-slim
WORKDIR /app
RUN npm install --global bun
COPY package.json bun.lock ./
RUN bun install --production --frozen-lockfile
COPY worker.ts ./
USER node
CMD ["node", "worker.ts"]
```

Commit the worker's manifest, lockfile, and package-manager configuration for the image build. If the app's `tsconfig.json` includes every `.ts` file in the repository, add `worker` to `exclude` so the app doesn't type-check the worker.

Deploy to production again:

```bash
vercel deploy --prod
```

Send a job to your production route, replacing `your-production-domain` with your domain and adding the credentials your route requires:

```bash
curl -X POST https://your-production-domain/api/reports \
  -H 'Content-Type: application/json' \
  -d '{"reportId":"test-report-1"}'
```

The route returns a `202` JSON response with `reportId` and `messageId`, which can be `null` when Queues accepts a publish for deferred processing.

Look for `Generating report test-report-1` and a `Completed message` line in the daemon's logs, comparing message IDs if the route returned one. Use a new `reportId` for each test because the idempotency key suppresses duplicate publishes during the original message's retention period.

### Bring a Python worker or an existing worker framework

For media and document jobs, install system tools such as `ffmpeg` in the Dockerfile and raise `resources.requests.memory`. Setting `"4Gi"` gives each instance 2 vCPUs and needs Pro or Enterprise. In Python, the [Queues Python SDK](https://vercel.com/docs/queues/python-sdk) takes `deployment=ALL_DEPLOYMENTS` where the JavaScript client takes `deploymentId: null`, and `vercel-oidc` 0.10.0 or later reads the token file. The guide to [processing background jobs in Python](https://vercel.com/kb/guide/python-and-vercel-queues) includes a polling worker for Daemons.

You can also keep the worker framework you have. Daemons run Celery, BullMQ, and Sidekiq workers against their current broker. Vercel manages the process, and the broker still manages job delivery. Set `command` when one image runs several worker types, and put the broker URL in the project's production environment variables. Moving the worker doesn't move the jobs stored in the broker.

Follow the migration guide for your platform: [Railway workers](https://vercel.com/kb/guide/migrate-railway-workers-to-vercel-daemons) with BullMQ, [Render background workers](https://vercel.com/kb/guide/migrate-render-workers-to-vercel-daemons) with Celery, or [Fly.io worker processes](https://vercel.com/kb/guide/migrate-fly-io-workers-to-vercel-daemons) with Sidekiq. If your stack is defined in a Compose file, read [how Compose services map to Vercel](https://vercel.com/i/can-you-run-docker-compose-on-vercel) first.

## Connect daemons to private services and external APIs

### Call a private service in the same deployment

If your project runs its backend as [Vercel Services](https://vercel.com/docs/services), which is in Beta, a daemon can [call a service through a binding](https://vercel.com/changelog/vercel-daemons-can-now-call-services-with-bindings) without a public route to that service. Merge the `services` entry and the worker's `bindings` into your existing `vercel.json`, keeping its memory setting and any other project configuration:

```json
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "services": {
    "api": { "root": "api/", "entrypoint": "main:app" }
  },
  "daemons": {
    "worker": {
      "root": "worker/",
      "entrypoint": "Dockerfile",
      "instances": { "iad1": 1 },
      "resources": { "requests": { "memory": "1Gi" } },
      "bindings": [
        { "type": "service", "service": "api", "format": "url", "env": "API_URL" }
      ]
    }
  }
}
```

No rewrite targets `api`, so this configuration has no public route to the service. Each daemon receives its URL in `API_URL`. Replace `generateReport()` in `worker/worker.ts` to call your API's report-generation route:

```typescript
async function generateReport(job: { reportId: string }): Promise<void> {
  const { reportId } = job;
  if (reportId === '.' || reportId === '..') {
    throw new Error('Invalid reportId');
  }

  const path = `reports/${encodeURIComponent(reportId)}/generate`;
  const response = await fetch(new URL(path, process.env.API_URL), {
    method: 'POST',
  });
  if (!response.ok) {
    throw new Error(`Report API returned ${response.status}`);
  }
}
```

Failed calls throw, so Queues retries the message. [Service bindings](https://vercel.com/docs/services/bindings) point one way, from the daemon to a service. Services can't bind to daemons, and a daemon can't bind to another daemon. Each binding stays with the deployment that started the instance. After a promotion or rollback, instances from the previous deployment keep calling that deployment's services until they stop, so a worker and the API it calls come from the same build.

Bindings grant network access and don't authorize the call. If the service must tell callers apart, check that in the service's code.

### Authenticate to external APIs and clouds

Vercel gives each instance an OIDC token that is valid for 30 minutes and refreshes the token file about every 5 minutes. Use it in place of long-lived keys for services that accept OIDC, including cloud providers through [OIDC federation](https://vercel.com/docs/oidc/reference). In Node.js, `getVercelOidcToken()` from `@vercel/oidc` 4.0.0 or later reads the file on every call. Add this helper to `worker/worker.ts`, where `PARTNER_API_URL` is an environment variable you set for a service that verifies Vercel OIDC tokens:

```typescript
import { getVercelOidcToken } from '@vercel/oidc';

async function callPartnerApi(path: string, body: unknown): Promise<Response> {
  return fetch(new URL(path, process.env.PARTNER_API_URL), {
    method: 'POST',
    headers: {
      authorization: `Bearer ${await getVercelOidcToken()}`,
      'content-type': 'application/json',
    },
    body: JSON.stringify(body),
  });
}
```

The helper requests the token on each call. Tokens saved in a module-level variable at startup stop working once they expire, so don't cache one. If the token file is unreadable or empty, `getVercelOidcToken()` throws and doesn't fall back to an environment variable. The sample only sends the token. The receiving service still has to verify it and decide what the worker may do.

Two integrations build on the same identity. Daemons can [start an eve agent session for each queued job](https://vercel.com/kb/guide/vercel-daemons-eve-agents) and authenticate to the agent with the project's token. Chat SDK bots can [process queued chat jobs in a daemon](https://vercel.com/docs/chat-sdk/integrations/daemons) and reply to Slack with credentials from Vercel Connect.

## Monitor worker health and trace background jobs

Vercel restarts an instance when its process exits or crashes, but a hung process keeps running. Add a [liveness probe](https://vercel.com/changelog/add-liveness-checks-to-your-daemons) to restart it, and [send traces from the daemon](https://vercel.com/changelog/vercel-daemons-can-now-send-traces-to-vercel-tracing) to see where each job spends its time.

### Add a health endpoint and a span for each job

From `worker/`, install the OpenTelemetry API and `@vercel/otel`. Version 2.3.0 or later of `@vercel/otel` adds the exporter that daemons use:

**pnpm**

```bash
corepack pnpm add @opentelemetry/api @vercel/otel@latest
```

**npm**

```bash
npm install @opentelemetry/api @vercel/otel@latest
```

**yarn**

```bash
corepack yarn add @vercel/otel@latest \
  @opentelemetry/api @opentelemetry/api-logs
```

**bun**

```bash
bun add @opentelemetry/api @vercel/otel@latest
```

Replace `worker/worker.ts` with a version that registers tracing first, serves `/health`, and records a span around each job. If you changed `generateReport()` in the previous section, keep your version of its body inside the span:

```typescript
import { createServer } from 'node:http';
import { setTimeout as sleep } from 'node:timers/promises';
import { SpanStatusCode, trace } from '@opentelemetry/api';
import { registerOTel } from '@vercel/otel';
import { PollingQueueClient } from '@vercel/queue';

registerOTel({ serviceName: 'report-worker' });

interface ReportJob {
  reportId: string;
}

const tracer = trace.getTracer('report-worker');
const queue = new PollingQueueClient({ region: 'iad1', deploymentId: null });
const shutdown = new AbortController();

process.once('SIGTERM', () => shutdown.abort());
process.once('SIGINT', () => shutdown.abort());

// The liveness probe requests this endpoint from inside the instance.
createServer((req, res) => {
  res.statusCode = req.url === '/health' ? 200 : 404;
  res.end();
}).listen(1234);

async function generateReport(job: ReportJob): Promise<void> {
  return tracer.startActiveSpan('generate-report', async (span) => {
    try {
      span.setAttributes({ 'report.id': job.reportId });
      // Replace this with your own work. A job can be delivered more than
      // once, so make it safe to run twice for the same reportId.
      console.log(`Generating report ${job.reportId}`);
    } catch (error) {
      span.recordException(error instanceof Error ? error : String(error));
      span.setStatus({ code: SpanStatusCode.ERROR });
      throw error;
    } finally {
      span.end();
    }
  });
}

console.log(`Worker started in ${process.env.VERCEL_REGION ?? 'local'}`);

let idleMs = 1000;

while (!shutdown.signal.aborted) {
  try {
    const result = await queue.receive<ReportJob>(
      'report-jobs',
      'report-worker',
      async (job, metadata) => {
        await generateReport(job);
        console.log(`Completed message ${metadata.messageId}`);
      },
      { limit: 1 },
    );
    if (result.ok) {
      idleMs = 1000;
      continue;
    }
  } catch (error) {
    console.error('Could not process a job:', error);
  }

  // The queue is empty or the poll failed. Wait before polling again,
  // doubling the wait up to 30 seconds.
  await sleep(idleMs, undefined, { signal: shutdown.signal }).catch(() => {});
  idleMs = Math.min(idleMs * 2, 30_000);
}

console.log('Worker stopped');
process.exit(0);
```

`@vercel/otel` batches spans, so exiting as soon as the queue call completes can discard the final job's buffered traces. Retaining those traces requires a tracing setup with an explicit flush or shutdown step that can finish within the daemon's grace period; `registerOTel()` doesn't return a shutdown handle.

Every daemon runs an OpenTelemetry collector on a Unix socket, and Vercel sets its path in `VERCEL_OTEL_SOCKET_PATH`. `@vercel/otel` exports spans over that socket to [Vercel Tracing](https://vercel.com/docs/tracing) with no endpoint to configure, in Node.js only. Workers in other languages [post OTLP/HTTP traces to the socket](https://vercel.com/docs/daemons/tracing). Spans from a daemon count toward your tracing usage.

### Configure the liveness probe

Add this `livenessProbe` property to the existing `daemons.worker` entry in `vercel.json`, preserving its resources, bindings, and other settings:

```json
{
  "livenessProbe": {
    "httpGet": {
      "port": 1234,
      "path": "/health"
    },
    "initialDelaySeconds": 5
  }
}
```

With this configuration and the remaining defaults, Vercel sends a `GET` request to `/health` from inside each instance every 10 seconds, starting 5 seconds after the container starts. Each check succeeds on a status from `200` to `399` and fails on any other status, a connection error, or no response within 1 second. Three consecutive failures restart the instance.

[Liveness-triggered restarts](https://vercel.com/docs/daemons#health-checks-and-restarts) send `SIGKILL` immediately and skip `terminationGracePeriodSeconds`, so a job in progress is cut off and redelivered later. Restarts back off exponentially, from 1 second up to a cap of 5 minutes, and a run of at least 5 minutes resets the backoff. After 10 minutes of runs that each last under 5 minutes, Vercel replaces the instance with a new one.

Keep the endpoint independent of downstream services. If it checks your database, a database outage restarts every worker. The sample's endpoint stops answering when the Node.js event loop is blocked, and it doesn't detect a loop that waits forever on a promise.

### Read traces and logs

Deploy to production, send a test job, and search the daemon's spans by service name with [`vercel traces`](https://vercel.com/docs/cli/traces), replacing `your-project` with your project's name:

```bash
vercel traces search --project your-project --service report-worker
```

The search covers the last hour by default and lists the `generate-report` spans the worker recorded. Logs carry the source `daemon`, the daemon's name in `daemonName`, and the instance's ID in `daemonInstanceId`. Runtime Logs keep 1 hour of history on Hobby and 1 day on Pro, or 30 days with [Observability Plus](https://vercel.com/docs/observability/observability-plus), so write each job's outcome to your own database as well.

For CPU, memory, and network metrics, list the instances and inspect one, replacing `your-instance-id` with an ID from the list:

```bash
vercel daemons instances ls worker
vercel daemons instances inspect your-instance-id --since 1h
```

If your jobs call models, [capture AI SDK token usage and cost with evlog](https://vercel.com/kb/guide/ai-sdk-and-evlog), which has a pattern for daemon workers.

## Operate and secure daemons in production

### Keep credentials out of the image

Daemons have no inbound network path, so the exposure to review is what an instance can reach and which credentials it holds. Each instance receives the deployment's production [environment variables](https://vercel.com/docs/environment-variables), and Vercel passes the same variables to the image build as build arguments.

Read secrets from the environment at runtime. Dockerfiles that declare a secret with `ARG` and copy it into `ENV` or a file write the value into an image layer, and the image is stored in Vercel Container Registry. Where a service accepts OIDC, use the instance's token and store no key at all.

### Plan for two versions running at once

Vercel updates daemons when a deployment becomes production, which happens on a production deploy, a [promotion](https://vercel.com/docs/deployments/promoting-a-deployment), an [Instant Rollback](https://vercel.com/docs/instant-rollback), or a completed [rolling release](https://vercel.com/docs/rolling-releases). New instances start right away while the old ones receive `SIGTERM` and finish their current work, so [both versions run side by side](https://vercel.com/docs/daemons/managing-daemons#deploying-changes-to-a-daemon) for a short time.

Keep queue message formats and database migrations compatible with the previous version of the worker, and make every job idempotent, because both versions can receive the same message. After a rollback the direction reverses, and an older worker reads messages that a newer app published.

### Give jobs time to finish

Vercel waits 30 seconds after `SIGTERM` by default. If your longest job runs for two minutes, add `"terminationGracePeriodSeconds": 150` to the daemon's entry in `vercel.json`. The value is an integer from `0` to `3600`, and a changed value applies to instances that start after it deploys.

The grace period doesn't cover every stop. Liveness restarts skip it, and a crashed process gets none. Vercel also replaces instances from time to time with the same `SIGTERM` sequence, for example when it retires a host. Interrupted jobs have to be safe to retry however long the grace period is.

### Stage changes in a separate project

Preview deployments don't start daemons, so a pull request can't exercise a worker change. For staging, create a second Vercel project from the same repository and treat its production environment as staging, with its own queue topics, broker, and database. Staging and production instances share the same team quota.

### Check compliance scope

Vercel has a SOC 2 Type 2 attestation and ISO 27001:2022 certification, and supports PCI DSS compliance as a service provider. Pro teams can buy a HIPAA BAA as a paid add-on, and Enterprise teams can request one. Daemons is in Public Beta, so before a worker handles regulated data, confirm with Vercel that Daemons is in scope for the [compliance reports](https://vercel.com/docs/security/compliance) your customers ask for.

## Control what you spend

On Pro and Enterprise, Vercel bills daemons for Active CPU and Provisioned Memory. Hobby teams aren't billed, and two monthly quotas apply. The worker above also uses four related resources:

| Metric                                                                                            | What it counts                                                                                                                           | Hobby                   | Pro                             |
| ------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- | ------------------------------- |
| Daemons Active CPU                                                                                | CPU time your code spends executing. Waiting on I/O doesn't count, but the encryption work in each HTTPS request does.                   | 5 hours each month      | Starting at $0.128 per hour     |
| Daemons Provisioned Memory                                                                        | Each instance's memory for every hour it runs, including time spent waiting for work                                                     | 420 GB-hours each month | Starting at $0.0212 per GB-hour |
| [Container Registry image storage](https://vercel.com/docs/container-registry/limits-and-pricing) | The daemon images Vercel stores                                                                                                          | 10 GB each month        | $0.10 per GB-month              |
| [Queues API operations](https://vercel.com/docs/queues/pricing) (Beta)                            | Send, receive, acknowledgment, and visibility-change calls, with payloads metered in 4 KiB chunks. Idempotent sends use twice the units. | 1 million each month    | Starting at $0.60 per million   |
| [Service Requests](https://vercel.com/docs/services/pricing) (Beta)                               | Each call over a binding                                                                                                                 | 1 million each month    | Starting at $0.50 per million   |
| [Tracing span units](https://vercel.com/docs/tracing/configure-tracing)                           | Indexed spans, in 2 KiB increments                                                                                                       | 1 million each month    | $0.50 per million               |

Long-running handlers add visibility-change calls as the Queues SDK renews message leases. Enterprise pricing is custom, and the [pricing page](https://vercel.com/pricing) has current rates. Daemons has its own Provisioned Memory rate, so don't estimate from the rate for Vercel Functions.

Memory is the cost that never pauses. Both `"1Gi"` and the default `"2Gi"` allocate 1 vCPU, so the smaller size halves Provisioned Memory without giving up CPU. For one instance that runs for a 30-day month, or 720 hours, at the Pro starting rates:

|                                       | `"1Gi"`                             | `"2Gi"` (default)                   |
| ------------------------------------- | ----------------------------------- | ----------------------------------- |
| vCPUs                                 | 1                                   | 1                                   |
| Provisioned Memory                    | 1 GB × 720 hours × $0.0212 = $15.26 | 2 GB × 720 hours × $0.0212 = $30.53 |
| Active CPU at 10% average utilization | 72 hours × $0.128 = $9.22           | 72 hours × $0.128 = $9.22           |

The 1 GiB instance comes to about $24.48 a month, before Pro's [$20 monthly credit](https://vercel.com/docs/plans/pro-plan#monthly-credit) and before storage, queue operations, and tracing. The default size costs $15.26 more each month for memory the worker may not use.

These controls keep the bill close to that estimate:

- Set `"1Gi"` when the worker fits in 1 GiB, and check memory use with `vercel daemons instances inspect` before you size up.
  
- Back off when the queue is empty. Each poll is a receive call, and a loop that polls once a second makes about 2.6 million of them in 30 days.
  
- Start with one instance, and add instances when the backlog grows faster than one can clear it.
  
- Find the code paths that use the most CPU with the guide to [optimizing Active CPU on Fluid compute](https://vercel.com/kb/guide/optimize-active-cpu-on-fluid-compute).
  

To stop an idle worker, such as one in a staging project, scale it to 0. The command applies without a confirmation prompt:

```bash
vercel daemons scale worker iad1=0
```

The count is a scaling override that persists across deployments, so the daemon stays stopped until you clear it:

```bash
vercel daemons scale worker --reset
```

Messages published while the daemon is stopped wait in the queue until they expire, which is 24 hours after publishing by default. Pass `retentionSeconds` to `send()` to keep them for up to 7 days.

Owners and Billing members can use [Spend Management](https://vercel.com/docs/spend-management) on Pro and on Enterprise with Flexible Commitment. On Pro, project budgets count usage before the $20 monthly credit, so they can trigger while credit still covers the usage.

Vercel sends notifications at 50%, 75%, and 100% of the budget. To set a $100 project budget, replace `your-project` with its name:

```bash
vercel billing budgets set --project your-project --amount 100
```

Budgets alone don't stop usage. Turning on **Pause production deployments** does, but pausing stops every daemon instance in the project and also takes the project's production site and API offline until you resume it yourself. Vercel checks spend every few minutes, so usage continues for several minutes past the budget, and storage charges continue while the project is paused.

### Get credits through Vercel's startup programs

#### Vercel startups program

The [Vercel startups program](https://vercel.com/startups) accepts companies affiliated with an approved Startups Partner, such as an accelerator or venture firm. Eligible startups have raised a Series A or less, apply within 12 months of their latest funding round, and have not received Vercel for Startups credits before.

Startups accepted on or after August 6, 2026 receive Enterprise-tier access and a [Flexible Commitment Amount of up to $30,000](https://vercel.com/startups/credits) for seats, data transfer, compute, and applicable platform services. Benefits end after one year or when the commitment is exhausted, with standard billing afterward. While Daemons is in beta, confirm its coverage with the startups team before budgeting around it.

#### Vercel X

[Vercel X](https://vercel.com/x) is a six-week, in-person accelerator for pre-seed founders building AI companies. It takes no equity and offers a program-wide pool of more than $9M in Vercel and partner credits for hosting, compute, and model API usage. Confirm Daemons credit coverage and application dates with the program team.

## Plan for limits as you grow

[Quotas](https://vercel.com/docs/daemons/limits#default-quotas) apply to a team across all of its projects during the beta:

| Limit          | Hobby                                                                | Pro                                           | Enterprise |
| -------------- | -------------------------------------------------------------------- | --------------------------------------------- | ---------- |
| Instance sizes | 1 GiB or 2 GiB, each with 1 vCPU                                     | 1, 2, 4, or 8 GiB, with 1, 1, 2, or 4 vCPUs   | All sizes  |
| Team quota     | 5 Active CPU-hours and 420 GB-hours of Provisioned Memory each month | 16 vCPUs and 32 GiB of memory running at once | Custom     |

On Pro, the default quota allows 16 instances at 1 GiB or 2 GiB, 8 at 4 GiB, or 4 at 8 GiB, counted across production and any staging project. To raise it, contact Vercel Support or your account team. When a Hobby team reaches either monthly quota, Vercel stops the team's daemons until the first of the next month (UTC) or until the team upgrades to Pro.

Each project environment has a default limit of 50 running daemon instances across all daemons and regions. Contact Vercel Support or your account team to request more. When a change exceeds the limit, Vercel starts instances for older daemons first and logs an error on each daemon that doesn't get its full count.

[Configuration limits](https://vercel.com/docs/daemons/limits) also apply: 100 daemons in a project, 100 instances of a daemon in a region, 64-character names, 512-character `root` and `entrypoint` paths, and 128 `command` items of up to 4,096 characters each.

### Scale without redeploying

Vercel doesn't autoscale daemons, so a growing backlog needs you to add instances. Change `instances` in `vercel.json` and deploy, or set an override from the CLI, the dashboard, or the [REST API](https://vercel.com/docs/rest-api/daemons) without a deployment.

> **Warning:**
>
> Each added instance uses its full Provisioned Memory for every hour it runs, and the CLI applies the change without a confirmation prompt.

To run three instances in `iad1`:

```bash
vercel daemons scale worker iad1=3
```

The command returns once the override is saved, and instances start afterward. Run `vercel daemons inspect worker` to check readiness. All instances poll with the same consumer group, so they share the queue's messages.

[Scaling overrides](https://vercel.com/docs/daemons/managing-daemons#scaling-a-daemon) outlive deployments. Overrides from the CLI cover only the regions you name, and other regions keep following `vercel.json`. Overrides from the dashboard cover every region, including regions whose count you didn't change, so later edits to `instances` in `vercel.json` don't take effect. Clear an override with `vercel daemons scale worker --reset`, or in the dashboard by opening **Daemons**, selecting the daemon, and selecting **Scale**, then **Clear scaling overrides**.

Use an override for a temporary change, then commit the count you want to keep to `vercel.json` and reset the override.

### Place instances next to your queue and database

`instances` is keyed by [region ID](https://vercel.com/docs/regions), and Vercel runs instances only in the regions you list. Run the worker in the region that holds its queue and its database. Both queue clients above name `iad1`, and a message can only be received from the region it was sent to, so move the route's client, the worker's client, and the daemon's region together.

## Troubleshooting

| What you observe                                                        | What to check                                                                                                                                                                                          |
| ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| The daemon doesn't start in a preview deployment, or under `vercel dev` | Daemons run only in production during the beta, and `vercel dev` skips them. Deploy to production, or run the image with Docker.                                                                       |
| Changes to `instances` in `vercel.json` have no effect                  | The daemon has a scaling override. `vercel daemons inspect worker` indicates when overrides differ from the deployed configuration. Clear the override with `vercel daemons scale worker --reset`.     |
| Queue calls from the daemon fail to authenticate                        | The worker resolved a version of `@vercel/oidc` older than 4.0.0, which can't read the token file. Apply the dependency override for your package manager, reinstall, and commit the updated lockfile. |
| The worker runs but receives no messages                                | Check that the route and worker authenticate to the same project and environment, use the same region and topic, and both set `deploymentId: null`.                                                    |
| Instances restart repeatedly after you add a `livenessProbe`            | Nothing answers on the probe's port and path, so every check fails. Confirm that the worker serves the endpoint.                                                                                       |
| Jobs are cut off during deployments                                     | The job outlasts the grace period, which is 30 seconds by default. Raise `terminationGracePeriodSeconds`, and make the job safe to retry.                                                              |
| The daemon runs fewer instances than you configured                     | Check the daemon's logs for a project-environment or team quota error. The project-environment default is 50 running instances unless Vercel has raised it.                                            |
| Daemons stopped and the site is offline                                 | Spend Management paused the project. [Resume the project](https://vercel.com/docs/projects/managing-projects#resuming-a-project) to start both again.                                                  |

## Next steps

- Find [Daemon configuration, defaults, and commands](https://vercel.com/kb/guide/vercel-daemons)
  
- [Scale, stop, and inspect daemons](https://vercel.com/docs/daemons/managing-daemons) as workloads change
  
- Choose between [continuous workers, queued jobs, and durable workflows](https://vercel.com/kb/guide/background-workers-on-vercel)
  
- Explore [other uses for Docker containers on Vercel](https://vercel.com/i/7-ways-to-use-docker-containers-on-vercel)
  
- Combine [Python backends, containers, and Daemons](https://vercel.com/blog/backends-on-vercel-python-containers-and-daemons) in one project
  
- Add [model fallbacks and usage attribution with AI Gateway](https://vercel.com/kb/guide/startups-on-vercel-ai-gateway)
  

## Frequently asked questions

### Can I run an always-on background worker on Vercel?

Yes. Vercel Daemons keeps a set number of container instances running in each region you choose and restarts any that exit or crash. The worker pulls its own work from a queue, a database, or an API. During the Public Beta, daemons start only from production deployments.

### How much does a Vercel Daemon cost for a startup?

On Pro, a daemon is billed for Active CPU, starting at $0.128 per hour, and Provisioned Memory, starting at $0.0212 per GB-hour. One 1 GiB instance running for 720 hours uses $15.26 of memory, plus CPU for the time its code executes, and Pro's $20 monthly credit applies to that usage. Hobby teams aren't billed and get 5 Active CPU-hours and 420 GB-hours of memory each month for non-commercial projects.

### Do Vercel Daemons run in preview deployments?

No. During the beta, daemons start only when a deployment becomes production. Test worker changes locally with Docker or deploy them to a separate Vercel project whose production environment serves as staging.

### Can a Vercel Daemon receive webhooks or HTTP requests?

No. Daemons don't expose an endpoint for incoming webhooks or application requests, and a daemon can't be the target of a rewrite or a service binding. Receive the webhook in a Vercel Function, publish a message to Vercel Queues, and let the daemon poll for it.

## Related Resources

- [The Complete Guide to Vercel Daemons](/kb/guide/vercel-daemons): Run background workers with Vercel Daemons. Learn how to deploy container images, configure resources, handle shutdowns, and manage instances.
- [Running background workers on Vercel](/kb/guide/background-workers-on-vercel): Run background jobs on Vercel with waitUntil, Cron Jobs, Queues, Workflows, Daemons, or Sandbox. Compare the options and pick the right one for your workload.
- [How to choose between Functions, containers, and Daemons on Vercel](/kb/guide/vercel-functions-containers-daemons): Choose Vercel Functions for HTTP requests, container images for custom runtimes, and Daemons for continuous background workers.
- [Build your startup's product on Vercel Sandbox](/kb/guide/startups-on-vercel-sandbox): Build code interpreters, app previews, and upload-processing features with Vercel Sandbox, including authentication, persistence, security, and cost controls.
- [Build your startup's AI features on Vercel AI Gateway](/kb/guide/startups-on-vercel-ai-gateway): Build customer-facing AI features with Vercel AI Gateway, including authentication, model fallbacks, usage attribution for each customer, data controls, and budgets.

## More Vercel Daemons guides

- [Migrate Fly.io worker processes to Vercel Daemons](/kb/guide/migrate-fly-io-workers-to-vercel-daemons): Migrate Fly.io workers to Vercel Daemons with your existing Dockerfile. Map process settings, preserve queue state, and plan cutover and rollback.
- [Migrate Railway workers to Vercel Daemons](/kb/guide/migrate-railway-workers-to-vercel-daemons): Move Railway workers to Vercel Daemons with Docker configuration, broker migration, shutdown testing, a gradual queue handoff, and rollback.
- [Capture AI SDK token usage, tool calls, and cost with evlog](/kb/guide/ai-sdk-and-evlog): Record AI SDK usage with evlog, add cost estimates and request context, and investigate expensive or failed requests.

## Reference Architecture

Choose a stack and work through the decisions behind it, with curated documentation, guides, templates, and courses to help you build.

- [Agent stack](/kb/architecture/agents): Build and operate agents with models, tools, and durable workflows.
- [Web applications](/kb/architecture/web): Choose rendering, data, authentication, and caching approaches.
- [Backends](/kb/architecture/backends): Choose a runtime, connect services, and run background work.

[Browse all stacks](/kb/architecture)

## Build with prompts

Build an app, extend an agent, or improve your project with ready-to-use prompts for your coding agent.

[Browse the prompt library](/kb/prompts) · [Read the Markdown index](/kb/prompts.md)

## Search guides from your terminal

Search the Knowledge Base and read guides as Markdown with the Vercel CLI. No login required.

```bash
# Find guides by keyword
npx vercel@latest kb search "rewrites and redirects"
npx vercel@latest kb search "AI SDK streaming"

# Show the latest guides
npx vercel@latest kb

# Print a guide as Markdown, by slug or URL
npx vercel@latest kb inspect <guide>
```
