Skip to main content
PraisonAI supports cloud-native serverless databases that automatically scale to zero when idle, reducing costs for bursty AI agent workloads.
The user connects a serverless database URL; PraisonAI detects the provider and uses scale-to-zero persistence for bursty agent workloads.

Supported URL Schemes

PraisonAIDB._detect_backend recognises these schemes: Hostname heuristics also detect Qdrant and Weaviate URLs.
PR #2122: Passing a URL whose scheme cannot be inferred now raises ValueError instead of falling back to SQLite:Unable to infer DB backend from URL '...'; supported schemes: postgres://, mysql://, sqlite://, redis://, libsql://, http(s)://Set the URL explicitly, e.g. sqlite:///mydata.db.

Quick Start

1

Choose Provider

Pick your preferred cloud database provider and get credentials:
2

Start Conversation

Your agent automatically gets persistent memory across sessions:

Supported Providers

PostgreSQL Compatible

Neon, Supabase, CockroachDB, Xata use standard PostgreSQL drivers

Edge-First

Turso provides SQLite replicas at the edge for microsecond reads

How It Works

Serverless-Resilient Features

All cloud providers get these features automatically:

Installation


Common Patterns

Environment-Based Configuration

Multi-Provider Setup

Session Resume Pattern


Best Practices

  • Neon: Best for traditional PostgreSQL workloads with auto-scaling
  • Supabase: Great for rapid prototyping with built-in auth and REST API
  • Turso: Perfect for edge deployment and global distribution
  • CockroachDB: Ideal for distributed, multi-region applications
  • Xata: Excellent for full-text search and analytics use cases
Set appropriate retry and timeout settings for serverless databases:
Design your agent interactions to be stateless between sessions:
Most providers offer usage dashboards. Set up alerts for:
  • Connection timeout increases (indicates cold starts)
  • Query latency spikes
  • Storage or bandwidth limits approaching

Local Databases

SQLite, PostgreSQL, MySQL for local development

Vector Databases

Qdrant, Pinecone, Weaviate for RAG and knowledge storage