# Where can my coding agent deploy updates to an app?

> Source: <https://getfloo.com/blog/where-can-my-coding-agent-deploy-updates>
> Published: 2026-12-03 00:00:00+00:00

**Recommendation:** Route agent changes to per-PR preview environments with their own database branch, seed existing records in dev first, and gate production behind a separate approval or release step rather than merge.
More in the playbook "Running AI in production": <https://wpnews.pro/playbooks/production-ops>

Finance wants a cost center on every new purchase request. The portal already has pending purchases. Can the coding agent add the field, give finance a URL to try, and leave the current portal serving employees until someone approves the change?

## TL;DR

For a portal with managed Postgres, floo gives the pull request its own app URL and database branch. Railway can preview multiple project services together. Vercel gives a Next.js branch a preview URL and lets you choose the database connection for that environment. On all three, decide who controls the production release before giving the agent deploy access.

## Run the second release against an existing purchase

The [approval queue](https://getfloo.com/templates/approval-queue) already records the requester, decision and amount. This [example change](https://getfloo.com/examples/approval-queue/cost-center.patch) adds an optional cost center to the submission form, API, database and request detail. Keeping the field optional means an employee can still open a purchase created last week.

Apply the change to a fresh local copy of the template. The pinned revision and lockfile are the ones used for this example. Use Node 24.

```
git clone https://github.com/getfloo/approval-queue-template approval-queue-demo &&
cd approval-queue-demo &&
git switch -c cost-center f164cc475b4779cf2349f86b6e524c06af70b39c &&
curl -fsSLo .git/cost-center.patch https://getfloo.com/examples/approval-queue/cost-center.patch &&
git apply .git/cost-center.patch &&
npm ci &&
npm run db:generate -- --name cost_center &&
npm test
```

We tested the migration on local Postgres with one purchase already pending. It kept its original status and had an empty cost center. Through the app API, a member submitted a $180 label printer under Operations and an admin approved it with the comment “Budget confirmed.” The requester’s detail page showed both the cost center and the decision. Those are the checks to repeat on the preview URL.

## Who gets to release the change?

| Host | What the agent can give finance | Where the team approves the release | 
|---|---|---|
| floo | In your connected GitHub repository, an authorized collaborator can comment `/floo preview on` on the pull request. floo builds the app and runs its migration against preview-owned Postgres. The default preview database starts empty. To test an existing purchase, create it in dev before applying the change there and configure the preview data mode as`clone-dev` . floo copies the dev data before applying the preview migration.[Preview environments](https://getfloo.com/docs/guides/preview-environments) | Merging to the default branch updates dev. Publish a GitHub release for the approved commit to update prod. Restrict release authority to the people or workflow responsible for that decision. [Deployment environments](https://getfloo.com/docs/guides/environments) | 
| Railway | Enable PR environments on the project. Railway can create a temporary copy of the services for each pull request. Check the app's database reference in that environment before running the migration. Bot-authored pull requests have their own opt-in. [Railway environments](https://docs.railway.com/environments) | When the production service auto-deploys from the target branch, reviewing and merging the PR is the release decision. Railway can wait for GitHub checks. [GitHub autodeploys](https://docs.railway.com/deployments/github-autodeploys) | 
| Vercel | A push to a non-production branch creates a Preview Deployment for a connected Git project. Set a preview-specific database connection before exercising writes. [Vercel environments](https://vercel.com/docs/deployments/environments) | With standard Git integration, merging to the production branch deploys to production. For a separate approval step, use a staged production deployment and promote it after verification. [Promoting a deployment](https://vercel.com/docs/deployments/promoting-a-deployment) | 

The local example verifies the app change. The three hosting workflows above follow the providers’ documentation. The template expects floo App sign-in and a gateway-supplied user role. On Railway or Vercel, connect the app to your identity provider and adapt the identity check before inviting employees.

## What should the agent hand back?

Ask for the preview URL, commit, migration result and the ID of the test purchase. Open that purchase as its requester and check the decision. Then ask a different team member without the admin role to open the same URL. The template should hide another employee’s request. Only release after both checks pass. If the update breaks a route, use the commit and deploy ID to [find that release’s logs](https://getfloo.com/blog/hosting-platforms-with-per-deploy-logs-and-rollback).

For a small finance team choosing a host, [price the app and Postgres together](https://getfloo.com/blog/cheapest-way-to-host-an-app-built-with-ai#expense-approval-app-cost). The development workflow and the monthly bill are separate buying decisions.
