Skip to main content
fleet-rlm reads configuration from environment variables (or a .env file in the working directory). The full template lives at .env.example.

Required: LLM

You can provide LLM credentials either through environment variables (shown below) or through persisted provider profiles managed from Settings or the /api/v1/runtime/llm-profiles API. Profiles store encrypted keys, allow per-role model bindings (planner, delegate, delegate_small), and are the preferred path for any setup with more than one provider.
VariableDescriptionExample
DSPY_LM_MODELPlanner model (LiteLLM format)openai/gpt-4o-mini
DSPY_DELEGATE_LM_MODELDelegate model used by recursive RLMopenai/gpt-4o-mini
DSPY_DELEGATE_LM_SMALL_MODELOptional small-context delegate modelopenai/gpt-4o-mini
DSPY_LLM_API_KEYAPI key for the LLM providersk-...
DSPY_LM_API_BASEOptional custom endpoint (LiteLLM proxy)https://your-litellm/v1
When migrating an existing .env into the profile system, call POST /api/v1/runtime/llm-profiles/import-env once. Fleet creates a profile from the current DSPY_* values and wires up planner / delegate role bindings automatically. See the HTTP API reference for the full surface.

Required: Daytona

VariableDescriptionDefault
DAYTONA_API_KEYDaytona API key
DAYTONA_API_URLDaytona API base URLhttps://app.daytona.io/api
DAYTONA_TARGETDaytona target/regiondefault

App environment

VariableValuesDescription
APP_ENVlocal, staging, productionEnvironment guardrail
AUTH_MODEdev, entraAuth backend
AUTH_REQUIREDtrue, falseEnforce auth on /api/v1/*
DATABASE_REQUIREDtrue, falseRequire Neon/Postgres connectivity
DEV_JWT_SECRETstringHS256 secret for dev tokens
Runtime settings writes (PATCH /api/v1/runtime/settings) are intentionally limited to APP_ENV=local.

Database

VariableDescription
DATABASE_URLPostgreSQL/Neon connection string
When DATABASE_REQUIRED=true, the readiness endpoint reports database: missing if the connection cannot be established.

MLflow tracing

VariableDefaultDescription
MLFLOW_ENABLEDtrueEnable MLflow tracing
MLFLOW_TRACKING_URIhttp://127.0.0.1:5001MLflow server URL
MLFLOW_EXPERIMENTfleet-rlmExperiment name
MLFLOW_AUTO_STARTtrueAuto-start localhost MLflow in APP_ENV=local
To run a local MLflow server explicitly:
make mlflow-server

Recursive RLM

Controls the delegation engine and child sandbox isolation.
VariableDefaultDescription
RLM_CHILD_ISOLATION_MODEautoauto, clean, context (debug only)
RLM_CHILD_FORK_FALLBACKcleanBehavior when fork creation fails
rlm_max_iterationsruntime defaultPer-RLM iteration cap
rlm_max_llm_callsruntime defaultTree-wide semantic call budget
FLEET_RLM_LARGE_CONTEXT_THRESHOLD32000Character threshold at which an auto turn is routed to native RLM instead of ReAct
See Recursive RLM for the full isolation policy. When execution_mode=auto, fleet-rlm estimates the per-turn context size from attached docs, repo paths, and inline content, then compares it against FLEET_RLM_LARGE_CONTEXT_THRESHOLD. Turns above the threshold route to the native RLM path, which handles large inputs as REPL variables instead of inlining them into the planner prompt. Lower this value to delegate long context sooner; raise it to keep more turns on the ReAct path. Fleet-rlm logs a warning and falls back to the default when the value is not a positive integer.

Analytics

VariableDefaultDescription
POSTHOG_ENABLEDfalseEnable PostHog analytics
POSTHOG_HOSThttps://eu.i.posthog.comPostHog host

Quick configurations

Local development

.env
APP_ENV=local
AUTH_MODE=dev
AUTH_REQUIRED=false
DATABASE_REQUIRED=false

DSPY_LM_MODEL=openai/gpt-4o-mini
DSPY_LLM_API_KEY=sk-...
DAYTONA_API_KEY=...

Production

.env.production
APP_ENV=production
AUTH_MODE=entra
AUTH_REQUIRED=true
DATABASE_REQUIRED=true

DSPY_LM_MODEL=openai/gpt-4o
DSPY_LLM_API_KEY=sk-...
DAYTONA_API_KEY=...
DATABASE_URL=postgresql://USER:PASS@HOST/DB?sslmode=require
MLFLOW_TRACKING_URI=https://mlflow.example.com
Never commit a .env file with real secrets. Use your team’s secret-management workflow instead.

See also