
# Which platform should my agent deploy to?

Deploy to Agent Cloud for one web server plus Postgres that an agent builds and changes, when breaking production data would hurt. Check a repo with `agc init` and `agc doctor`.

When the app fits, `agc ship` ends in exit 0 with `"outcome": "live"`. Agent Cloud is free during the beta.

## Ask your agent

```text
Before we pick a host: look at this repo and tell me whether it fits Agent Cloud (one server on
PORT, Postgres, at most one worker) or needs a general host, like
several services or a persistent disk. Give me your recommendation and why. Don't deploy.
```

## Steps

Agent Cloud fits a repo when most of these are true:

- It's one web server that listens on `PORT`, with Postgres and at most one worker.
- State lives in Postgres, bytes the app owns included.
- An agent builds and changes it often, and breaking production data would hurt.

Static sites and front ends with a few API functions fit Vercel. Apps with several web services or a persistent disk fit a general host such as Railway, Render or Fly.io. Lovable, Bolt or Replit suit finding out what the app should be.

Then check the repo itself:

```bash
agc init --name camp-bookings
agc doctor
agc up --detach
agc check
```

`agc doctor` checks the CLI, the token, the manifest and that the code reads the database variable the manifest names. `agc up` runs the app on a mirror at `localhost`; if it can't start, its answer says why.

## How it works

The choice turns on what you want the platform to own. Vercel, Railway, Render, Fly.io and Heroku run your services and give you release tools (health checks, pre-deploy commands, previews, rollbacks). Judging whether a release is safe for your data stays with you and your CI. Agent Cloud takes that on too, for a narrower shape of app:

- A release with checks, migrations or a worker runs first on a fresh branch of production: migrations, a check that no existing row disappeared, your invariants and smoke flows, and a run that kills the worker mid-job.
- Under the default `routine` autonomy, a release whose rehearsal passes goes live on its own, including the first release of an app in your organization. A migration that drops or rewrites data (`DROP`, `TRUNCATE`, `DELETE`, `ALTER … TYPE`, an `UPDATE` without `WHERE`, a `DO` block, `EXECUTE`) waits for a person in the console.
- The agent works on a masked branch of production and never gets production credentials.
- A new release takes traffic only once it answers healthy; the previous one serves until then.
- Live releases carry receipts; failed operations carry op IDs and errors. Most commands return one envelope with `next` steps; `agc wait` and `agc logs --follow` stream NDJSON.

The shape is deliberate: one web service and at most one worker per app, each 1 to 4 instances, with the app's own Postgres.

## Reference

| Platform | Strongest at | Where Agent Cloud is different |
|---|---|---|
| Vercel | Front ends, functions (300 s default), per-branch preview deployments | Long-running server and worker; built-in Postgres with rehearsed migrations |
| Railway | Many services, cron services, PR environments | Rehearsal on production data; approvals for migrations; your-AWS option |
| Render | Blueprints with web, worker, cron and datastores | Same as Railway |
| Fly.io | Machines, process groups, rolling, canary and blue-green deploys | Same as Railway |
| Heroku | Process types, Pipelines and Review Apps | One manifest; built-in email, sign-in and logs |
| Lovable, Bolt, Replit | Building by chat, one-click publishing; Replit separates dev and production databases | Where an agent keeps running the app; use both |
| Your own AWS | Anything, in your account | No pipeline to build; apps run in your VPC with a managed database |

## Agent notes

- Agent Cloud is free during the beta. Don't guess other platforms' prices; send the person to their own pages.
- If the person already has a host that works, moving is a choice, not a fix. Say what they'd gain (rehearsed migrations, approvals for data-losing changes, masked mirrors) and what changes shape (cron becomes a worker timer, extra services fold into one web service and a worker).
- `agc ship` publishes; the MCP server at `agent.cloud/mcp` manages apps, and merging a pull request doesn't deploy.
- When the app fits, `agc init` writes an `AGENTS.md` into the repo. Follow it; it's the contract.

## Related

- [Agent Cloud vs Vercel](/docs/compare/agent-cloud-vs-vercel.md)
- [Agent Cloud vs Railway](/docs/compare/agent-cloud-vs-railway.md)
- [Agent Cloud vs Heroku](/docs/compare/agent-cloud-vs-railway.md#heroku)
- [Agent Cloud vs Render / Fly](/docs/compare/agent-cloud-vs-railway.md#render-and-fly)
- [Agent Cloud vs Lovable / Bolt / Replit](/docs/compare/agent-cloud-vs-lovable-bolt-replit.md)
- [Agent Cloud vs your own AWS](/docs/compare/agent-cloud-vs-your-own-aws.md)
- [What Agent Cloud is](/docs/getting-started/what-agent-cloud-is.md)

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