# Stolon > Stolon is a serverless, Postgres-compatible database for teams building AI agents and the applications they serve. Nothing is overwritten: read any table at a past moment (`FOR SYSTEM_TIME AS OF`), branch the whole database in O(1), compare any two states, merge a branch back with conflicts named by table, row and column, and restore to a moment. Stock Postgres clients work unchanged; the database name in the connection string selects the branch. Agents can also use it over MCP. Facts an agent should get right: - Branches are databases: `CREATE DATABASE pr_42` forks the branch you are connected to; connect with database name `.pr_42`. Run it outside a transaction block, as Postgres requires. - Compare: `COMPARE DATABASE main AS OF '2026-09-28 20:07:25+00' WITH main [KEYS|ROWS|CELLS] [TABLE t] [LIMIT n] [ALLOW SCAN]`. - Merge: `MERGE DATABASE pr_42 INTO main [RESOLVE OURS|THEIRS] [DRY RUN]`. A conflict applies nothing. - Restore: the console's Restore keeps the present as a branch first, so a restore can be undone. - Check your own queries with the compatibility gate before moving an app. - Each page below also exists as Markdown at the same path with `index.md`; `/llms-full.txt` is all of them in one file. ## Start here - [Stolon — serverless, Postgres-compatible database for AI agents, with branches and history](https://stolondb.com/index.md): A serverless, Postgres-compatible database with no cold starts, for teams building AI agents and the apps they serve. Every branch is instant, history is queryable, and branches merge back with a reviewable diff. - [Get started with Stolon — start with a copy, not a migration](https://stolondb.com/start/index.md): Three ways in: rehearse on an imported copy of the Postgres you keep, start a new app on Stolon, or move an app here from another provider. - [Stolon docs — connect, branch, merge](https://stolondb.com/docs/index.md): Connect, branch, merge and read history in Stolon: the SQL verbs, Postgres compatibility, auth and the console. - [Will your app run on Stolon? The compatibility gate](https://stolondb.com/compatibility/index.md): Point the compatibility gate at your own schema and queries. It reports which statements will not run here, with the SQLSTATE and the reason, before you move anything. ## How it works - [How Stolon works: architecture for engineers](https://stolondb.com/how-it-works/index.md): Stolon is its own storage engine behind the PostgreSQL wire protocol: instant branches, history, merge, durability, and what has been measured. ## Guides - [Stolon guides — connect, branch, review, undo](https://stolondb.com/guides/index.md): Short, tested task pages for Stolon: connect from psql, Python and Node.js, a database branch per pull request, reviewing and undoing an agent's changes, LangGraph's checkpointer, and MCP. - [Connect to Stolon from psql, Python and Node.js](https://stolondb.com/guides/connect/index.md): Stolon speaks the PostgreSQL wire protocol, so psql, psycopg, psycopg2, SQLAlchemy, node-postgres and postgres.js connect unchanged. The database name in the connection string selects the branch. - [Connect a GitHub repository](https://stolondb.com/guides/github/index.md): Install the Stolon GitHub App: every pull request gets its own branch of your database, a check showing what merging it would change, and its data merged when the pull request merges. - [A database branch for every pull request](https://stolondb.com/guides/branch-per-pull-request/index.md): Give each pull request its own full copy of the database with CREATE DATABASE, run migrations and tests against it, preview the merge with MERGE DATABASE … DRY RUN, then merge or drop it. A shell script for CI. - [Review an agent's database changes as a pull request](https://stolondb.com/guides/review-agent-changes/index.md): Let an agent write on its own branch, preview what merging it would change with MERGE DATABASE … DRY RUN and DRY RUN ROWS, settle conflicts with RESOLVE OURS or THEIRS, and merge only what was reviewed with REVIEWED. - [Undo what an agent wrote](https://stolondb.com/guides/undo-agent-writes/index.md): Three ways to take back an agent's database writes in Stolon: drop the branch it worked on, read any table as it was with FOR SYSTEM_TIME AS OF, or restore a branch, main included, to a moment. - [Use Stolon as LangGraph's Postgres checkpointer](https://stolondb.com/guides/langgraph-checkpointer/index.md): LangGraph's stock PostgresSaver and AsyncPostgresSaver (langgraph-checkpoint-postgres) run against Stolon unchanged. Point them at a branch, and fork every thread's checkpoints with one CREATE DATABASE. - [Connect an AI agent over MCP](https://stolondb.com/guides/mcp/index.md): Connect Claude, ChatGPT, Claude Code or Cursor to your Stolon database: agent memory where every write is a version, undo, history, and review and merge of database branches. - [Read, branch, compare and restore a past moment](https://stolondb.com/guides/history/index.md): Work with a Stolon database's history: read a table at a past moment with FOR SYSTEM_TIME AS OF, branch from that moment, compare it with now using COMPARE DATABASE, and restore a branch to it while keeping the present as a branch. ## Comparisons - [Stolon compared with Neon, Supabase and Dolt](https://stolondb.com/compare/index.md): Dated, sourced comparisons of Stolon with Neon, Supabase and Dolt on branching, merging, history and pricing: based on each vendor's own pages, as of 26 September 2026. - [Stolon vs Neon: branching, merging and pricing compared](https://stolondb.com/compare/neon/index.md): Stolon and Neon side by side, based on Neon's own pages, as of 26 September 2026: branching, merging, restore and prices. - [Stolon vs Supabase: branching, merging and pricing compared](https://stolondb.com/compare/supabase/index.md): Stolon and Supabase side by side, based on Supabase's own pages, as of 26 September 2026: branching, merging, recovery and prices. - [Stolon vs Dolt and Doltgres: version-controlled databases compared](https://stolondb.com/compare/dolt/index.md): Stolon and Dolt/Doltgres side by side, based on DoltHub's own pages, as of 26 September 2026: branching and merging data, compatibility, license and hosted prices. ## Blog - [Blog](https://stolondb.com/blog/index.md): Writing from the Stolon team on versioned databases, branching and building with AI agents. - [What is a fully persistent B-tree?](https://stolondb.com/blog/fully-persistent-b-tree/index.md): A fully persistent B-tree keeps every version readable and lets any version start a new one. What the term means, and what it buys a database. ## Optional - [Pricing](https://stolondb.com/pricing/index.md): Plans by who they are for (Free, Team, Agents and Enterprise), metered on throughput and storage held, with no per-branch fees on paid plans and a history window of 24 hours, 7 days or 30 days. Pricing is published at launch.