
# Agent Cloud vs Lovable / Bolt / Replit, and moving over

Lovable, Bolt and Replit are where you build an app by describing it. Agent Cloud is where a coding agent keeps running and changing it once people depend on it. Build there, sync to GitHub, then let your agent move it.

Claude Code, Codex or Cursor runs `agc init` and `agc ship` in the repo. The first release of an app in your organization goes live on its own, with `"outcome": "live"` and exit 0; an app your agent made before you signed up waits at a private preview link until you publish it.

## Ask your agent

```text
I built this app in Lovable and synced it to GitHub. Get it ready for Agent Cloud: one server
for the UI and API, Postgres, Agent Cloud sign-in instead of Supabase auth, SQL migrations and
passing mirror checks. Tell me what has to change, and stop before moving production data.
```

Expect a list of changes, usually a small server, API routes in place of browser calls to Supabase, and SQL migrations.

## How they compare

In all four, a coding agent writes the code, with Postgres behind the app.

| | Lovable / Bolt / Replit | Agent Cloud |
|---|---|---|
| Where you build | In the browser, by chat, with a live preview | Your coding agent, in the repo; `agc up` runs it at `localhost` on masked data |
| Database access | Lovable Cloud and Supabase put Postgres, auth, storage and functions behind the browser, under row-level security (Lovable's docs call missing RLS the most common cause of data exposure), as does Bolt Cloud. Replit has its own database | The browser never talks to the database; your server does |
| Dev vs production data | Lovable drafts share the published app's database. Replit keeps separate databases | A masked branch per agent; production reads are masked and read-only |
| Schema changes | Applied by the builder | SQL in `migrations/`, [rehearsed](/docs/concepts/rehearsals.md) on a branch of production; one that drops or rewrites data waits for a person's [approval](/docs/concepts/approvals.md) |
| Files people upload | Lovable Cloud, Supabase or Bolt Cloud storage | The app's own Postgres; mirrors get a masked copy |

## Which to use

Use both: Lovable to find out what the app should be, and Agent Cloud once it holds data people would miss. You can keep designing in Lovable after the move if the agent ships those changes from the repo.

You can keep Supabase as an outside service, with its keys in `[secrets] required`, but rehearsals, masked mirrors and migration approvals cover only the app's own Postgres.

## Moving from Lovable, Bolt or Replit

**Get the code into a repo.** Lovable: GitHub sync (two-way, one branch, always a new repo). Bolt: GitHub integration, which overwrites GitHub when both sides change, or Export → Download. Replit: Git pane and GitHub sync, or Download as zip. Clone it and run `agc init --name camp-bookings`, or start from Home's Bring picker, which takes a public GitHub repository. The builder's sync keeps pushing, so commit `agentcloud.toml` and `migrations/`, and decide where edits happen from now on.

**Adapt the app:**

- Static React + Vite (`dist/`): add a small Node server serving `dist/` with an `index.html` fallback, and the API under `/api`.
- Lovable on TanStack Start (the default for new projects since May 13, 2026; June 22 for Enterprise): build with `NITRO_PRESET=node-server`, then set `[service.web] command = "node .output/server/index.mjs"` and `port = 3000`, as Lovable's docs give.
- Supabase Edge Functions and Bolt server functions become server routes; a Replit Reserved VM or Autoscale start command, `[service.web] command`; a Scheduled deployment, a timer in `[service.worker]`.
- Every `supabase.from(...)` call in the front end becomes a fetch to your own `/api` route, which checks who's signed in before it reads or writes. This replaces row-level security and is usually the largest change.
- Sign-in: [Agent Cloud sign-in](/docs/build/choosing-a-sign-in-shape.md#agent-cloud-sign-in-shape-2), keyed on `user.id` in a `uuid` column, or `[auth] provider = "edge"` for an internal tool. Logins can't carry over: Replit Auth identities are Replit accounts, and Supabase password hashes are useless here. Add a nullable `agc_user_id uuid` column to your users table, and on a first sign-in find the row by verified email and store `user.id`.
- Files: the app keeps its state, bytes it owns included, in its Postgres. Lovable's export leaves files out and Bolt documents no file download, so copying existing files is a separate job.

**Export the data:**

- Lovable Cloud: Cloud → Advanced settings → Export data, a custom-format archive of your tables, user accounts and password hashes (databases up to 15 GB, files up to 5 GB, one export per 24 hours).
- Your own Supabase project: `pg_dump` against the direct connection string (port 5432) from the dashboard's Connect button.
- Replit: `pg_dump -Fc --no-owner --no-privileges` against the production database's URL from Database → production → Settings; `$DATABASE_URL` is the development one.
- Bolt documents no full export: claim the database into Supabase and use that route, or load each table's CSV export into the scratch database.

**Keep only your tables.** Supabase dumps carry the `auth` and `storage` schemas, RLS policies naming Supabase roles, and foreign keys into `auth.users`. Restore into a scratch database, drop those policies and foreign keys, then dump just your tables, plus a schema-only baseline under the stem `agc migration new baseline` printed (`agc import` marks every file in `migrations/` as applied). Prove the restore into an empty `check` database with Agent Cloud's flags:

```bash
pg_restore --no-owner --no-privileges -d scratch export.dump
pg_dump --format=custom --no-owner --no-privileges --schema=public scratch > dump.pgdump
pg_dump --schema-only --no-owner --no-privileges --schema=public scratch > migrations/<stem>.sql
pg_restore --no-owner --no-privileges --single-transaction --exit-on-error -d check dump.pgdump
agc import dump.pgdump
```

**Validate.** `agc import` validates locally and uploads nothing; a zip fails with `import.not_a_dump`, and a CSV passes as "plain" but would fail in the restore. Import works only before the first release ([limits](/docs/data/importing-existing-data.md), [codes](/docs/reference/error-code-catalog.md)).

## Agent notes

- Merging on GitHub doesn't deploy; `agc ship` does.
- Copy `VITE_SUPABASE_*` keys into `[secrets]` only if the person keeps Supabase; never put its service key in code, or exported rows in chat.
- Matching users by email on first sign-in is a design choice; get the person's agreement.

## Related

- [Quickstart: an existing app](/docs/getting-started/quickstart-existing-app.md)
- [Importing existing data](/docs/data/importing-existing-data.md)

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