Quick Start
Supported Providers
| Provider | Backend | Protocol | Auto-Scale | Edge Replicas | Free Tier |
|---|---|---|---|---|---|
| Neon | PostgreSQL | postgresql:// | ✅ | ❌ | 0.5GB |
| Supabase | PostgreSQL + REST | postgresql:// or https:// | ✅ | ❌ | 500MB |
| Turso | libSQL/SQLite | libsql:// | ✅ | ✅ | 9GB |
| CockroachDB | PostgreSQL | postgresql:// | ✅ | ❌ | 5GB |
| Xata | PostgreSQL | postgresql:// | ✅ | ❌ | 15GB |
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:| Feature | Description | Benefit |
|---|---|---|
| SSL Enforcement | sslmode=require added automatically | Security compliance |
| Cold-Start Retry | 3 retries with exponential backoff | Handles database wake-up |
| Extended Timeout | 30s connect timeout (vs 5s default) | Accommodates scale-up delay |
| Connection Recovery | Broken connections discarded and replaced | Resilient to network issues |
Installation
- All Providers
- Individual Providers
Common Patterns
Environment-Based Configuration
Multi-Provider Setup
Session Resume Pattern
Best Practices
Choose the Right Provider
Choose the Right Provider
- 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
Handle Cold Starts
Handle Cold Starts
Set appropriate retry and timeout settings for serverless databases:
Optimize for Scale-to-Zero
Optimize for Scale-to-Zero
Design your agent interactions to be stateless between sessions:
Monitor Database Usage
Monitor Database Usage
Most providers offer usage dashboards. Set up alerts for:
- Connection timeout increases (indicates cold starts)
- Query latency spikes
- Storage or bandwidth limits approaching
Related
Local Databases
SQLite, PostgreSQL, MySQL for local development
Vector Databases
Qdrant, Pinecone, Weaviate for RAG and knowledge storage

