Skip to main content

Required

VariableDescription
SECRET_KEYJWT signing key (auto-generated by install script)
ENCRYPTION_KEYFernet key for encrypting stored credentials (LLM API keys, DB passwords)
DATABASE_PASSWORDPostgreSQL password
SMTP_HOSTSMTP server hostname (e.g., smtp.sendgrid.net)
SMTP_PORTSMTP port (typically 587)
SMTP_USERSMTP username
SMTP_PASSWORDSMTP password or API key
SMTP_DOMAINEmail “from” domain (e.g., example.com)
SUPERADMIN_EMAILAdmin user created on first startup
DOMAINYour domain for Caddy auto-HTTPS (e.g., sinas.example.com)

Application

VariableDefaultDescription
DEBUGfalseEnable verbose logging
CORS_ORIGINS(none)Comma-separated allowed origins
ACCESS_TOKEN_EXPIRE_MINUTES15JWT access token lifetime
REFRESH_TOKEN_EXPIRE_DAYS30Refresh token lifetime
OTP_EXPIRE_MINUTES10OTP code validity
OTP_MAX_ATTEMPTS2Wrong OTP guesses before invalidation

Rate Limiting

VariableDefaultDescription
RATE_LIMIT_LOGIN_IP_MAX10Max login requests per IP per window
RATE_LIMIT_LOGIN_EMAIL_MAX5Max login requests per email per window
RATE_LIMIT_OTP_IP_MAX10Max OTP verify requests per IP per window
RATE_LIMIT_WINDOW_SECONDS900Rate limit window (15 minutes)

Function Execution

VariableDefaultDescription
FUNCTION_TIMEOUT300Max execution time in seconds
MAX_FUNCTION_MEMORY512Memory limit in MB
MAX_FUNCTION_CPU1.0CPU cores per function
MAX_FUNCTION_STORAGE1gDisk storage limit
FUNCTION_CONTAINER_IDLE_TIMEOUT3600Idle container cleanup (seconds)
ALLOW_PACKAGE_INSTALLATIONtrueAllow pip install in functions
ALLOWED_PACKAGES(all)Comma-separated package whitelist

Sandbox Containers

VariableDefaultDescription
SANDBOX_MIN_SIZE4Containers to pre-create
SANDBOX_MAX_SIZE20Maximum sandbox containers
SANDBOX_MIN_IDLE2Replenish when idle drops below this
SANDBOX_MAX_EXECUTIONS100Recycle after N executions

Agent Processing

VariableDefaultDescription
MAX_TOOL_ITERATIONS25Max consecutive tool-call rounds per message
MAX_HISTORY_MESSAGES100Messages loaded for conversation context
AGENT_JOB_TIMEOUT600Agent job timeout (seconds)
CODE_EXECUTION_TIMEOUT120Code execution timeout (seconds)

Scaling

VariableDefaultDescription
BACKEND_REPLICAS1Backend API replicas
UVICORN_WORKERS4Workers per backend replica
QUEUE_WORKER_REPLICAS2Function queue worker replicas
QUEUE_AGENT_REPLICAS2Agent queue worker replicas
QUEUE_FUNCTION_CONCURRENCY10Concurrent functions per worker
QUEUE_AGENT_CONCURRENCY5Concurrent agent jobs per worker

Resource Limits (Docker)

VariableDefaultDescription
APP_CPU_LIMIT2.0Max CPU cores for backend container
APP_MEMORY_LIMIT2GMax RAM for backend container
APP_CPU_RESERVATION0.5Guaranteed CPU cores
APP_MEMORY_RESERVATION512MGuaranteed RAM

Database

VariableDefaultDescription
DATABASE_USERpostgresPostgreSQL user
DATABASE_HOSTpostgresPostgreSQL host
DATABASE_PORT5432PostgreSQL port
DATABASE_NAMEsinasDatabase name
DATABASE_URL(built from above)Full connection string (overrides individual vars)
REDIS_URLredis://redis:6379/0Redis connection string

ClickHouse (Optional)

VariableDefaultDescription
CLICKHOUSE_HOSTclickhouseClickHouse host
CLICKHOUSE_PORT8123ClickHouse HTTP port
CLICKHOUSE_USERdefaultClickHouse user
CLICKHOUSE_PASSWORD(empty)ClickHouse password
CLICKHOUSE_DATABASEsinasClickHouse database
CLICKHOUSE_RETENTION_DAYS90Data retention (no S3)
CLICKHOUSE_HOT_RETENTION_DAYS30Hot retention (with S3)
CLICKHOUSE_S3_ENDPOINT(none)S3 endpoint for tiered storage
CLICKHOUSE_S3_BUCKET(none)S3 bucket name
CLICKHOUSE_S3_ACCESS_KEY_ID(none)S3 access key
CLICKHOUSE_S3_SECRET_ACCESS_KEY(none)S3 secret key
CLICKHOUSE_S3_REGIONus-east-1S3 region

Declarative Config

VariableDefaultDescription
CONFIG_FILE(none)Path to YAML config file
AUTO_APPLY_CONFIGfalseApply config file on startup
The simplest useful setup requires the required variables plus a configured LLM provider. Everything else (functions, skills, state, etc.) is optional and can be added incrementally.