Introducing Elefork early access
Real PostgreSQL databases that agents can fork, checkpoint and reset with an API call — each branch in its own microVM.
Agents get better by doing real work against real systems, and a database is the system they break most often. Today we’re opening early access to Elefork: branchable, serverless PostgreSQL built for agents, evaluations and RL environments.
The problem
If you run an agent against a database many times — to train it, to evaluate it, or just to test it in CI — every run needs to start from the same state. The usual options are painful:
- A shared staging database leaks state between runs, and one destructive query ruins everyone’s afternoon.
- A container per run works, but seeding it takes as long as the episode, and resetting it means doing it all again.
- Transactions you roll back break as soon as the agent runs DDL, opens its own transactions or needs superuser.
What Elefork does
Every Elefork branch is an unmodified PostgreSQL 18 server in its own microVM. Branches are created, forked, checkpointed, reset and paused through an API:
- Seed once. Build the starting state in one branch and take a checkpoint.
- Copy a hundred times. One call creates up to 100 identical branches from that checkpoint.
- Reset forever. After an episode, reset the branch to the checkpoint. It keeps its id and hostname; the data is pristine again.
Because each branch has its own VM, agents can run untrusted SQL — even as superuser — without touching anyone else. Idle branches pause on their own and wake on the next connection.
from elefork import Client
c = Client()
start = c.checkpoint(seed["id"])
envs = c.create_branches(project, checkpoint=start["id"], count=100)
How agents use it
Elefork ships a Python SDK, a CLI, an MCP server and a REST API described by an OpenAPI document. Branch credentials are short-lived tokens that work with any Postgres driver: psql, libpq, JDBC, psycopg, asyncpg or node-postgres.
For evaluations whose scores must mean something, Elefork can also keep the grading outside the agent’s database: upload a dataset once, define versioned tasks, and let sealed episodes be scored against a disposable copy. The scored evaluations guide walks through it.
What’s available
Early access includes L0 (scratch) branches: after a crash, a branch returns to its latest checkpoint — the right trade-off for episodes, evals and CI. L1 (standard) and L2 (durable) branches, for data that must survive host failures, are coming soon.
We’re onboarding teams building agents, evals and RL environments. Request access and tell us what you’re working on, or start with the quickstart.