Early access: L0 branches available now

Branchable Postgres for AI agents

Give every agent, eval and RL episode its own PostgreSQL 18 database. Fork it, checkpoint it and reset it with one API call, up to 100 branches at once, each in its own microVM.

evals/rlzshrl-sql
~/evals/rl$elefork branch create --checkpoint ckp_seed --count 100
4 of 4 batches
br_env_001 … br_env_02525 readyL0
br_env_026 … br_env_05025 readyL0
br_env_051 … br_env_07525 readyL0
br_env_076 … br_env_10025 readyL0
Branches100 ready(100)
Fromckp_seed(rl-sql)
Doneconnect with any Postgres driver
~/evals/rl$
Episode 7 donebr_env_042
Reset to ckp_seed, same hostname

Every Postgres branch of a project, in one window

Pick a branch from the project and work in it: the SQL editor runs as the role you choose, through the same gateway as psql. Start with the quickstart

One microVM for every Postgres branch

Every branch is its own PostgreSQL 18 server in its own lightweight VM. Agents can run untrusted SQL, even as superuser, and only that branch notices.

  • Passwords for one branch and one role, valid for an hour
  • TLS to the exact instance, checked before any data moves
  • New keys and randomness after every clone and wake

How branches are kept apart

  • Instance verifiedg3.inst-7f2.br-env-042: certificate matches
  • Password issuedpostgres on br_env_042, valid for 1 hour
  • Identity resetNew key and certificate after wake

Postgres checkpoints for runs that repeat. Seed once, copy a hundred times, reset between runs.

Copy one checkpoint into many branches

Build the starting state once, take a checkpoint, then create identical branches from it in one call.

Agents use it over MCP

elefork-mcp gives agents tools to branch, run SQL and reset. Destructive tools ask first.

elefork-mcp
Connected
Branch rl-sql from the seed and add an index on orders.
Created br_task_17 from ckp_seed and added the index. main is untouched.create_branchrun_sql
Ask the agent

Scored from outside

Task rules stay in the control plane. Sealed episodes are scored on a copy.

orders-refund · v3
3 of 4
  • Episode sealed
  • Integrity checked
  • Refund row exists
  • audit_log intact

Cleans up after itself

Give a branch a lifetime. Forgotten L0 branches go after 24 hours.

Lifetimebr_env_042Reset
Delete after24
Password valid for1 h

Watched per branch

Connections, live queries and VM load for every branch, in the console.

Connections · br_env_042Last hour
12open now

Postgres durability: choose what survives a crash

Durability is set per branch and enforced by the server, never by client settings. Today every branch is L0.

  • L0 · ScratchAvailableAfter a crash, back to the latest checkpoint. For episodes, evals and CI.
  • L1 · StandardComing soonA host crash with the disk intact loses nothing. Coming soon.
  • L2 · DurableComing soonNo confirmed commit lost if any one host is lost. Coming soon.

How durability levels work

Durability · br_env_042
1 of 3 on
  • L0 · ScratchAfter a crash: the latest checkpoint
  • L1 · StandardComing soon
  • L2 · DurableComing soon

Questions about Elefork

Anything else, ask when you request access.

Request access

Is it real PostgreSQL?

Yes. PostgreSQL 18, unmodified, one server per branch. Anything that speaks the Postgres protocol can connect.

Can my agent run as superuser?

On L0 branches, yes. Each branch is its own microVM, so the VM (not Postgres permissions) is the boundary between tenants.

What happens to idle Postgres branches?

They pause and stop using CPU and memory. The next connection wakes them; the client just sees a slightly slower connect.

How do agents use it?

Through the MCP server, the Python SDK, the CLI or the REST API. Branch credentials are short-lived tokens that work with any Postgres driver.

How much does Elefork cost?

Elefork is in early access. We'll publish prices before general availability; see how billing will work.

Postgres drivers and agent tools that already work

Every branch is plain PostgreSQL 18 over TLS. Prepared statements, COPY and query cancel work through the gateway. Connecting to a branch

  • psql
  • libpq
  • JDBC
  • psycopg
  • asyncpg
  • node-postgres
  • Prepared statements
  • COPY
  • Query cancel
  • sslmode=verify-full
  • Python SDK
  • elefork CLI
  • elefork-mcp