Clerk backend secret key. Used by Next.js middleware for server-side auth verification. Starts with sk_live_ or sk_test_. Never expose to the browser.
CLERK_WEBHOOK_SECRET
Yes
Convex Dashboard
Svix signing secret for the Clerk user webhook (/clerk-users-webhook). Used to verify HMAC signatures on incoming webhook payloads. Starts with whsec_.
Convex server-side environment variables are set via the Convex Dashboard or bunx convex env set. They are available in Convex actions (Node.js runtime) via process.env.
Variable
Required
Where Set
Description
ANTHROPIC_API_KEY
Yes
Convex Dashboard
Anthropic API key for Claude model calls. Used by Convex actions for document analysis, skill execution, and AI scoring.
The agent service is a stateless AI inference sidecar. In local development it runs as an Express server; in production it runs as a Cloudflare Worker.
Variable
Required
Where Set
Description
AGENT_SERVICE_URL
Yes
Convex Dashboard + Vercel
URL of the agent service. Local: http://localhost:3001. Production: the Cloudflare Worker URL (e.g., https://foundry-agent-worker.<account>.workers.dev).
AGENT_SERVICE_SECRET
Prod only
Convex Dashboard + Wrangler
Bearer token shared between Convex and the agent worker for request authentication. Not needed in local dev where the Express server runs without auth.
ANTHROPIC_API_KEY
Yes
Wrangler secrets
Same Anthropic API key, set separately on the Cloudflare Worker so it can call Claude directly.
The sandbox system provisions ephemeral Claude Code environments for task execution. It consists of a Cloudflare Worker with Durable Objects and Docker containers.
Variable
Required
Where Set
Description
SANDBOX_WORKER_URL
Yes
Convex Dashboard
URL of the Cloudflare sandbox worker (e.g., https://migration-sandbox-worker.<account>.workers.dev). Convex calls this to provision and manage sandbox sessions.
SANDBOX_API_SECRET
Yes
Convex Dashboard + Wrangler
Shared secret for authenticating requests between Convex and the sandbox worker. Set on both sides.
HMAC secret for validating GitHub webhook signatures. Set this to the same value configured in your GitHub App’s webhook settings. Used by the /api/webhooks/github HTTP endpoint.