Postgres for everything before production.

Give every PR, CI run, and AI agent an isolated, disposable database
with production-like data. Keep production where it is.

Trusted by top software teams

A database for every run

Connect production once. Agents, CI and pull requests branch from it on demand.

pgrun branches — production
i
Live simulation of pgrun creating and deleting Postgres branches from production, the way agents and CI would.
<>
production live
Claude Code v2.1.302 Opus 5.5 · Claude Max ~/app
pgrun connected source: production 2 branches

Keep production where it is.

We never host your production database. Data is masked before it's copied.

Amazon RDS Amazon Aurora Google Cloud SQL Supabase Neon Self-hosted

Stop sharing a staging database.

Twenty agents on one staging database means colliding migrations, tests that step on each other and state nobody can trust. Give every agent its own Postgres instead.

Shared staging

Every agent writes into the same database.

Claude Code    ─┐
Codex          ─┼→ staging
GitHub Actions ─┘
  • Migrations collide.
  • Tests share state.
  • Cleanup becomes another job.

pgrun

Every agent gets a branch of its own.

Claude Code → claude/fix-auth-flow ready · 2.4s
Codex → codex/checkout-tests ready · 2.8s
GitHub Actions → gha/ci-run-812 ready · 3.1s
  • No collisions.
  • No shared state.
  • Delete everything when the work is done.
Safe Copy

Your agents never touch production.

Connect production once. pgrun creates isolated, disposable branches for agents, CI and pull requests.

  • Credentials stay put Production credentials never reach the agent.
  • Data gets masked Sensitive columns can be detected and masked before they reach a branch.
  • Branches are throwaway Every branch is isolated, and deleting it costs nothing.
Production Postgres stays where it is
pgrun copies and masks
Agent branch isolated · disposable
Agent → Production

What happens on every run

Each agent, PR or CI job triggers the same loop — automatically.

  1. 01 PR opened by an agent
  2. 02 Branch from the Safe Copy
  3. 03 Migrate schema applied
  4. 04 Test suite runs
  5. 05 Verify checks pass
  6. 06 Merge into main
  7. 07 Clean up branch deleted
$ pgrun branch exec app --create pr-428 --ttl 1h --delete-after -- bin/ci
PR #428 opened by Codex codex/pr-428
branch pr-428 created from Safe Copy ready 2.6s
migrate 3 migrations applied ok 1.2s
test 412 passed, 0 failed ok 41s
verify all checks pass ok
merge pr-428 into main merged
cleanup branch pr-428 deleted 0 left
01

Connect

Connect your existing Postgres — production stays put.

02

Branch

Spin up an isolated Postgres branch in seconds.

03

Run

Get a normal DATABASE_URL. No custom API.

04

Destroy

Delete it when the job's done. No cleanup.

05

Built for agents

CLI, API, and structured output for agents.

It's just Postgres.

Every branch hands back an ordinary connection string. Nothing in your app has to know.

A normal DATABASE_URL

Your app reads the same variable it always has — the branch is just another Postgres.

env DATABASE_URL=postgresql://agent:x8Kq2vLm@br-7f3a9c.us.db.pgrun.dev:5432/postgres?sslmode=require
custom database API proprietary query language special ORM
Clients

Speaks to everything you use

Frameworks and clients connect as they always have: a Postgres URL, nothing else.

Rails ENV["DATABASE_URL"]
Django DATABASES["default"]
Prisma url = env("DATABASE_URL")
Drizzle drizzle(DATABASE_URL)
psql psql "$DATABASE_URL"
Any Postgres client libpq · wire protocol
Agents & CI

Create the branches

Agents and pipelines drive pgrun through the CLI, the MCP server or the Claude Code skill.

Claude Code pgrun skill install
Codex branch create --format=json
Cursor pgrun mcp serve
GitHub Actions branch exec --create ci-$RUN
GitLab CI branch exec --delete-after
Any MCP client pgrun mcp serve · stdio

Where a branch fits

The same loop — create, run, delete — wherever something needs a database of its own.

Pull requests & CI

Every job branches from the Safe Copy, runs migrations and tests on real data, and deletes the branch when it exits — pass or fail.

branch exec --create ci-$RUN --delete-after -- bin/rails db:migrate Read the docs

Coding agents

Claude Code, Codex or Cursor open a branch, try the change, and throw it away. Through the CLI, the MCP server or the Claude Code skill.

pgrun skill install · pgrun mcp serve Read the docs

Preview deployments

Each preview gets its own Postgres with production-shaped data, named after the deploy and gone when the deploy is. Same recipe as CI.

branch exec --create preview-$SHA --ttl 24h -- … Read the docs

Why pgrun

Agents need a real database to try things on. It shouldn't be shared staging, a dump on someone's laptop, or a reason to move your production somewhere new.

01

Your database stays where it is.

Connect RDS, Aurora, Cloud SQL, Supabase, Neon or your own server. Nothing to migrate, and no new host to trust with production.

instead ofmoving to a new Postgres host

