Environment variables
Setting these is step 3 of the Go live checklist.
Set these in .env.local for development (restart the dev server afterwards), and in every environment you deploy to (Preview and Production).
| Variable | Where | Required? | Where to find it |
|---|---|---|---|
NEXT_PUBLIC_FRANKIE_KEY | Frontend | Yes | Overview → Keys & settings → Publishable key, or Install → Which keys does your app need?. The Product agent's public key, safe in the browser. |
FRANKIE_JWT_SECRET | Server only, on the backend that serves /api/frankie/token | Yes, unless visitors chat without signing in | Overview → Keys & settings → Server secret → Reveal current secret. Signs user tokens. Never expose it to the browser or commit it. |
NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY | Server | Supabase apps only | Your Supabase project. The generated token route uses them to check the user's Supabase session. |
NEXT_PUBLIC_FRANKIE_KEY_SUPPORT | Frontend | To turn on the Support agent | The Support agent's tab. |
NEXT_PUBLIC_FRANKIE_KEY_DOCS | Frontend | To turn on the Docs agent | The Docs agent's tab. |
Frankie never writes a key into your code: the pull requests leave the values blank. An agent stays off until its key is set.
Rebuild after changing a key. NEXT_PUBLIC_* variables are built into the page when the app is built, so a new value does nothing until you redeploy. On other frameworks, use their public prefix for the key, for example VITE_FRANKIE_KEY on Vite.
Auth.js / NextAuth apps also need their own AUTH_SECRET (or NEXTAUTH_SECRET) on the server, as usual. The token route reads the session with it.
If you rotate the secret (Danger zone → Rotate secret), signed-in chat stops working until every server has the new value.
Once a repository is connected on the Install tab, choose Connect Vercel. Frankie sets every agent's key and the secret for you, then triggers a rebuild.