A Postgres database the moment you connect.
Choose a name and a password and connect. If nobody has the name yet, that first connection creates the database and you are already logged in to it, about a second later. No sign-up, no console and no API call, which suits agents that need a fresh database for each task.
Get started
-
Pick a name and a password, and connect
The name becomes your database's hostname. Use lowercase letters, digits and hyphens, up to 63 of them. The user has to be
postgres, and the password you give becomes its password.# the first connection to a new name creates the database psql "postgres://postgres:choose-a-password@my-first-db.agentic-pg.labs.ubicloud.app/postgres?sslmode=require" NOTICE: Created database my-first-db. It pauses after 1 minute without a connection and resumes on the next one. It is deleted once it has been paused for 10 minutes. postgres=#
-
Connect again whenever you like
Later connections with the same name and password reach the same database. If it paused in the meantime, connecting wakes it up, which takes a second or two. A different password for a name that is already taken is refused, like any wrong password.
-
Give one to an agent
Anything that speaks Postgres over TLS with SNI works: psql, libpq 14 or later, psycopg, node-postgres, pgx, the Ruby pg gem. A random name and password give every run its own database:
export DATABASE_URL="postgres://postgres:$(openssl rand -hex 16)@task-$(openssl rand -hex 4).agentic-pg.labs.ubicloud.app/postgres?sslmode=require" psql "$DATABASE_URL" -c "create table notes (id serial primary key, body text)"
Put a different name after the last slash and the database is created with that name too:
…/shop?sslmode=require. Database names are lowercase letters, digits and
underscores.
Check on your database
Enter the name and the password you created it with. You'll see whether it is running, when it will pause or be deleted, and, while it runs, what PostgreSQL reports about it. Looking does not wake a paused database up.
How it works
Created by connecting
A gateway reads the name from the TLS handshake. For a name nobody has taken, it asks the control plane for a new database with your password, logs you in to it, and hands the session over.
Restored, not booted
Each database is a small virtual machine restored from a snapshot of PostgreSQL that has already started. A pool of them waits ready, so creating one takes a fraction of a second.
Pauses when idle
With nothing connected for a minute, the database pauses and its memory is freed. Its data stays on its own volume, and the next connection resumes it.
Deleted when left paused
A database left paused for 10 minutes is deleted, data and all. Every database is also deleted 3 days after it was created.
What you get, and the limits
- PostgreSQL 18, as the
postgressuperuser, with 384 MiB of memory, half a CPU and 2 GiB of storage. - Each address can create 5 databases a day.
- Connections must use TLS (
sslmode=requireor stronger) and send SNI, which is how the gateway finds your database. - The password is the one the first connection gave. Change it with
ALTER ROLEand new connections need the new one, but the lookup above still expects the original. - There are no backups. When a database is deleted, its data is gone.
From code, without psql
The same databases can be created over HTTP. The response holds a connection string and a token, which is shown only once and is what lets you manage the database later:
curl -X POST https://agentic-pg.labs.ubicloud.app/postgres-ember curl -H "Authorization: Bearer $TOKEN" https://agentic-pg.labs.ubicloud.app/postgres-ember/$ID curl -X DELETE -H "Authorization: Bearer $TOKEN" https://agentic-pg.labs.ubicloud.app/postgres-ember/$ID