02

Real data, with the secrets taken out.

pgrun reads production once to build a Safe Copy, masking sensitive columns under a policy a person approves. Agents only ever see the copy.

instead ofpg_dump onto laptops

03

A branch in seconds, at any size.

Branches are copy-on-write clones of the Safe Copy, ready in about 3 seconds whatever the size of your data.

instead ofrestoring a dump for every run

04

One per agent, all at once.

Every agent, pull request and CI job gets its own isolated Postgres in parallel. Nobody waits, and no one's migration lands on anyone else.

instead ofqueueing on shared staging

05

Built for agents to drive.

A CLI with JSON output and real exit codes, an MCP server, a Claude Code skill and an HTTP API. Approvals stay with people.

instead ofa dashboard someone has to click

06

Gone when the job is.

Every branch can carry a TTL, --delete-after cleans up even when the job fails, and compute is billed by the second only while a branch runs.

instead ofcleanup scripts and forgotten databases

What a hundred branches cost

A hundred pull requests a day against a 100 GB database. A copy of production per run means a hundred full databases running all day. A pgrun branch stores only what it changes and bills compute only while it runs.

Storage (TB)

Traditional DB
10 TB100 GB/PR × 100 $106.67per day
pgrun
200 GB100 GB once + 1 GB/PR × 100 $2.13per day50× less

Compute (hours)

Traditional DB
2,400 h24 h/PR × 100 $206.40per day
pgrun
8 h 20 min5 min/PR × 100 $0.72per day288× less
A hundred PRs a day: $313 on copies vs $2.85 on pgrun, both at pgrun's rates. Copies run 24 h because nobody deletes them; a pgrun branch runs 5 minutes, then --delete-after removes it. see pricing →

Loved by the community

Don't take our word for it — listen to what developers say about our open-source Postgres tools.

3k GitHub stars
4.8k+ Weekly npm downloads
0.7 MB per idle database is the real headline. Spinning up isolated DBs per agent run just got way cheaper. David Hampl@davhampl · Oct 20, 2026 1,000 databases in just 155 MB RAM? That’s seriously impressive engineering. Atul Kumar@atulkumarzz · Oct 22, 2026 Running 1,000 isolated databases on just ~155 MB RAM is seriously impressive. Parul Gautam@Parul_Gautam7 · Oct 22, 2026 Disposable per-agent databases solve the worst parallel agent bug, two agents stepping on the same rows. Curious how you seed them, a fresh schema each time or a snapshot of real data? VeeraMarni@veeramarni · Oct 27, 2026 isolated 70kb postgres per claude code agent removes the shared-db contention i keep hitting in parallel subagent runs. does the hook still isolate schema migrations when two agents touch the same table in the same second? Ofek Shaked@VibeCoderOfek · Oct 27, 2026 100% going to try this out! Have you found it slows it down at all compare to MD files. In some cases it probably speeds things up. Brian Wagner@loneherd · Oct 27, 2026 Thanks to our early users, including Kanu, PGX and Folio, for building with @pgrustdb Michael Malis@mmalisper · Oct 22, 2026 This is really cool. Tried it yesterday and it was helpful. Nathan Phelps@nwp · Aug 20, 2026 Awesome idea! I’ll try it. Thanks! 👊 Iván Olivares Rojas@ivolivares · Aug 21, 2026 this is very interesting and useful. Ansh@Anshcodez · Aug 21, 2026 Just starred the repo will try asap, cool project Prathmesh@psv2522 · Aug 20, 2026 Interesting... will definitely try this👍🏻 Rajan Chavda@rajandchavda · Aug 21, 2026 this is sick joakim@jroosdot · Aug 20, 2026 Nice! tobias@tobiastornros · Aug 21, 2026 Wow amazing Wulan Oktarina@OktarinaWulnn · Aug 21, 2026 So cool Simply Ai@simpliai_ · Aug 21, 2026 omg 😲 😱 WGW ☂️ oss/acc@wgw_eth · Aug 21, 2026 cool, congrats! shlomokabareti@shlomokabareti · Aug 17, 2026
$10 free credits

Start free.

No credit card required. Create real Postgres branches, connect your agents, and test the workflow before paying.

Start in the terminal
$ pgrun login
$ pgrun source add production
$ pgrun branch create agent-42 --from production
✓ DATABASE_URL=postgres://…/agent-42

Hosted in the US

Safe Copies and branches run on our own hardware in the US. Production stays wherever it is.

Encrypted in transit

Every branch connection requires TLS through pgrun's gateway. Branch ports are not reachable from the internet.

Production is only read

Masking runs inside the read. Your production connection string is encrypted at rest and never shown again.

Backups and restore

Managed databases take daily base backups plus continuous WAL, stored off-site. The Safe Copy refreshes from production on a schedule you set.

Point it at a database.

Start free with $10 credits · Keep production where it is. Or create branches directly through the API.

install bash
$ curl -fsSL https://pgrun.dev/install.sh | sh copy