# Elefork

> Branchable serverless Postgres for AI agents.

import { Card, CardGrid, LinkCard } from '@astrojs/starlight/components'

Elefork gives every agent, test run or RL episode its own real PostgreSQL database. You can create one, fork it, take a checkpoint and reset it to that checkpoint in well under a second. Each branch runs in its own microVM, so you can run untrusted SQL as superuser. Idle branches pause automatically and wake on the next connection.

<CardGrid>
  <Card title="Branch from anything" icon="seti:git">
    Create branches from a template, a checkpoint, or the current state of another branch. One API call can create up to 100 of them.
  </Card>
  <Card title="Checkpoint and reset" icon="random">
    Snapshot a branch and reset it later. A reset gives the branch a fresh instance with the checkpoint's data.
  </Card>
  <Card title="Plain Postgres" icon="seti:db">
    PostgreSQL 18 with any standard client: psql, libpq, JDBC, psycopg, asyncpg, node-postgres. Prepared statements, `COPY` and cancel all work.
  </Card>
  <Card title="Built for agents" icon="rocket">
    A Python SDK, a CLI and an MCP server. Batch operations and TTLs fit RL and evaluation workloads.
  </Card>
</CardGrid>

<LinkCard title="Quickstart" description="From an API token to a psql session in five commands." href="/docs/quickstart/" />
<LinkCard title="Concepts: branches" description="Lifecycle, states, pause and wake, lifetimes." href="/docs/concepts/branches/" />
<LinkCard title="REST API reference" description="Generated from the same OpenAPI document the server is tested against." href="/docs/api/" />
