Deployment
Environment Variables Complete reference for all thinnestAI environment variables — database, authentication, LLM providers, voice, Redis, and more.
thinnestAI is configured entirely through environment variables. This page is the complete reference.
Copy the example file and edit it:
For Docker deployments, the .env file is loaded automatically. For GCP, use Secret Manager for sensitive values (see GCP Deployment ).
These must be set for thinnestAI to start:
# PostgreSQL connection string
PG_DB_URL = postgresql://user:password@localhost:5432/agno
# Encryption key for sensitive data (must be exactly 32 characters)
ENCRYPTION_KEY = your-32-character-encryption-key
Variable Required Description Example PG_DB_URLYes PostgreSQL connection string postgresql://user:pass@host:5432/agnoDB_POOL_SIZENo Connection pool size (default: 10) 20DB_MAX_OVERFLOWNo Max overflow connections (default: 20) 30DB_POOL_TIMEOUTNo Pool timeout in seconds (default: 30) 60
When using Cloud SQL, the connection string uses a Unix socket:
PG_DB_URL = postgresql://postgres:PASSWORD@/agno? host = /cloudsql/PROJECT:REGION:INSTANCE
Variable Required Description Example AUTH0_DOMAINYes Auth0 tenant domain your-tenant.auth0.comAUTH0_AUDIENCEYes Auth0 API audience identifier https://api.thinnest.aiAUTH0_CLIENT_IDNo Auth0 client ID (for OAuth flows) abc123def456AUTH0_CLIENT_SECRETNo Auth0 client secret secret_value
AUTH0_DOMAIN = your-tenant.auth0.com
AUTH0_AUDIENCE = https://api.thinnest.ai
AUTH0_CLIENT_ID = your_client_id
AUTH0_CLIENT_SECRET = your_client_secret
Configure one or more LLM providers. You only need the providers your agents use.
Variable Required Description Example OPENAI_API_KEYIf using OpenAI OpenAI API key sk-...OPENAI_ORG_IDNo OpenAI organization ID org-...
OPENAI_API_KEY = sk-your-openai-api-key
OPENAI_ORG_ID = org-your-org-id
Variable Required Description Example GOOGLE_API_KEYIf using Gemini Google AI API key AIza...
GOOGLE_API_KEY = AIzaSy-your-google-api-key
Variable Required Description Example ANTHROPIC_API_KEYIf using Claude Anthropic API key sk-ant-...
ANTHROPIC_API_KEY = sk-ant-your-anthropic-key
Variable Required Description Example OPENROUTER_API_KEYIf using OpenRouter OpenRouter API key sk-or-...
OPENROUTER_API_KEY = sk-or-your-openrouter-key
Variable Required Description Example TWILIO_ACCOUNT_SIDIf using voice Twilio account SID AC...TWILIO_AUTH_TOKENIf using voice Twilio auth token token_valueTWILIO_PHONE_NUMBERNo Default Twilio phone number +14155551234
TWILIO_ACCOUNT_SID = ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
TWILIO_AUTH_TOKEN = your_twilio_auth_token
TWILIO_PHONE_NUMBER = +14155551234
Variable Required Description Example VOBIZ_API_URLIf using Vobiz Vobiz API endpoint https://api.vobiz.comVOBIZ_API_KEYIf using Vobiz Vobiz API key key_valueVOBIZ_SIP_DOMAINIf using Vobiz SIP domain sip.vobiz.comVOBIZ_SIP_USERNAMEIf using Vobiz SIP username usernameVOBIZ_SIP_PASSWORDIf using Vobiz SIP password password
VOBIZ_API_URL = https://api.vobiz.com
VOBIZ_API_KEY = your_vobiz_api_key
VOBIZ_SIP_DOMAIN = sip.vobiz.com
VOBIZ_SIP_USERNAME = your_sip_username
VOBIZ_SIP_PASSWORD = your_sip_password
Variable Required Description Example REDIS_URLYes Redis connection URL redis://localhost:6379REDIS_PASSWORDNo Redis password (if auth enabled) password
REDIS_URL = redis://localhost:6379
REDIS_PASSWORD = your_redis_password
Variable Required Description Example SMTP_HOSTIf sending email SMTP server hostname smtp.gmail.comSMTP_PORTIf sending email SMTP port 587SMTP_USERNAMEIf sending email SMTP username noreply@yourdomain.comSMTP_PASSWORDIf sending email SMTP password or app password passwordSMTP_FROM_EMAILIf sending email Sender email address noreply@yourdomain.comSMTP_FROM_NAMENo Sender display name thinnestAI
SMTP_HOST = smtp.gmail.com
SMTP_PORT = 587
SMTP_USERNAME = noreply@yourdomain.com
SMTP_PASSWORD = your_smtp_password
SMTP_FROM_EMAIL = noreply@yourdomain.com
SMTP_FROM_NAME = thinnestAI
Variable Required Description Example ENVIRONMENTNo Deployment environment development, productionDEV_MODENo Enable development features true, falseALLOWED_ORIGINSNo CORS allowed origins (comma-separated) http://localhost:3000,https://app.yourdomain.comLOG_LEVELNo Logging verbosity DEBUG, INFO, WARNING, ERRORPORTNo Server port (default: 8000 dev, 8080 prod) 8000
ENVIRONMENT = production
DEV_MODE = false
ALLOWED_ORIGINS = https://app.yourdomain.com
LOG_LEVEL = INFO
PORT = 8080
Variable Required Description Example ENCRYPTION_KEYYes 32-character key for encrypting sensitive data abcdefghijklmnopqrstuvwxyz123456JWT_SECRETNo JWT signing secret (uses Auth0 by default) secret_value
ENCRYPTION_KEY = abcdefghijklmnopqrstuvwxyz123456
Generate a secure encryption key:
python -c "import secrets; print(secrets.token_urlsafe(24)[:32])"
Variable Required Description Example OTEL_EXPORTER_OTLP_ENDPOINTNo OpenTelemetry collector endpoint http://localhost:4318OTEL_SERVICE_NAMENo Service name for traces thinnestai-backendOTEL_ENABLEDNo Enable OpenTelemetry true
OTEL_EXPORTER_OTLP_ENDPOINT = http://localhost:4318
OTEL_SERVICE_NAME = thinnestai-backend
OTEL_ENABLED = true
These enable Gmail, Google Calendar, and Google Sheets tools for agents.
Variable Required Description Example GOOGLE_OAUTH_CLIENT_IDIf using Google tools Google OAuth client ID xxx.apps.googleusercontent.comGOOGLE_OAUTH_CLIENT_SECRETIf using Google tools Google OAuth client secret GOCSPX-...GOOGLE_OAUTH_REDIRECT_URIIf using Google tools OAuth redirect URI https://api.yourdomain.com/api/oauth/google/callback
GOOGLE_OAUTH_CLIENT_ID = your-client-id.apps.googleusercontent.com
GOOGLE_OAUTH_CLIENT_SECRET = GOCSPX-your-client-secret
GOOGLE_OAUTH_REDIRECT_URI = https://api.yourdomain.com/api/oauth/google/callback
Variable Required Description Example STRIPE_SECRET_KEYIf using payments Stripe secret key sk_live_...STRIPE_WEBHOOK_SECRETIf using payments Stripe webhook signing secret whsec_...WELCOME_TOKENSNo Free tokens for new accounts 1.00
STRIPE_SECRET_KEY = sk_live_your_stripe_key
STRIPE_WEBHOOK_SECRET = whsec_your_webhook_secret
WELCOME_TOKENS = 1.00
Variable Required Description Example GCP_PROJECT_IDIf on GCP GCP project ID my-project-123GCP_REGIONIf on GCP GCP region us-central1CLOUD_SQL_CONNECTION_NAMEIf on GCP Cloud SQL instance connection project:region:instanceGCS_BUCKET_NAMENo Google Cloud Storage bucket thinnestai-uploads
GCP_PROJECT_ID = my-project-123
GCP_REGION = us-central1
CLOUD_SQL_CONNECTION_NAME = my-project-123:us-central1:thinnestai-db
GCS_BUCKET_NAME = thinnestai-uploads
Here's a complete example for local development:
# Database
PG_DB_URL = postgresql://agno:password@localhost:5432/agno
# Redis
REDIS_URL = redis://localhost:6379
# Security
ENCRYPTION_KEY = abcdefghijklmnopqrstuvwxyz123456
# Auth
AUTH0_DOMAIN = your-tenant.auth0.com
AUTH0_AUDIENCE = https://api.thinnest.ai
# LLM Providers (configure at least one)
OPENAI_API_KEY = sk-your-openai-key
GOOGLE_API_KEY = AIzaSy-your-google-key
ANTHROPIC_API_KEY = sk-ant-your-anthropic-key
# Application
ENVIRONMENT = development
DEV_MODE = true
ALLOWED_ORIGINS = http://localhost:3000
LOG_LEVEL = DEBUG
# Email (optional)
SMTP_HOST = smtp.gmail.com
SMTP_PORT = 587
SMTP_USERNAME = noreply@yourdomain.com
SMTP_PASSWORD = your_app_password
SMTP_FROM_EMAIL = noreply@yourdomain.com
# Voice (optional)
TWILIO_ACCOUNT_SID = ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
TWILIO_AUTH_TOKEN = your_twilio_auth_token