Menu
Public documentation

Environment Variables

Environment Variables

CLI Target Variables

VariableRequiredDescription
AGENT_API_KEYoptionalExample credential for your own HTTP agent target.

Built-In Attack Pack Target

Set exactly one:

VariableDescription
ROLEPLAY_TARGET_URLHTTP target URL for social-engineering-core.
ROLEPLAY_TARGET_COMMANDCLI target command for social-engineering-core.

Attacker And Judge Providers

Use these when you want adaptive attacker turns and semantic or hybrid transcript judging instead of the local mock smoke-test provider.

VariableRequiredDescription
ROLEPLAY_LLM_PROVIDERfor real adaptive runs unless --provider is providedShared provider for attacker and judge.
ROLEPLAY_ATTACKER_PROVIDERoptionalProvider for adaptive attacker turns. Overrides ROLEPLAY_LLM_PROVIDER.
ROLEPLAY_JUDGE_MODEfor real runs unless --judge is providedrules, semantic, or hybrid. Use hybrid for CI and serious real-agent tests.
ROLEPLAY_JUDGE_PROVIDERfor semantic/hybrid judging unless --judge-provider is providedProvider for transcript judging. Overrides ROLEPLAY_LLM_PROVIDER.
ROLEPLAY_LLM_MODELoptionalShared model name.
ROLEPLAY_ATTACKER_MODELoptionalModel for adaptive attacker turns.
ROLEPLAY_JUDGE_MODELoptionalModel for judging.
ROLEPLAY_OPENAI_API_KEYfor openaiOpenAI API key.
ROLEPLAY_ANTHROPIC_API_KEYfor anthropicAnthropic API key.
ROLEPLAY_GOOGLE_API_KEYfor googleGoogle Gemini API key.
ROLEPLAY_LLM_API_KEYfor openai-compatibleAPI key for an OpenAI-compatible provider.
ROLEPLAY_LLM_BASE_URLfor openai-compatibleProvider base URL, for example https://api.example.com/v1.

Provider identifiers are openai, anthropic, google, and openai-compatible. They are reference options, not defaults. Use --target mock --provider mock --judge rules only for install smoke tests.

Workbench Upload Variables

VariableRequiredDescription
ROLEPLAY_CLOUD_URLfor uploads unless --endpoint is providedworkbench base URL.
ROLEPLAY_PROJECT_IDfor uploads unless --project is providedworkbench project ID.
ROLEPLAY_API_KEYfor uploads unless --api-key is providedProject API key.
ROLEPLAY_AGENT_NAMErecommended for multi-agent projectsTarget agent attribution.
ROLEPLAY_ENVIRONMENToptionalEnvironment label for uploaded run.
ROLEPLAY_BUILD_URLoptionalCI build URL.

CI Detection

The CLI can infer build metadata from common CI variables.

Branch:

  • GITHUB_REF_NAME
  • BRANCH_NAME

Commit:

  • GITHUB_SHA
  • COMMIT_SHA

Build URL:

  • ROLEPLAY_BUILD_URL
  • GitHub Actions URL from GITHUB_SERVER_URL, GITHUB_REPOSITORY, and GITHUB_RUN_ID
  • CI_JOB_URL
  • CIRCLE_BUILD_URL
  • BUILD_URL

Workbench Store

VariableDescription
ROLEPLAY_CLOUD_STOREPath to the local workbench JSON store. Defaults to .roleplay/cloud-db.json.
ROLEPLAY_DEMO_SEEDSet to true only when you intentionally want local development fixture data. Launch workbench state is empty by default.

Use this in tests or local experiments when you want isolated Cloud state.

Public Production Variables

VariableRequiredDescription
NEXT_PUBLIC_APP_URLyesHosted workbench URL, for example https://app.roleplay.sh.
NEXT_PUBLIC_MARKETING_URLrecommendedMarketing site URL.
NEXT_PUBLIC_DOCS_URLrecommendedDocs URL.
SUPPORT_EMAILrecommendedPublic support contact.
DATABASE_URLyesProduction Postgres connection string.
ROLEPLAY_CLOUD_STORE_DRIVERyes for hosted CloudSet to postgres to use Postgres-backed Cloud persistence.
AUTH_SECRETyesStrong random secret for production auth/session signing.
ROLEPLAY_AUTH_REQUIREDrecommended for hosted CloudSet to true to require signed workbench sessions outside local development.
STRIPE_SECRET_KEYyesStripe secret key for Checkout and portal sessions.
STRIPE_WEBHOOK_SECRETyesStripe webhook signing secret.
STRIPE_BUILDER_PRICE_IDyesStripe recurring price for the Builder plan.
STRIPE_TEAM_PRICE_IDyesStripe recurring price for the Team plan.
ROLEPLAY_TRANSACTIONAL_EMAILS_ENABLEDoptionalSet to true to send transactional emails through AWS SES. Defaults to disabled.
AWS_REGIONwhen email enabledAWS region for SES sending.
AWS_SES_FROM_EMAILwhen email enabledVerified SES sender address.
AWS_SES_FROM_NAMEoptionalSender display name. Defaults to Roleplay.
AWS_SES_REPLY_TO_EMAILoptionalReply-to address. Defaults to SUPPORT_EMAIL or support@roleplay.sh.
AWS_SES_CONFIGURATION_SEToptionalSES configuration set for delivery tracking.