[← All integrations](/getting-started)

Install · Experimental

# Vercel (non-Next Vite SPA)

experimental · edge

Vite + React, Vite + Vue, anything non-Next. Drop in Vercel Edge Middleware. If you're on Next.js, use the reverse-proxy recipe instead.

**Start here first.** Every platform recipe below assumes the canonical Express + Docker install at [/install/express-docker](/install/express-docker). The snippets on this page are the platform-specific deltas on top of that baseline.

For non-Next projects on Vercel (Vite + React, Vite + Vue, etc.), use Vercel Edge Middleware. If you're on Next.js, the [reverse-proxy recipe](/install/reverse-proxy) is the recommended path.

terminal — downloadcopy

```
# Vercel (non-Next Vite SPA) — drop at project root
curl https://api.agentsite.app/agentsite-edge.mjs > agentsite-edge.mjs
curl https://api.agentsite.app/edge/vercel-edge-middleware.ts > middleware.ts
```

Set `AGENTSITE_TOKEN` and `AGENTSITE_SITE` in your Vercel project's Environment Variables (mark TOKEN as Sensitive). Deploy.

**Static-only Vercel deployments need the Edge runtime.** Free / Hobby tier supports Edge Middleware — no upgrade needed. Cold-start latency is in the tens of milliseconds.

[← All integrations](/getting-started#by-hand)  ·  [Need help with this recipe? →](/contact)

Cookies

We use cookies to make this site work and to understand how it's used. [Learn more](https://www.cookiesandyou.com/)

Decline Got it