Overview
Genesis runs natively on Databricks without requiring external infrastructure. The deployment uses three Databricks-native components:| Component | Purpose |
|---|---|
| Databricks App | Serves the web UI and handles real-time WebSocket connections |
| Compute Cluster | Runs the Genesis backend server in a custom Docker container |
| Lakebase PostgreSQL | Provides real-time message queuing between components |
Architecture Diagram

- Browser connects to Databricks App via WebSocket
- Databricks App sends notifications to Lakebase PostgreSQL
- PostgreSQL Worker (in compute cluster) listens for database notifications
- Worker forwards messages to Genesis Backend for processing
Prerequisites
Before you begin, ensure you have:- Databricks Workspace with access to Databricks Apps, Compute clusters with custom container support, and Lakebase PostgreSQL.
- Databricks CLI installed and configured.
- Docker for building the Genesis container image.
- LLM Access via Databricks Model Serving endpoints or OpenAI.
Step 1: Set Up Lakebase PostgreSQL
Lakebase is Databricks’ managed PostgreSQL service that provides real-time messaging between components.1.1 Create a Lakebase PostgreSQL Instance
1
Navigate to Lakebase
In your Databricks workspace, go to Catalog → External Locations → Lakebase.
2
Create Instance
Click Create Lakebase Instance and configure:
- Name:
genesis-db - Size: Small (sufficient for most deployments)
3
Note Connection Details
Record the connection information:
- Host:
instance-xxxxx.database.cloud.databricks.com - Port:
5432 - Default database:
postgres
1.2 Create the Genesis Database and Schema
Connect to your Lakebase instance and run the provided SQL scripts:The schema script creates:
- Message queue tables (
app_requests,app_responses) - WebSocket connection tracking (
websocket_connections,websocket_messages) - Real-time NOTIFY/LISTEN triggers for instant message delivery
- Indexes for optimal performance
Step 2: Build and Push the Genesis Container
The Genesis backend runs in a custom Docker container on Databricks Compute.2.1 Build the Docker Image
From the Genesis repository root:2.2 Push to Container Registry
Push the image to a registry accessible by Databricks (Docker Hub, Azure ACR, AWS ECR, or Databricks Container Registry):Step 3: Create the Databricks Compute Cluster
3.1 Create Cluster with Custom Container
1
Navigate to Compute
In your Databricks workspace, go to Compute and click Create Cluster.
2
Configure Cluster Settings
| Setting | Value |
|---|---|
| Cluster name | genesis-backend-cluster |
| Cluster mode | Single Node |
| Databricks Runtime | Runtime with custom container |
| Docker image URL | your-registry/genesis-databricks:latest |
| Node type | At least 4 cores, 16GB RAM recommended |
3.2 Set Environment Variables
In the cluster’s Advanced Options → Spark → Environment Variables, add:- PostgreSQL Connection
- Databricks Model Serving
- OpenAI
3.3 Configure Init Script
The init script starts both the Genesis backend server and the PostgreSQL worker on cluster startup.1
Upload Init Script
bash databricks workspace import \ genesis_bots/apps/genesis_server/deployments/databricks/cluster/databricks_init.sh \ /Workspace/Users/your-email/databricks_init.sh 2
Add to Cluster Configuration
In Advanced Options → Init Scripts, add the path:
/Workspace/Users/your-email/databricks_init.sh3.4 Start the Cluster
Click Create Cluster and wait for it to start. The init script will automatically launch Genesis.Step 4: Deploy the Databricks App
The Databricks App serves the frontend UI and proxies requests to the backend.4.1 Deploy the App
From the Genesis repository root, run the provided deployment script:4.2 Get the App URL
The app will be available at a URL like:
https://genesis-app-xxxxx.cloud.databricksapps.comStep 5: Verify the Deployment
5.1 Check Component Status
Databricks App
Databricks App
bash databricks apps get genesis-app databricks apps logs genesis-app Compute Cluster
Compute Cluster
In a Databricks notebook attached to the cluster:
bash %sh ps aux | grep -E "genesis|postgres_worker" Genesis Health
Genesis Health
bash curl [https://genesis-app-xxxxx.cloud.databricksapps.com/api/health](https://genesis-app-xxxxx.cloud.databricksapps.com/api/health) 5.2 Check Database Connectivity
Run in SQL editor connected to Lakebase:5.3 Access the UI
Open your browser and navigate to your Genesis app URL. You should see the Genesis dashboard.Next Steps
After successful deployment:Configure LLM Settings
Access Genesis settings to configure your preferred LLM provider
Add Data Connections
Connect Genesis to your Databricks data sources (Unity Catalog, Delta tables)
Create Agents
Start building AI agents for your data workflows
Set Up Authentication
Configure SSO or other authentication methods if needed
Updating Genesis
To update your Genesis deployment:1
Build New Container Image
Build a new container image with the latest code.
2
Push to Registry
Push the updated image to your container registry.
3
Restart Compute Cluster
Restart the compute cluster to pull the new image.
4
Redeploy App (if needed)
If frontend changes are included:
bash databricks apps deploy genesis-app --source-code-path "$WORKSPACE_PATH" 
