Skip to content

Configuration

All configuration is done via environment variables (or CLI flags where noted). No config file is required for basic usage.

LLM Provider

VariableDefaultDescription
RECURSIVE_API_BASEhttps://api.openai.com/v1Chat-completions endpoint
RECURSIVE_API_KEY(required)Bearer token
RECURSIVE_MODELgpt-4o-miniModel name
RECURSIVE_PROVIDER_TYPEopenaiProtocol adapter: openai or anthropic
RECURSIVE_MAX_STEPS32Max tool-call loop iterations per run
RECURSIVE_TEMPERATURE0.2Sampling temperature
RECURSIVE_SYSTEM_PROMPT_FILE(built-in)Path to a custom system-prompt file
RECURSIVE_WORKSPACEcwdFilesystem sandbox root

HTTP Server

VariableDefaultDescription
RECURSIVE_HTTP_ADDR0.0.0.0:3000Bind address
RECURSIVE_HTTP_AUTH_KEYS(none — open)Comma-separated X-API-Key allowlist

Cloud Storage — Redis

Requires the cloud-runtime feature flag (--features cloud-runtime).

VariableDefaultDescription
RECURSIVE_REDIS_URL(disabled)Redis connection URL, e.g. redis://host:6379
RECURSIVE_REDIS_KEY_PREFIXrecursive:Key namespace prefix
RECURSIVE_REDIS_SESSION_TTL_SECS7200Session expiry (2 h)

Cloud Storage — S3

Requires the cloud-runtime feature flag.

VariableDefaultDescription
RECURSIVE_S3_BUCKET(disabled)S3 bucket name
RECURSIVE_S3_PREFIXrecursiveObject key prefix
RECURSIVE_S3_TENANT_IDdefaultTenant namespace inside the bucket
AWS_ACCESS_KEY_ID(from SDK)AWS credential
AWS_SECRET_ACCESS_KEY(from SDK)AWS credential
AWS_DEFAULT_REGIONus-east-1AWS region
AWS_ENDPOINT_URL(AWS)Override for LocalStack / MinIO

Sandbox

VariableDefaultDescription
RECURSIVE_SANDBOX_MODElocallocal / policy / docker / e2b
RECURSIVE_E2B_API_KEY(required for e2b)E2B API key
RECURSIVE_E2B_TEMPLATEbaseE2B sandbox template ID
RECURSIVE_E2B_TIMEOUT_SECS300Sandbox timeout in seconds
RECURSIVE_SHELL_TIMEOUT_SECS30Per-command shell timeout

Configuration file

You can also use a TOML configuration file. By default Recursive looks for ~/.recursive/config.toml and the current directory's providers.toml.

toml
# providers.toml — example
[default]
api_base = "https://api.openai.com/v1"
api_key  = "sk-..."
model    = "gpt-4o-mini"

[deepseek]
api_base = "https://api.deepseek.com/v1"
api_key  = "sk-..."
model    = "deepseek-coder"

Select a named profile with --provider deepseek (CLI) or RECURSIVE_PROVIDER=deepseek.

Released under the MIT License.