Skip to main content
Never commit secrets or API keys to version control. For local development, store all secrets in a .env file that is excluded from git. For production, use Google Secret Manager exclusively.

How secrets are loaded

ODAI uses two different secret sources depending on the runtime environment, controlled by the LOCAL flag in config.py: Local development — when LOCAL=true, settings are loaded from a .env file in the project root via pydantic-settings:
model_config = SettingsConfigDict(env_file=".env")
Production / deployed — when LOCAL is unset or false, each secret is fetched individually from Google Secret Manager at startup using the project ID (odai-dev-5e4fd for development, odai-prod for production). The Secret Manager secret IDs match the variable names exactly (e.g., openai_api_key, plaid_client_id).

Core settings

VariableTypeDescription
LOCALboolSet to true to load secrets from .env instead of Secret Manager. Always true for local development.
PRODUCTIONboolSet to true in the production environment. Enables strict auth, switches the project ID to odai-prod, and uses the production KMS key ring.
OPENAI_API_KEYstringOpenAI API key. Used by the orchestrator and all agent interactions (model: gpt-4o).
FIREBASE_SERVICE_ACCOUNT_KEYstringFull Firebase service account JSON, provided as a single-line string. Required for Firestore access and Firebase authentication.
GOOGLE_CLOUD_PROJECTstringOverrides the Google Cloud project ID. Defaults to odai-dev when not in production.

Financial

VariableTypeDescription
PLAID_CLIENT_IDstringPlaid client ID for bank account integration (balances, transactions).
PLAID_SECRETstringPlaid secret key. Uses sandbox in development, production credentials in prod.
FINNHUB_API_KEYstringFinnhub API key for stock market data and financial news.
COINMARKETCAP_API_KEYstringCoinMarketCap API key for cryptocurrency prices and market data.
ALPACA_API_KEYstringAlpaca API key for trading operations.
ALPACA_SECRET_KEYstringAlpaca secret key paired with ALPACA_API_KEY.
EXCHANGERATE_API_KEYstringExchangeRate API key for currency conversion.
CANOPY_API_KEYstringCanopy API key (financial data).

Travel

VariableTypeDescription
FLIGHTAWARE_API_KEYstringFlightAware API key for real-time flight tracking and status.
AMADEUS_CLIENT_KEYstringAmadeus client key for flight search and travel planning.
AMADEUS_CLIENT_SECRETstringAmadeus client secret paired with AMADEUS_CLIENT_KEY.
AVIATIONSTACK_API_KEYstringAviationStack API key for additional flight data.
CALTRAIN_API_KEYstringCaltrain API key for California commuter rail status.

Communication

VariableTypeDescription
TWILIO_ACCOUNT_SIDstringTwilio account SID for voice and SMS capabilities.
TWILIO_AUTH_TOKENstringTwilio auth token paired with TWILIO_ACCOUNT_SID.

Search & content

VariableTypeDescription
SERPAPI_API_KEYstringSerpAPI key for Google Search and Google News results.
WEATHERAPI_API_KEYstringWeatherAPI key for current conditions and multi-day forecasts.
ACCUWEATHER_API_KEYstringAccuWeather API key for detailed forecasts and weather alerts.
EASYPOST_API_KEYstringEasyPost API key for package tracking across carriers.
CLOUDFLARE_API_KEYstringCloudflare API key for site rendering and content fetching.
CLOUDFLARE_ACCOUNT_IDstringCloudflare account ID paired with CLOUDFLARE_API_KEY.

Entertainment & local

VariableTypeDescription
TICKETMASTER_CONSUMER_KEYstringTicketmaster consumer key for event tickets and venue information.
TICKETMASTER_CONSUMER_SECRETstringTicketmaster consumer secret paired with TICKETMASTER_CONSUMER_KEY.
MOVIEGLU_API_KEYstringMovieGlu API key for movie showtimes and theater information.
MOVIEGLU_API_AUTHORIZATIONstringMovieGlu authorization token paired with MOVIEGLU_API_KEY.
TRIPADVISOR_API_KEYstringTripAdvisor API key for travel reviews and recommendations.
YELP_API_KEYstringYelp Fusion API key for restaurant and business search.

Internal & monitoring

VariableTypeDescription
SEGMENT_KEYstringSegment write key for user behavior analytics and tracking.
SENTRY_DSNstringSentry DSN for error monitoring and alerting.

Minimal .env for local development

The following variables are required to start the server. All others are optional and only needed if you want to use a specific integration:
LOCAL=true
FIREBASE_SERVICE_ACCOUNT_KEY='{...}'
OPENAI_API_KEY=sk-...
Any variable left blank or omitted will default to an empty string. Agents that depend on a missing key will fail gracefully when invoked, but will not prevent the server from starting.

Build docs developers (and LLMs) love