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
| Setting | Default | What it changes |
|---|---|---|
REHEARSAL_URL | https://rehearsalkit.xyz | The server that the CLI, the Python client and the MCP server talk to. It takes precedence over a saved sign-in. |
REHEARSAL_API_KEY | The key they use. It takes precedence over a saved sign-in. | |
REHEARSAL_CONFIG | ~/.config/rehearsal/config.json | Where rehearsal login saves the sign-in. |
REHEARSAL_DEBUG | Set it to anything to make the CLI log each HTTP request. |
Database and files
| Setting | Default | What it changes |
|---|---|---|
REHEARSAL_DATABASE_URL | a local PostgreSQL on port 5433 | The PostgreSQL database, as postgresql+psycopg://user:password@host:port/database. |
REHEARSAL_DB_POOL_SIZE | 10 | Connections that each process keeps open. |
REHEARSAL_DB_MAX_OVERFLOW | 20 | Extra connections that each process may open under load. A managed database limits the total of all processes. |
REHEARSAL_DATA_DIR | ./var | The folder for application sources, world snapshots and exported files. The API and every worker must see the same folder. |
REHEARSAL_SOURCE_ROOTS | ./examples | Folders, separated by commas, that an application may name as a local source. |
REHEARSAL_DOWNLOADS_DIR | downloads in the data folder | A folder that the server offers at /downloads, for the client package. |
REHEARSAL_ENV_FILE | .env | A file of settings to read at start. A value in the real environment wins over the file. |
REHEARSAL_LIBRARY_PROJECT | A project whose published worlds form the world library: every workspace can rehearse agents on them and make agents for them, without building. Their held-out jobs are shown by title only. |
Sign-in
| Setting | Default | What it changes |
|---|---|---|
REHEARSAL_SESSION_SECRET | a development value | Signs browser sessions. Set a long random value on any server that others can reach. |
REHEARSAL_SIGNUP | open | Any visitor can create an account and an organisation. closed turns that off. |
GOOGLE_CLIENT_ID | A Google OAuth web client id. With it, the console offers "Sign in with Google". | |
REHEARSAL_ADMIN_EMAILS | Operator admins, separated by commas. They see every workspace and can set any plan. Only a sign-in with Google counts. | |
REHEARSAL_PUBLIC_URL | http://localhost:7800 | Where browsers reach the server. Payment pages return here. |
REHEARSAL_DOCS_URL | The documentation site. /docs on the server redirects there; without it, /docs opens the API reference at /api/docs. |
Models
| Setting | Default | What it changes |
|---|---|---|
REHEARSAL_MODEL_COMPILER | Nemotron 3 Super, thinking on, then Ultra | The model chain for the World Compiler's tool-heavy roles: inspecting the source, building the runtime, seeding data, writing tools. |
REHEARSAL_MODEL_REASONER | Nemotron 3 Ultra, thinking on, then Super | The model chain for the World Compiler's hardest roles: designing jobs, judging failed validations, and repairing a runtime that will not start. |
REHEARSAL_MODEL_AGENT | Nemotron 3 Super, thinking on, then Ultra | The model chain for agents that have no model of their own. |
REHEARSAL_MODEL_PARTICIPANT | Nemotron 3 Nano, thinking off, then Super | The model chain that plays the simulated customer. |
REHEARSAL_MODEL_IMPROVER | the reasoner's chain | The 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_FILE | pricing.yaml | A 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 has no key. An empty setting means the default. An entry may end in #think or
#nothink to switch a reasoning model's thinking on or off for that entry only; NVIDIA Nemotron models read it.
REHEARSAL_MODEL_PARTICIPANT=nebius:nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B#nothink,groq:openai/gpt-oss-20bProviders
A provider works when its key is set. Every provider is reached through an OpenAI-compatible API. A job starts only when the server knows the price of its models, so that spending limits hold.
| Provider | Key | Address | Prices |
|---|---|---|---|
nebius | NEBIUS_API_KEY | https://api.tokenfactory.nebius.com/v1 | its own price list |
openrouter | OPENROUTER_API_KEY | https://openrouter.ai/api/v1 | its own price list |
groq | GROQ_API_KEY | https://api.groq.com/openai/v1 | this host's price, from OpenRouter's host listing |
google | GOOGLE_API_KEY | https://generativelanguage.googleapis.com/v1beta/openai/ | the vendor's price, as OpenRouter lists it |
openai | OPENAI_API_KEY | https://api.openai.com/v1 | the vendor's price, as OpenRouter lists it |
anthropic | ANTHROPIC_API_KEY | https://api.anthropic.com/v1/ | the vendor's price, as OpenRouter lists it |
mistral | MISTRAL_API_KEY | https://api.mistral.ai/v1 | the vendor's price, as OpenRouter lists it |
xai | XAI_API_KEY | https://api.x.ai/v1 | the vendor's price, as OpenRouter lists it |
deepseek | DEEPSEEK_API_KEY | https://api.deepseek.com/v1 | the vendor's price, as OpenRouter lists it |
together | TOGETHER_API_KEY | https://api.together.xyz/v1 | this host's price, from OpenRouter's host listing |
fireworks | FIREWORKS_API_KEY | https://api.fireworks.ai/inference/v1 | this host's price, from OpenRouter's host listing |
cerebras | CEREBRAS_API_KEY | https://api.cerebras.ai/v1 | this host's price, from OpenRouter's host listing |
nvidia | NVIDIA_API_KEY | https://integrate.api.nvidia.com/v1 | pricing.yaml or REHEARSAL_PRICES |
litellm | LITELLM_API_KEY | LITELLM_BASE_URL | its own price list |
modal | MODAL_PROXY_TOKEN_ID and MODAL_PROXY_TOKEN_SECRET | MODAL_BASE_URL | pricing.yaml or REHEARSAL_PRICES |
local | REHEARSAL_LOCAL_API_KEY | REHEARSAL_LOCAL_BASE_URL | pricing.yaml or REHEARSAL_PRICES |
custom | REHEARSAL_CUSTOM_API_KEY | REHEARSAL_CUSTOM_BASE_URL | pricing.yaml or REHEARSAL_PRICES |
local is for a model server on your own machine, such as vLLM. custom is for any other
OpenAI-compatible address. When a provider's source has no price for a model, add one to pricing.yaml or
REHEARSAL_PRICES. rehearsal prices shows the price the server uses for each configured model.
Web research
| Setting | Default | What it changes |
|---|---|---|
TAVILY_API_KEY | A Tavily key. With it, each world build first researches how real people use the application (its documentation, forums and issue trackers) and bases at least half its jobs on what it finds, citing the pages. Without it, that step is skipped. See Build a practice world. |
Workers and sandboxes
| Setting | Default | What it changes |
|---|---|---|
REHEARSAL_ALLOW_PRIVATE_AGENT_URLS | off | on lets agent profiles name an endpoint on a private network or over plain http. Leave it off on any server others use: workers would call whatever address a profile names. |
REHEARSAL_RUN_PARALLEL | 4 | Into how many parts a run is cut. Each part needs one free worker and one sandbox. |
REHEARSAL_BUILD_PARALLEL | 4 | How many jobs a build writes and validates at once. Each one being validated runs its own copy of the world. |
REHEARSAL_MAX_ACTIVE_BUILDS | 0, no limit | Builds that one project may have in progress. |
REHEARSAL_MAX_ACTIVE_RUNS | 0, no limit | Runs that one project may have in progress. |
REHEARSAL_CONTAINER_MEMORY | 1g | The memory limit of each container in a sandbox. |
REHEARSAL_CONTAINER_CPUS | 1.0 | The processor limit of each container in a sandbox. |
REHEARSAL_CONTAINER_PIDS | 256 | The process limit of each container in a sandbox. |
REHEARSAL_LEASE_SECONDS | 60 | How long a worker's claim on a server job lasts without a renewal. After that, another worker takes the job. |
REHEARSAL_WORKER_CONTAINER | The worker's own container id, when the worker runs in a container. The Compose file sets it. |
Spend and plans
| Setting | Default | What it changes |
|---|---|---|
REHEARSAL_MONTHLY_ALLOWANCE_USD | 0, no limit | A model spend limit for the whole server, for a calendar month. It applies when plans are off. |
REHEARSAL_PLANS | off | on puts every workspace on a plan and enforces its limits. Leave it off on a private server. |
REHEARSAL_QUIET_HOURS_UTC | 18:00-02:00 | When evaluations of the Free plan may start, as HH:MM-HH:MM in UTC. It may cross midnight. |
DODO_PAYMENTS_API_KEY | The payment provider's key. Only with plans on. | |
DODO_PAYMENTS_WEBHOOK_KEY | The secret that signs the payment provider's notifications. | |
DODO_PAYMENTS_ENVIRONMENT | test_mode | test_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. |
Training
| Setting | Default | What it changes |
|---|---|---|
KAGGLE_API_TOKEN | For training, which is not built yet. |
Was this page helpful?