
# Agent Cloud vs Vercel, and moving over

Vercel runs front ends and functions, with Postgres from a Marketplace provider. Agent Cloud runs one long-lived server, an optional worker and the app's own Postgres, and rehearses every database change on a fresh branch of production before it goes live.

To try it, run `agc init` in the repo, then `agc doctor`; `agc ship` publishes. Success is exit 0 with `"outcome": "live"`. By default an app's first release goes live without waiting for a person.

## Ask your agent

```text
This app runs on Vercel today. Check whether it would run on Agent Cloud as one Node server
on PORT with Postgres and a worker for background jobs. Run agc init and agc doctor, then tell
me what you'd have to change. Don't ship, and stop before moving any production data.
```

Your agent comes back with a list of changes, what still blocks the move, and, if the app isn't in your organization yet, a claim link.

## What they share

Both build a Node app without a Dockerfile, give it an HTTPS address and certificates for your own domains, and pass configuration as environment variables with write-only secret values. Both publish docs and an MCP server for agents. Vercel has an `llms.txt` and `mcp.vercel.com` with OAuth; Agent Cloud has `/agents.md`, `/llms.txt`, an `AGENTS.md` in every app, and `agent.cloud/mcp`.

## How they differ

The right column is also what each Vercel piece becomes when you move.

| | Vercel | Agent Cloud |
|---|---|---|
| Compute | Vercel Functions on Fluid compute; default maximum duration 300 s, longer by plan. WebSockets close at the function's maximum duration | One long-running web process on `PORT`, 1 to 4 instances (a person's setting in the console). Functions and API routes become routes under `/api` |
| Background work | Daemons (public beta), Queues (beta), Workflows | One `[service.worker]` from the same build; the queue is a `jobs` table in Postgres, claimed with a lease |
| Scheduled jobs | Cron Jobs in `vercel.json` call a path with a GET; failed runs aren't retried | A timer in the worker inserts a `jobs` row, claimed with a lease like any other job |
| Postgres | Marketplace integrations inject credentials as environment variables | Built in, one per app. Each agent works on a masked branch of production and never holds a production connection string |
| Schema changes | Depend on your build and tools | SQL files in `migrations/`, applied to production only by `agc ship`; never an ORM migrator |
| Before release | Rolling Releases (by plan) send a share of traffic to a new deployment first | A [rehearsal](/docs/concepts/rehearsals.md) on a fresh, unmasked branch of production. A migration that drops or rewrites data waits for a person's [approval](/docs/concepts/approvals.md); other changes go live on their own under the default `routine` autonomy |
| Going back | Instant Rollback points domains at an earlier build | A new release takes traffic only once it answers healthy, and the previous one keeps serving until then |
| Previews | A deployment URL per pull request and branch push, behind Deployment Protection | A mirror per git branch, started with `agc up`, on a masked branch of production so the agent tests against realistic data before shipping |
| Cost to you | Set by your Vercel plan | Free during the beta |

## Which to pick

Agent Cloud runs a server with a queue and jobs that run for minutes directly, as one web process, one worker and a Postgres.

On Agent Cloud the database is part of the release: each migration runs first on a branch of production, then on production, and only then does traffic switch to the new code.

## Moving from Vercel

1. **Manifest.** `agc init --name camp-bookings` writes `agentcloud.toml` and `AGENTS.md` from your `package.json`, Dockerfile and code; check what it inferred. The server must listen on the `PORT` Agent Cloud sets, the manifest's `port`.
2. **Cron jobs** become worker timers: each tick inserts a `jobs` row, which runs like any other job. Make each job safe to run twice, since a worker that dies mid-job loses its lease ([Background work](/docs/build/background-work-and-workers.md)).
3. **Schema.** `agc import` records every file in `migrations/` as already applied, so they must describe exactly the schema in the dump. The cleanest baseline is a schema-only dump the person runs against the provider's direct (unpooled) connection string, saved under the stem `agc migration new` printed. Remove any Prisma or Drizzle `migrate` step from your scripts.
4. **Environment variables.** List each secret in `[secrets] required` and give the person the link `agc secret set NAME` prints; `--generate` makes a key the app makes up, like a session-signing key, that nobody sees ([Secrets](/docs/build/secrets.md)). Values anyone may read, like a feature flag, go in `[service.web] env = { ALLOW_SIGNUP = "false" }` (and `[service.worker] env`).
5. **Blob files.** The app keeps its state, bytes it owns included, in its Postgres, so files people upload move there from Blob.
6. **Mirror.** `agc up --detach` and `agc check`. The mirror starts empty, with your migrations and any `[data.db] seed` applied. Add invariants for what must stay true, each with a smoke flow that tries to break it.
7. **Data.** The person exports a custom-format dump, and `agc import` validates it locally, without uploading.

```bash
agc migration new baseline
pg_dump --schema-only --no-owner --no-privileges "$DATABASE_URL_UNPOOLED" > migrations/<stem>.sql
agc up --detach
agc check
pg_dump --format=custom --no-owner --no-privileges "$DATABASE_URL_UNPOOLED" > dump.pgdump
agc import dump.pgdump
```

Import is for before the first release only: limits in [Importing existing data](/docs/data/importing-existing-data.md), `import.*` codes in the [Error code catalog](/docs/reference/error-code-catalog.md).

## Agent notes

- `agc ship` publishes; merging a pull request doesn't deploy. From CI, ship with a deploy key and `agc ship --from-git <commit>`.
- Failed ships have no receipt; keep the op ID and error.
- Never ask for the source connection string; the person runs `pg_dump` in their own terminal.
- Give the `agc import` link exactly as printed, and don't run `agc ship` until the import is `imported`: a ship ends the chance to import.

## Related

- [Which platform should my agent deploy to?](/docs/compare/which-platform-should-my-agent-deploy-to.md)
- [Background work and workers](/docs/build/background-work-and-workers.md)
- [Importing existing data](/docs/data/importing-existing-data.md)
- [Custom domains](/docs/build/custom-domains.md)
- [Secrets](/docs/build/secrets.md)

<!-- feedback:start -->
---
Wrong, outdated or unclear? Run `agc feedback docs "compare/agent-cloud-vs-vercel: <what is wrong>" --body <file>` with the sentence quoted in the file. No code or app data is sent.
<!-- feedback:end -->
