Postgres but for agents_
Create, manage, and query serverless PostgreSQL databases from your terminal. Branching, migrations, observability, type generation — all built in.
$ curl -fsSL https://db9.ai/install | sh
macOS / Linux (x86_64, arm64)
Read https://db9.ai/skill.md and follow the instructions
Your agent learns to install, auth, and use db9 autonomously
// Create a database with vector support $ db9 db create --name rag-app Database created: abc123 // Upload docs to cloud filesystem (for RAG) $ db9 fs cp ./docs/ abc123:/knowledge/ Uploaded 42 files to /knowledge/ // Create embeddings table with pgvector $ db9 db sql abc123 -q "CREATE TABLE docs ( id serial PRIMARY KEY, content text, embedding vector(1536), metadata jsonb)" CREATE TABLE // Semantic search with cosine similarity $ db9 db sql abc123 -q "SELECT content, 1 - (embedding <=> $1) AS score FROM docs ORDER BY embedding <=> $1 LIMIT 3" content score ──────────────────────────────────── ───── Authentication uses JWT tokens... 0.94 API rate limits are per-customer... 0.87 Webhooks require HTTPS endpoints... 0.82 (3 rows)
Everything you need
From database creation to production monitoring, db9 covers the full lifecycle.
Spin up a serverless Postgres instance in seconds. No provisioning, no config files.
pgvector built-in with HNSW indexes. Semantic search, RAG, and embeddings — no external vector DB needed.
Execute queries inline, from files, or pipe from stdin. Output as table, JSON, or CSV.
Create schema branches for testing and development. Isolated environments in one command.
Inspect QPS, latency, slow queries, and connection metrics without external tools.
Create, apply, and track SQL migrations. Integrated status tracking per database.
Generate TypeScript or Python types from your database schema automatically.
Store and query semi-structured data with lightning-fast GIN indexes. Perfect for agent memory and tool outputs.
Export schemas and data as SQL. Seed databases from files for reproducible environments.
Read, write, and manage files per database via the SDK or interactive shell. Built for RAG pipelines.
30+ commands
A comprehensive toolkit for every database operation.
db9 db create --name myappCreate a serverless Postgres databasedb9 db sql <id> -q "..."Execute SQL queries directlydb9 db branch create <id> --name devBranch a database for dev/testdb9 db inspect <id>View QPS, latency, and metricsdb9 gen types <id> --lang typescriptGenerate TS/Python types from schemadb9 migration up <id>Apply pending migrationsdb9 db dump <id> -o backup.sqlExport database as SQLdb9 db connect <id>Get connection string for psqldb9 fs sh <id>Interactive filesystem shelldb9 fs cp local.txt <id>:/data/Upload files to cloud filesystemStart building in seconds
One command to install. One command to create a database. Zero config.
$ curl -fsSL https://db9.ai/install | sh