Skip to content

Config & Environment

VariableRequiredPurpose
SLACK_SIGNING_SECRETYesVerifies Slack request signatures.
SLACK_BOT_TOKEN or SLACK_BOT_USER_TOKENYesPosts thread replies and calls Slack APIs.
REDIS_URLYesQueue and runtime state storage.
JUNIOR_SECRETYesSigns internal timeout-resume and agent-dispatch callbacks, plus sandbox egress requester context.
JUNIOR_BOT_NAMENoBot display/config naming.
JUNIOR_SLASH_COMMANDNoSlack slash command for account-management flows. Defaults to /jr; the Slack app command must match this value.
AI_MODELNoPrimary model selection override for main assistant turns. Defaults to openai/gpt-5.4; Junior chooses the reasoning effort per turn automatically.
AI_FAST_MODELNoFaster model for lightweight tasks and routing/classification passes before the main turn begins. Defaults to openai/gpt-5.4-mini.
AI_VISION_MODELNoDedicated image-understanding model; unset disables vision features.
AI_WEB_SEARCH_MODELNoOverride for the webSearch tool model. Defaults to openai/gpt-5.4; does not fall through to AI_MODEL.
JUNIOR_BASE_URLNoCanonical base URL for callback/auth URL generation.
JUNIOR_STATE_KEY_PREFIXNoOptional namespace prepended to all state-adapter keys, locks, and queues. Use separate prefixes when sharing one Redis database across environments.
CRON_SECRET or JUNIOR_SCHEDULER_SECRETConditionalBearer token for the internal heartbeat route; use CRON_SECRET with Vercel Cron, or JUNIOR_SCHEDULER_SECRET for a non-Vercel heartbeat caller.
JUNIOR_TIMEZONENoDefault IANA timezone for scheduler authoring when the scheduler plugin is enabled. Defaults to America/Los_Angeles.
AI_GATEWAY_API_KEYNoAI gateway auth if used in your setup.

Generate JUNIOR_SECRET with Node, then store the generated value in every environment that runs the same app:

Terminal window
node -e "console.log(require('node:crypto').randomBytes(32).toString('base64url'))"

Use one stable value per deployment. Rotating it invalidates pending internal resume callbacks and sandbox requester context signed with the previous value.

If you mount @sentry/junior-dashboard, set these browser-auth variables:

VariableRequiredPurpose
GOOGLE_CLIENT_IDYesGoogle OAuth client ID.
GOOGLE_CLIENT_SECRETYesGoogle OAuth client secret.
BETTER_AUTH_URLNoOptional dashboard callback origin. Defaults to JUNIOR_BASE_URL, Vercel URL envs, or local dev.
BETTER_AUTH_SECRETNoOptional override for dashboard cookies. Defaults to JUNIOR_SECRET.

Configure allowed Google Workspace domains in juniorDashboardPlugin() for normal deployments. Set these optional policy variables when you prefer environment-managed dashboard authorization:

VariableRequiredPurpose
JUNIOR_DASHBOARD_GOOGLE_DOMAINSNoComma-separated or JSON array of allowed Google domains.
JUNIOR_DASHBOARD_ALLOWED_EMAILSNoComma-separated or JSON array of explicit email allowlist.
JUNIOR_DASHBOARD_TRUSTED_ORIGINSNoComma-separated or JSON array of Better Auth trusted origins.
JUNIOR_DASHBOARD_MOCK_CONVERSATIONSNoSet to true to overlay local/demo visual-QA fixtures.

For local/demo dashboard visual QA, set JUNIOR_DASHBOARD_MOCK_CONVERSATIONS=true to overlay sample conversation fixtures.

If your build command runs junior snapshot create:

  • REDIS_URL must be available during build.
  • VERCEL_OIDC_TOKEN must be available during build (via Vercel OIDC settings).

If enabled plugins use host-managed credentials inside Vercel Sandbox, Junior forwards registered provider domains through its credential egress proxy. The proxy verifies each Vercel-signed sandbox request and requires a signed requester context before it injects credentials lazily.

The egress proxy verifies Vercel-signed Sandbox OIDC tokens per request to authenticate the sandbox VM; requester authorization comes from the forwarding-route context signed with JUNIOR_SECRET and bound to that VM session. No separate audience, project, or team env vars are required for the proxy.

VariableRequiredPurpose
JUNIOR_BASE_URLConditionalPublic URL for the credential egress proxy, unless Vercel URL envs cover it.
VariableRequiredPurpose
GITHUB_APP_IDYesGitHub App identity.
GITHUB_APP_PRIVATE_KEYYesGitHub App signing key.
GITHUB_INSTALLATION_IDYesRepository/org installation target.
GITHUB_APP_BOT_NAMEYesGit author name, for example <app-slug>[bot].
GITHUB_APP_BOT_EMAILYesGit author noreply email for the App bot user.
VariableRequiredPurpose
SENTRY_CLIENT_IDYesOAuth client ID.
SENTRY_CLIENT_SECRETYesOAuth client secret.

Pass configDefaults to createApp() to set provider defaults across all conversations:

import { createApp } from "@sentry/junior";
const app = await createApp({
configDefaults: {
"sentry.org": "sentry",
"github.org": "myorg",
"github.repo": "myorg/myrepo",
},
});

Keys must be registered plugin config keys. Channel-scoped overrides (jr-rpc config set) take precedence.

  • Validate required variables exist in deployment environment.
  • Redeploy after variable changes.
  • Run one end-to-end Slack thread action per enabled integration.

Use Plugin Auth & Context to verify plugin auth and target-context behavior after env changes, then monitor with Observability.