Every agent gets its own Postgres.

Production-like Postgres branches in seconds for coding agents, tests, CI and migrations.

~3 sec branch creation
90% created by coding agents
Parallel agent branches
1000 branches created so far

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
Works with any cloud
RDS Aurora 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

Speaks to everything you use

Frameworks and clients connect as they always have; agents and CI create the branches.

Clients
Rails Django Prisma Drizzle pgx psql Any Postgres client
Agents & CI
Claude Code Codex Cursor GitHub Actions GitLab CI MCP

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

Beyond expectations

Engineers, platform teams and CI pipelines that stopped sharing one staging database and gave every agent its own.

"Three agents, three databases, zero collisions. That was the entire problem, solved in an afternoon."
Maya Ostrowski Staff Engineer at Northwind Labs
"Our CI used to queue on a single staging database. Now every job branches, runs, and deletes its own."
Devin Park Platform Lead at Kestrel Systems
"First time I've let an agent run migrations without watching the terminal the whole way through."
Priya Raghavan Backend Engineer at Tidepool
"It's a DATABASE_URL. Nothing in our Rails app noticed anything had changed."
Tom Berger Engineering Manager at Vellum Works
"Branch in a few seconds, drop it when the PR merges. Cleanup stopped being a job someone owns."
Alicia Fuentes Infrastructure Engineer at Bluefin
"We stopped copying production dumps onto laptops. That alone paid for it."
Ruth Adeyemi Head of Security at Pinehill
"My agent opens a branch, breaks it in four ways, and production never hears about it."
Jonas Lindqvist Founder at Sawtooth
"Masking meant we could finally hand contractors data shaped like the real thing."
Wei Chen Data Platform Lead at Cobalt Street
"Onboarding is one command now. The new hire had a database before their coffee landed."
Sofia Marchetti Engineering Manager at Overstory
"Twenty parallel test runs, twenty databases. The flaky ones turned out to be shared state all along."
Marcus Hale QA Lead at Fernbank
"Postgres, not a Postgres-shaped thing. psql, pg_dump and our extensions all just worked."
Anika Sharma Principal Engineer at Quarry
"The agents create more databases in a day than we used to create in a year. Nobody files a ticket."
Élodie Rousseau CTO at Arcmap
$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

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