GAIA uses Pydantic settings to load environment variables with validation. Settings are defined in apps/api/app/config/settings.py with two modes:
Development: Most keys optional, missing ones just disable features
Production: All integration keys required for full functionality
Variables are lazily loaded—the app starts even with missing keys.
Automated Setup: The GAIA CLI automatically discovers required environment variables from your codebase using Python AST parsing (for API) and source analysis (for Web). Run gaia init to skip manual configuration.
DISCORD_OAUTH_CLIENT_ID and SLACK_OAUTH_CLIENT_ID are optional — without them, users must link their accounts using the /auth bot command instead of the web UI. See Discord Bot and Slack Bot for setup instructions.
# EnvironmentENV=developmentHOST=http://localhost:8000FRONTEND_URL=http://localhost:3000# Databases (Docker defaults)MONGO_DB=mongodb://mongo:27017/gaiaREDIS_URL=redis://redis:6379POSTGRES_URL=postgresql://postgres:postgres@postgres:5432/langgraphCHROMADB_HOST=chromadbCHROMADB_PORT=8000RABBITMQ_URL=amqp://guest:guest@rabbitmq:5672/# Auth (required)WORKOS_API_KEY=sk_test_xxxxWORKOS_CLIENT_ID=client_xxxxWORKOS_COOKIE_PASSWORD=your-32-character-random-secret# Google OAuth (optional in dev)GOOGLE_CLIENT_ID=xxxx.apps.googleusercontent.comGOOGLE_CLIENT_SECRET=GOCSPX-xxxx# AI (add what you need)OPENAI_API_KEY=sk-xxxxGOOGLE_API_KEY=AIza-xxxx# Search & ToolsTAVILY_API_KEY=tvly-xxxxFIRECRAWL_API_KEY=fc-xxxx# MediaCLOUDINARY_CLOUD_NAME=your-cloudCLOUDINARY_API_KEY=xxxxCLOUDINARY_API_SECRET=xxxx# MemoryMEM0_API_KEY=m0xxxxMEM0_ORG_ID=org-xxxxMEM0_PROJECT_ID=proj-xxxx# MonitoringSENTRY_DSN=https://xxxx@sentry.io/xxxxPOSTHOG_API_KEY=phc_xxxx