Skip to content
RehearsalDocs

Configuration

Every setting that Rehearsal reads from the environment, with its default and what it changes.

Rehearsal reads its settings from environment variables. A server also reads a file named .env in the folder it starts in, and a value in the real environment wins over the file. With Docker Compose, the settings are in infra/deploy.env: see Install with Docker Compose.

A person who only uses a server needs the first section. The rest is for the person who runs one.

Client

SettingDefaultWhat it changes
REHEARSAL_URLhttps://rehearsalkit.xyzThe server that the CLI, the Python client and the MCP server talk to. It takes precedence over a saved sign-in.
REHEARSAL_API_KEYThe key they use. It takes precedence over a saved sign-in.
REHEARSAL_CONFIG~/.config/rehearsal/config.jsonWhere rehearsal login saves the sign-in.
REHEARSAL_DEBUGSet it to anything to make the CLI log each HTTP request.

Database and files

SettingDefaultWhat it changes
REHEARSAL_DATABASE_URLa local PostgreSQL on port 5433The PostgreSQL database, as postgresql+psycopg://user:password@host:port/database.
REHEARSAL_DB_POOL_SIZE10Connections that each process keeps open.
REHEARSAL_DB_MAX_OVERFLOW20Extra connections that each process may open under load. A managed database limits the total of all processes.
REHEARSAL_DATA_DIR./varThe folder for application sources, world snapshots and exported files. The API and every worker must see the same folder.
REHEARSAL_SOURCE_ROOTS./examplesFolders, separated by commas, that an application may name as a local source.
REHEARSAL_DOWNLOADS_DIRdownloads in the data folderA folder that the server offers at /downloads, for the client package.
REHEARSAL_ENV_FILE.envA file of settings to read at start. A value in the real environment wins over the file.

Sign-in

SettingDefaultWhat it changes
REHEARSAL_SESSION_SECRETa development valueSigns browser sessions. Set a long random value on any server that others can reach.
REHEARSAL_SIGNUPopenAny visitor can create an account and an organisation. closed turns that off.
GOOGLE_CLIENT_IDA Google OAuth web client id. With it, the console offers "Sign in with Google".
REHEARSAL_ADMIN_EMAILSOperator admins, separated by commas. They see every workspace and can set any plan. Only a sign-in with Google counts.
REHEARSAL_PUBLIC_URLhttp://localhost:7800Where browsers reach the server. Payment pages return here.
REHEARSAL_DOCS_URLThe documentation site. /docs on the server redirects there; without it, /docs opens the API reference at /api/docs.

Models

SettingDefaultWhat it changes
REHEARSAL_MODEL_COMPILERa chain of three hosted modelsThe model chain that builds worlds.
REHEARSAL_MODEL_AGENTthe same chainThe model chain for agents that have no model of their own.
REHEARSAL_MODEL_PARTICIPANTa chain of two smaller modelsThe model chain that plays the simulated customer.
REHEARSAL_MODEL_IMPROVERthe compiler's chainThe model chain that proposes a better agent.
REHEARSAL_PRICES{}Prices for models whose provider reports none: JSON of provider:model to [input, output] in US dollars for a million tokens.
REHEARSAL_PRICING_FILEpricing.yamlA file of the same prices, each with its source and date.

Model chains

A chain is a list of provider:model, separated by commas. The server tries them in order, and moves to the next when a provider fails or is not configured.

REHEARSAL_MODEL_COMPILER=nebius:deepseek-ai/DeepSeek-V4.1-Flash,google:gemini-3.5-flash

Providers

A provider works when its key is set. Every provider is reached through an OpenAI-compatible API.

ProviderKeyAddress
nebiusNEBIUS_API_KEYhttps://api.tokenfactory.nebius.com/v1
openrouterOPENROUTER_API_KEYhttps://openrouter.ai/api/v1
groqGROQ_API_KEYhttps://api.groq.com/openai/v1
googleGOOGLE_API_KEYhttps://generativelanguage.googleapis.com/v1beta/openai/
openaiOPENAI_API_KEYhttps://api.openai.com/v1
anthropicANTHROPIC_API_KEYhttps://api.anthropic.com/v1/
litellmLITELLM_API_KEYLITELLM_BASE_URL
modalMODAL_PROXY_TOKEN_ID and MODAL_PROXY_TOKEN_SECRETMODAL_BASE_URL
localREHEARSAL_LOCAL_API_KEYREHEARSAL_LOCAL_BASE_URL
customREHEARSAL_CUSTOM_API_KEYREHEARSAL_CUSTOM_BASE_URL

local is for a model server on your own machine, such as vLLM. custom is for any other OpenAI-compatible address. rehearsal prices shows the price the server uses for each configured model.

Workers and sandboxes

SettingDefaultWhat it changes
REHEARSAL_RUN_PARALLEL4Into how many parts a run is cut. Each part needs one free worker and one sandbox.
REHEARSAL_BUILD_PARALLEL4How many jobs a build writes and validates at once. Each one being validated runs its own copy of the world.
REHEARSAL_MAX_ACTIVE_BUILDS0, no limitBuilds that one project may have in progress.
REHEARSAL_MAX_ACTIVE_RUNS0, no limitRuns that one project may have in progress.
REHEARSAL_CONTAINER_MEMORY1gThe memory limit of each container in a sandbox.
REHEARSAL_CONTAINER_CPUS1.0The processor limit of each container in a sandbox.
REHEARSAL_CONTAINER_PIDS256The process limit of each container in a sandbox.
REHEARSAL_LEASE_SECONDS60How long a worker's claim on a server job lasts without a renewal. After that, another worker takes the job.
REHEARSAL_WORKER_CONTAINERThe worker's own container id, when the worker runs in a container. The Compose file sets it.

Spend and plans

SettingDefaultWhat it changes
REHEARSAL_MONTHLY_ALLOWANCE_USD0, no limitA model spend limit for the whole server, for a calendar month. It applies when plans are off.
REHEARSAL_PLANSoffon puts every workspace on a plan and enforces its limits. Leave it off on a private server.
REHEARSAL_QUIET_HOURS_UTC18:00-02:00When evaluations of the Free plan may start, as HH:MM-HH:MM in UTC. It may cross midnight.
DODO_PAYMENTS_API_KEYThe payment provider's key. Only with plans on.
DODO_PAYMENTS_WEBHOOK_KEYThe secret that signs the payment provider's notifications.
DODO_PAYMENTS_ENVIRONMENTtest_modetest_mode or live_mode.
DODO_PRODUCT_*The payment provider's product id for each thing that can be bought: PRO_MONTHLY, PRO_YEARLY, TEAM_MONTHLY, TEAM_YEARLY, EPISODES_1000, BUILD_1.

Tracing and training

SettingDefaultWhat it changes
NEATLOGS_API_KEYWith it, the server sends traces of model calls to neatlogs. Without it, tracing is off.
KAGGLE_API_TOKENFor training, which is not built yet.
Generated from the code of rehearsal-kit 0.1.2.

Was this page helpful?

On this page

Was this page helpful?