Skip to main content
Supabase provides PostgreSQL with a built-in REST API, authentication, and real-time features, perfect for rapid AI agent development.
The user stores facts; Supabase-backed db config persists memory across sessions.

How It Works

Quick Start

1

Choose Connection Mode

Supabase offers two connection methods:
2

Set Environment Variables

3

Test Conversation


Installation


Connection Modes

REST API Mode

Uses Supabase’s REST API with automatic schema generation:
Required Tables (auto-created):

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

  • REST API: Best for rapid prototyping, automatic pausing recovery, built-in auth
  • Direct PostgreSQL: Better performance, lower latency, standard SQL features
Free tier projects pause after 1 week. Design for graceful wake-up:
Service role keys bypass Row Level Security. Use them only for admin operations:
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
Set up usage alerts in the Supabase dashboard.

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:

Cloud Databases Overview

Compare all cloud database providers

Real-time Features

Build real-time AI applications