Vercel
One project, both processes, no rewrite configuration.
This is the path the app is built for. withEve() writes a Vercel output
configuration at build time that deploys the agent alongside the Next.js app, so
/eve/v1/* stays same-origin with no rewrite target to configure.
Deploy
Link the project
bunx vercel linkThis also pulls AI Gateway credentials, so AI_GATEWAY_API_KEY may already be
satisfied by OIDC in preview and production.
Create the database
Add a Neon integration (or a Neon HTTP proxy) and set
DATABASE_URL. lib/db/index.ts uses drizzle-orm/neon-http, so a plain
Postgres server needs the drizzle-orm/node-postgres driver instead. Then, from your machine with that URL in .env.local:
bun run db:setup
bun run db:pushCreate a Blob store
Storage → Blob in the dashboard. Copy the token into BLOB_READ_WRITE_TOKEN.
Set the remaining environment variables
At minimum BETTER_AUTH_SECRET and BETTER_AUTH_URL. Set APP_URL to your
production origin so lookout emails link correctly, or leave it unset and let
the BETTER_AUTH_URL you just set cover it. VERCEL_PROJECT_PRODUCTION_URL is
reached only when neither is set.
Ship
bunx vercel --prodWhat differs from every other target
| On Vercel | Elsewhere | |
|---|---|---|
| Agent process | Deployed automatically by withEve | You start eve start yourself |
| Rewrite target | Same-origin | 127.0.0.1:4274 or EVE_NEXT_PRODUCTION_ORIGIN |
run_code credentials | OIDC, automatic | VERCEL_TOKEN + team + project |
| Sandbox prewarm | Part of the build | At eve start, before the agent listens |
withEve short-circuits on process.env.VERCEL: it returns the config
untouched and never installs the localhost rewrite. That one branch is the whole
difference.
Function duration
Deep research turns run long. The default function duration on Hobby will cut them off. Raise it in your project settings, or on the relevant route:
export const maxDuration = 800A cut-off turn is not lost, but it is truncated
The transcript is durable: events are persisted to chat_event as they
arrive, and reloading re-attaches at the cursor. But the agent stops when
the function does, so the turn ends mid-research. Raise the limit rather than
relying on the resume path.
Set BETTER_AUTH_URL per-environment, or OAuth callbacks on preview
deployments will redirect to production.