Skip to main content
ODAI requires a minimum of 4GB RAM for local development. Lower memory may cause instability when running the full agent stack.

Prerequisites

Before setting up ODAI locally, make sure you have the following installed and configured:
  • Python 3.11+ (Python 3.13 recommended)
  • Google Cloud SDK (gcloud CLI) — required for accessing Google Secret Manager and deploying
  • Firebase project — for authentication and Firestore data storage
  • API keys for the third-party services you plan to use (see Environment Variables)

Setup

1

Clone the repository

Clone the ODAI backend repository and navigate into it:
git clone <repository-url>
cd odai/backend
2

Create a virtual environment

Create and activate a Python virtual environment:
# Create virtual environment
python -m venv venv

# Activate on macOS/Linux
source venv/bin/activate

# Activate on Windows
venv\Scripts\activate
3

Install dependencies

Install both production and testing dependencies (173 production packages):
pip install -r requirements.txt
pip install -r test_requirements.txt
4

Configure environment variables

Create a .env file in the backend root directory. Setting LOCAL=true tells the application to read secrets from this file instead of Google Secret Manager:
# Core settings
LOCAL=true
PRODUCTION=false

# Firebase credentials (paste the full JSON as a single-line string)
FIREBASE_SERVICE_ACCOUNT_KEY='{...}'

# OpenAI
OPENAI_API_KEY=your_openai_key

# Financial
PLAID_CLIENT_ID=your_plaid_client_id
PLAID_SECRET=your_plaid_secret

# Communication
TWILIO_ACCOUNT_SID=your_twilio_sid
TWILIO_AUTH_TOKEN=your_twilio_token

# Google OAuth (required for Google integrations)
GOOGLE_OAUTH_CLIENT_ID=your_client_id
GOOGLE_OAUTH_CLIENT_SECRET=your_client_secret

# Add other API keys as needed — see Environment Variables for the full list
Never commit your .env file to version control. It contains secrets that should remain local. The .gitignore should already exclude it.
5

Start the development server

Run the FastAPI application with hot reload enabled:
uvicorn api:APP --reload --host 0.0.0.0 --port 8080
The API will be available at http://localhost:8080.The --reload flag watches for file changes and automatically restarts the server, making it convenient during active development.

The LOCAL environment variable

When LOCAL=true is set, config.py loads all settings from the .env file using pydantic-settings:
if local == True:
    model_config = SettingsConfigDict(env_file=".env")
Without this flag (i.e., in deployed environments), the application fetches every secret from Google Secret Manager at startup instead. Always ensure LOCAL=true is present in your .env when developing locally.

Verifying the setup

Once the server is running, check the health endpoint:
curl http://localhost:8080/
You should receive a successful response from the FastAPI root handler.

Next steps

  • Review all available Environment Variables to enable specific integrations
  • Run the test suite to confirm everything is wired up correctly
  • See Deployment when you’re ready to push to a hosted environment

Build docs developers (and LLMs) love