Skip to main content

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).

VariableWhereRequired?Where to find it
NEXT_PUBLIC_FRANKIE_KEYFrontendYesOverview → Keys & settings → Publishable key, or Install → Which keys does your app need?. The Product agent's public key, safe in the browser.
FRANKIE_JWT_SECRETServer only, on the backend that serves /api/frankie/tokenYes, unless visitors chat without signing inOverview → 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_KEYServerSupabase apps onlyYour Supabase project. The generated token route uses them to check the user's Supabase session.
NEXT_PUBLIC_FRANKIE_KEY_SUPPORTFrontendTo turn on the Support agentThe Support agent's tab.
NEXT_PUBLIC_FRANKIE_KEY_DOCSFrontendTo turn on the Docs agentThe 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.

Deploying on Vercel?

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.