Skip to content

Setup: Environment variables reference

One table, all the variables. Set these in both:

  • .env.local on your machine (for local dev, the Manage UI, and the E2B template build).
  • Vercel → Settings → Environment Variables (for production).

The same values work in both places.

Required

VariableDescriptionSet by
WORKOS_API_KEYWorkOS API key (sk_...).WorkOS
WORKOS_CLIENT_IDWorkOS client ID (client_...).WorkOS
WORKOS_ORGANIZATION_IDWorkOS organization ID (org_...). Members of this org can sign in.WorkOS
WORKOS_COOKIE_PASSWORDCookie encryption secret, ≥ 32 chars. Generate with node -e "console.log(require('crypto').randomBytes(32).toString('base64'))".You
E2B_API_KEYE2B API key.E2B
SUPABASE_URLSupabase project URL.Supabase
SUPABASE_SERVICE_ROLE_KEYSupabase service-role key (starts with eyJ...). Treat like a root password.Supabase

LLM providers

At least one of these is required; all three are recommended.

VariableDescriptionSet by
OPENAI_API_KEYOpenAI API key.AI providers
ANTHROPIC_API_KEYAnthropic API key. Also used by the Manage UI chat (Claude Sonnet) and the healer agent.AI providers
GOOGLE_GENERATIVE_AI_API_KEYGoogle Generative AI key.AI providers

Optional

VariableDescription
COMPOSIO_API_KEYEnables the Composio toolkit story inside user sandboxes. Get it from https://platform.composio.dev.
SANDBOX_UPDATE_BRANCHBranch that sandboxes pull from when you run an update. Defaults to main. Change this if you want all sandboxes to track a release or staging branch instead. Must match the regex [a-zA-Z0-9_/.-]+.

Remember

  • Sandboxes never see these. Real provider keys stay on Vercel; each sandbox gets a virtual key only. This is what makes the virtual-key gateway at /api/gateway/* worthwhile.
  • The Edge gateway needs them. That's why they go in Vercel env, not just .env.local.
  • Rotate in pairs. When you rotate a WorkOS or Supabase key, update both .env.local and Vercel at the same time to avoid a production–local drift.

Next

Continue to Deploy to Vercel.

Released under the Apache-2.0 License.