Databases
Neon Postgres databases — provisioning, branching, and connection strings.
Every Strayl project gets a Neon Postgres database. Neon is a serverless Postgres provider with branching support — you can create an isolated copy of your database for the AI to experiment with, then merge or discard it.
Automatic provisioning
When you create a project, Strayl provisions a Neon database automatically. You don't need to configure anything — the DATABASE_URL environment variable is available in both the dev environment and your production deployment from day one.
Accessing the database
From your app
Use the DATABASE_URL environment variable:
import { Pool } from 'pg';
const pool = new Pool({
connectionString: process.env.DATABASE_URL,
});From the Manage panel
Go to Manage → Database. You'll see:
- Connection string (click to reveal)
- A query console for running SQL
- Table explorer
- Branch management
Database branches
Neon supports database branches — isolated copies of your database with their own connection string. Branches let the AI agent run schema migrations safely without touching your production data.
Manage branches from Manage → Databases in the web UI.
Migrations
Strayl supports any migration tool. The agent will use whatever you have set up:
- Drizzle ORM —
drizzle-kit pushordrizzle-kit migrate - Prisma —
prisma migrate deploy - Raw SQL — the agent writes SQL files and runs
psql
Backups and storage
Neon provides:
- Continuous point-in-time recovery (PITR) up to 30 days
- Automatic backups
- Storage scales automatically — you pay for what you use
Limits
| Plan | Storage | Compute |
|---|---|---|
| Free | 512 MB | 0.25 vCPU |
| Pro | 10 GB | 2 vCPU |
| Team | Unlimited | 8 vCPU |