How It Works
Quick Start
1
Choose Connection Mode
Supabase offers two connection methods:
- REST API (Recommended)
- Direct PostgreSQL
2
Set Environment Variables
3
Test Conversation
Installation
- REST API Mode
- Direct PostgreSQL Mode
Connection Modes
REST API Mode
Uses Supabase’s REST API with automatic schema generation:Direct PostgreSQL Mode
Uses standard PostgreSQL connection through Supabase’s pooler:Configuration Options
Usage Patterns
Environment-Based Setup
Manual REST Configuration
Full Lifecycle Example
Supabase-Specific Features
Paused Project Recovery
Free tier projects auto-pause after 1 week of inactivity. PraisonAI handles wake-up automatically:Row Level Security (RLS)
Enable RLS in Supabase for multi-tenant agents:Real-time Subscriptions
Listen to conversation changes in real-time:Best Practices
Choose the Right Mode
Choose the Right Mode
- REST API: Best for rapid prototyping, automatic pausing recovery, built-in auth
- Direct PostgreSQL: Better performance, lower latency, standard SQL features
Handle Project Pausing
Handle Project Pausing
Free tier projects pause after 1 week. Design for graceful wake-up:
Use Service Role Keys Carefully
Use Service Role Keys Carefully
Service role keys bypass Row Level Security. Use them only for admin operations:
Monitor Usage
Monitor Usage
Track your Supabase usage:
- Database size: Conversation history grows over time
- API requests: REST calls count toward monthly limits
- Bandwidth: File uploads/downloads if using storage
Environment Variables
Troubleshooting
Project Paused Error
If you get “project is paused” errors:API Key Permissions
Ensure your API key has the right permissions:SSL Connection Issues
For direct PostgreSQL mode, ensure SSL:Related
Cloud Databases Overview
Compare all cloud database providers
Real-time Features
Build real-time AI applications

