Skip to content
agentscamp

Best Branching Databases for AI Agents in 2026: Neon vs Dolt vs Turso vs PlanetScale

Neon, Dolt/Doltgres, Turso/AgentFS, PlanetScale, Supabase Branching, pgroll, Lakebase, and TigerData compared on data copy, merging, TTLs, and MCP safety.

By Imtiaz RayhanPublished 11 min read

On this page
  1. The summary table
  2. Five things to check before giving agents branch creation
  3. The databases, one at a time
  4. Neon: instant copy-on-write Postgres and agent-first MCP
  5. Dolt and Doltgres: true Git-for-data SQL with three-way merges
  6. Turso and AgentFS: lightweight SQLite-per-agent and CoW file overlays
  7. PlanetScale: strong Vitess MySQL Deploy Requests, limited Postgres branching
  8. Supabase Branching: full-stack app previews, not ephemeral agent scratchpads
  9. pgroll (Xata / ClickHouse): zero-downtime rollout companion
  10. Also on the shortlist: Databricks Lakebase and TigerData
  11. How to choose

Give each coding or data agent an isolated database branch instead of production credentials. Neon and Databricks Lakebase lead on instant copy-on-write Postgres clones, Dolt and Doltgres are the only engines that merge both data and schema, Turso and AgentFS excel at per-agent SQLite state, PlanetScale Vitess leads MySQL deploys, and Supabase branches full stacks.

Key takeaways

  • Database branching is five different mechanisms under one buzzword: storage copy-on-write clones (Neon, Lakebase), Git-like Merkle-tree SQL with real data merges (Dolt, Doltgres), file/database-per-agent SQLite (Turso, AgentFS), Vitess schema Deploy Requests (PlanetScale MySQL), and full-stack migration previews (Supabase).
  • Only Dolt and Doltgres perform true three-way merges of both schema and cell-level data with SQL conflict tables; Neon, Lakebase, Turso, and Supabase do not merge branch data back to production.
  • Watch PlanetScale Postgres vs. PlanetScale Vitess: Deploy Requests and non-blocking schema merges are Vitess-only, and creating a PlanetScale Postgres branch from the Branches page copies neither schema nor data unless you restore from a backup.
  • Check auto-expiration and scale-to-zero before letting agents spawn branches in a loop: Neon supports branch TTLs (up to 30 days) and scale-to-zero up to 16 CU, whereas Supabase preview branches and PlanetScale Postgres branches have no scale-to-zero and bill active compute until deleted.
  • TigerData's zero-copy service forks (~30–90 seconds) apply only to Free services as of December 2026—Standard services fall back to backup restore plus WAL replay—though Tiger MCP sets a strong safety bar by failing closed on destructive production calls.
  • pgroll (under ClickHouse after its November 2026 acquisition of Xata) is not a branching database, but complements branching by running expand-contract migrations on live Postgres without downtime.

Handing an autonomous coding or analytics agent write credentials to a shared staging database—let alone production—turns one bad ALTER TABLE or runaway backfill into an outage. Database branching lets each agent session spin up an isolated database copy, test schema migrations or destructive queries safely, and throw the branch away when done.

The catch is that vendors use "branching" to describe five completely different mechanisms. Some clone terabytes of Postgres data in under a second via copy-on-write storage, some replay empty migration scripts, and only one family can actually merge row-level data changes back to main. Prices change often; check vendor pricing pages for current rates. This guide compares the major options—plus two notable late-2026 additions (Databricks Lakebase and TigerData) and how pgroll fits the rollout step.

The summary table

PlatformEngineBranching mechanismCopies data + schema?Merges back to main?Auto-TTL & scale-to-zeroOfficial MCP server
NeonPostgreSQL (Lakebase engine)Storage copy-on-write clones (+ Auth/Storage/Functions)Yes (current/PITR); schema-only beta as of Dec 2026Schema diff + migrations only (no data merge)TTL up to 30d (CLI/API opt-in); scale-to-zero ≤16 CUHosted mcp.neon.tech/mcp (143 tools, ?readonly=true, two-step migrations)
Dolt / DoltgresMySQL (Dolt 2.0) & Postgres (Doltgres 1.0 GA)Git-like Prolly-tree content-addressed SQLYes (instant zero-copy commit pointers)Yes: true 3-way schema + cell/JSON data mergeSelf-hosted/embedded; manual cleanupdolthub/dolt-mcp (Apache-2.0, 40+ tools, --dolt/--doltgres/--doltlite)
Turso & AgentFSlibSQL / Turso DB (Rust SQLite) + SQLite file overlayDB-per-agent clone (--from-db) or POSIX CoW SQLite fileYes (Cloud --from-db + PITR; AgentFS local file)No automatic merge (independent DBs / agentfs diff)Cloud: no auto-TTL (5d deleted-DB recovery); serverless scalingHosted mcp.turso.ai/mcp (OAuth 2.1) + local agentfs serve mcp
PlanetScaleVitess (MySQL) & PlanetScale PostgresVitess: schema branches + OnlineDDL. Postgres: isolated clustersVitess: schema-only (or backup). Postgres: empty by defaultVitess: schema-only Deploy Requests. Postgres: noneNo auto-TTL or scale-to-zero on Postgres (PS-DEV always on)Hosted mcp.pscale.dev/mcp/planetscale (38 tools; cannot create/delete branches)
Supabase BranchingPostgreSQL + full Supabase stackSeparate full project per branch; replays migrations + seed.sqlSchema + seed only by default (--with-data needs PITR)Schema, config & Edge Functions via Git/DAG (no data merge)Auto-deletes on PR close; no custom TTL or scale-to-zeroHosted mcp.supabase.com/mcp (branching tool group experimental as of Dec 2026)
Databricks LakebasePostgreSQL (shared Neon engine)Storage copy-on-write clones inside Databricks projectsYes (current/PITR)Schema diff + migrations only (no data merge)Expiring TTL branches bill delta-only; scale-to-zero ≤32 CUDatabricks / Postgres tooling + managed agent memory (beta as of Dec 2026)
TigerDataPostgreSQL + TimescaleDB + pgvectorscaleService forking (CoW on Free; backup+WAL on Standard)YesNo automatic mergeManual cleanup; no scale-to-zero on StandardLocal tiger-cli + Tiger MCP (read_only=prod, fail-closed destructive gates)

Five things to check before giving agents branch creation

Before wiring database branching into an agent loop or MCP client, audit five practical failure modes:

  • Schema-only vs. data-and-schema copies. Testing a migration against empty tables misses data-dependent locks, nullability violations, and skewed query plans. Copy-on-write Postgres (Neon, Lakebase) and Dolt/Doltgres copy real data instantaneously; Supabase Branching defaults to empty migrations plus seed.sql; PlanetScale Postgres starts empty unless you run a full backup restore.
  • Whether you need data merges back. Most coding agents write migration files that you review in a PR and run against production—meaning copy-on-write throwaway branches are ideal. Data-curation, enrichment, or multi-agent state workflows that actually need to merge rows and cells back into main need Dolt or Doltgres.
  • Branch sprawl, TTLs, and idle compute bills. If an agent spawns a branch per pull request or retry loop and crashes before deleting it, branches without automatic TTLs or scale-to-zero keep billing hourly compute until a human notices.
  • MCP permission boundaries. Never hand an agent unrestricted production admin tools. Favor servers with URL- or flag-enforced read-only modes (?readonly=true on Neon, &read_only=true on Supabase, read_only=prod on Tiger MCP) and human confirmation for destructive DDL or branch deletion.
  • Moving tested migrations into live production. Branching validates a migration before merge; rolling it out onto live traffic without locking queries still requires an expand-contract strategy—covered in zero-downtime Postgres migrations and automated by pgroll.

The databases, one at a time

Neon: instant copy-on-write Postgres and agent-first MCP

Neon (acquired by Databricks in 2025, now sharing the underlying Lakebase Postgres storage/compute engine) decouples unmodified PostgreSQL compute from a custom Pageserver/Safekeeper storage layer. Creating a branch—from current state or any point-in-time recovery timestamp—is a metadata operation over shared object storage that finishes in sub-second to a few seconds, copying both schema and data without duplicating unchanged pages (with schema-only branching in beta as of December 2026 and anonymized-data branching supported). Neon also branches its bundled Auth, Object Storage, Functions, AI Gateway, and Data API alongside Postgres.

For AI agents, Neon's hosted MCP server (https://mcp.neon.tech/mcp, MIT repo neondatabase/mcp-server-neon, 143 live tools) is unusually mature: server-enforced query parameters scope sessions via ?readonly=true, ?projectId=, ?roleName=, ?category=, and ?secrets=none, while prepare_database_migration tests DDL on a temporary branch before complete_database_migration applies it. Branch expiration (expires_at, up to 30 days; opt-in on CLI/API) and automatic scale-to-zero (5 minutes idle default, up to 16 CU) prevent forgotten agent branches from burning compute.

Catches to know: Neon does not merge branch data back (you promote schema diffs/migrations only); TTL cannot be set on protected, default, or parent branches; idle branches hold onto old page history past your history window; sequence/identity values diverge independently across parent and branch; scale-to-zero caps at 16 CU; Azure regions are being deprecated on Neon in favor of AWS; and Neon itself advises using MCP for development and testing rather than production.

Verdict: the default choice for coding and migration agents on PostgreSQL when you want instant data-and-schema branches, scale-to-zero, branch TTLs, and a well-scoped hosted MCP server.

Dolt and Doltgres: true Git-for-data SQL with three-way merges

Dolt (MySQL-compatible, Dolt 2.0 shipped May 2026) and Doltgres (PostgreSQL-compatible, 1.0 GA since August 6, 2026) are built on content-addressed Prolly trees rather than storage snapshots—making them the only databases in this comparison that perform true three-way merges of both schema and cell-level data (including JSON key-level merges) via CALL DOLT_MERGE(...) in Dolt or SELECT * FROM DOLT_MERGE(...) in Doltgres, exposing merge conflicts in inspectable SQL tables (dolt_conflicts_<table_name>). Branch creation is an instant zero-copy pointer move, every agent action gets a commit hash you can diff or dolt_reset in one SQL statement, and the official Apache-2.0 dolthub/dolt-mcp server (40+ tools) works across --dolt, --doltgres, and embedded single-file --doltlite.

Know the engineering trade-off on the Postgres side. While Dolt 2.0 now matches or beats MySQL on DoltHub's own sysbench tests, DoltHub's August 2026 launch benchmark explicitly reports Doltgres 1.0 running roughly 2.7x slower than vanilla PostgreSQL. Doltgres also ships as a SQL server only (no standalone doltgres CLI) and lacks several core Postgres features as of December 2026: Row-Level Security (CREATE POLICY), materialized views, logical replication (CREATE PUBLICATION), foreign data wrappers, and true table partitioning.

Verdict: the only right answer when multi-agent workflows must concurrently modify rows, inspect cell-level diffs, and merge data back into a canonical SQL table—use Dolt (MySQL) for peak performance or Doltgres when Postgres wire compatibility outweighs its missing PG features and throughput gap.

Turso and AgentFS: lightweight SQLite-per-agent and CoW file overlays

Turso approaches agent isolation through lightweight SQLite-family databases rather than heavy Postgres clusters. On Turso Cloud, turso db create --from-db (with optional PITR --timestamp) forks an entire libSQL database (schema plus data) into an independent serverless database with no idle VM per database, paired with a hosted OAuth 2.1 MCP server (https://mcp.turso.ai/mcp) separating read, write, delete, and DDL tools and offering 5-day deleted-database recovery on paid plans. Underneath, Turso's MIT Rust rewrite of SQLite (Turso Database, v0.8.4, pre-1.0 as of December 2026) is production-ready for embedded use (with concurrent MVCC), opt-in beta on Turso Cloud as of December 2026, and experimental for Postgres wire compatibility (tursopg) as of December 2026.

Turso's agent-specific wildcard is AgentFS (v0.6.4, explicitly beta as of December 2026): a single-file SQLite workspace combining a POSIX FUSE/NFS copy-on-write filesystem overlay over a host directory, a key-value store, and a structured tool-call audit log, plus local agentfs serve mcp. Snapshotting an entire agent's filesystem plus state is literally copying one .db file (cp agent.db snap.db), and agentfs diff shows changes over the base directory.

Catches: neither Turso Cloud nor AgentFS merges database changes automatically; Turso Cloud branches have no built-in auto-TTL (requiring manual cleanup and counting against database quotas); Multi-DB Schemas and Attach DB are deprecated; and both Turso Cloud's Rust engine and AgentFS remain beta as of December 2026.

Verdict: ideal for giving thousands of isolated agents cheap, ephemeral SQLite databases or single-file auditable workspaces where Postgres compatibility isn't required.

PlanetScale: strong Vitess MySQL Deploy Requests, limited Postgres branching

PlanetScale now runs three products: Vitess (sharded MySQL-compatible), PlanetScale for Postgres (GA since September 2025), and Neki (sharded Postgres, in Platform Preview as of December 2026). Do not conflate their branching stories.

On Vitess, PlanetScale's branching workflow is mature: schema-copy development branches (or Data Branching® restoring the latest backup) feed Deploy Requests with automated schemadiff, schema linting, non-blocking OnlineDDL, and zero-data-loss reverts. On PlanetScale for Postgres, however, Deploy Requests are unavailable (and unavailable on Neki), and creating a branch from the Branches page spins up an isolated PS-DEV cluster that copies neither schema nor data unless you explicitly restore from a backup (which copies full storage and inherits the parent cluster size). Postgres branches have no auto-TTL and no scale-to-zero. PlanetScale's hosted MCP server (https://mcp.pscale.dev/mcp/planetscale, 38 tools plus an insights-only endpoint) enforces org query caps and short-lived credentials, and intentionally cannot create or delete branches (requiring the pscale CLI).

Verdict: still the gold standard for non-blocking MySQL/Vitess schema migrations via Deploy Requests; for Postgres agent branching, Neon or Lakebase is a much closer fit today.

Supabase Branching: full-stack app previews, not ephemeral agent scratchpads

Supabase Branching (MCP profile) creates a complete, isolated Supabase project per branch—Postgres plus Auth, Storage, Edge Functions, and project config—replaying your SQL migrations and one-time seed.sql cleanly on each pull request (Git-integrated preview branches auto-delete when the PR closes). Passing --with-data copies production data, but requires the PITR add-on and inherits production compute and disk sizing.

Two billing and maturity caveats matter for autonomous agents: Supabase branches have no custom TTL timer and no scale-to-zero (billing hourly active compute starting at Micro size, and excluded from Spend Cap and Compute Credits), Dashboard branching is in public alpha / opt-in beta as of December 2026, and the hosted Supabase MCP server (https://mcp.supabase.com/mcp) still marks its Branching tool group (create_branch, merge_branch, etc.) as experimental as of December 2026 (with cost-confirmation elicitation).

Verdict: great for PR-level full-stack preview environments when your app runs on Supabase; avoid letting autonomous agent loops spawn unbounded branches because of always-on hourly compute billing.

pgroll (Xata / ClickHouse): zero-downtime rollout companion

pgroll (v0.16.3, Apache-2.0) is not a branching database—it is the expand-contract schema migration tool that runs after your agent's branch passes CI. It creates side-by-side versioned Postgres schema views so old and new application code run concurrently against live PostgreSQL 14–18+ without downtime, then cleans up old columns on completion. On November 9, 2026, ClickHouse acquired Xata alongside ClickHouse Managed Postgres GA (integrating Xata's ZFS/NVMe-oF Xatastor copy-on-write branching in coming months), while pgroll remains Apache-2.0. Two catches: client apps must explicitly set Postgres search_path per schema version, and Postgres 14 RLS is not respected by pgroll views (requiring Postgres 15+ security_invoker = true).

Also on the shortlist: Databricks Lakebase and TigerData

  • Databricks Lakebase: Runs the same Lakebase Postgres engine as Neon inside Databricks (GA on AWS as of December 2026, with Azure/GCP availability), raising autoscaling to 64 CU and scale-to-zero to 32 CU, capping projects at 500 branches and 20 active computes, billing expiring branches delta-only vs. permanent branches at full size, and adding managed agent memory/sessions (beta as of December 2026). The natural choice if your agents already run on Databricks.
  • TigerData (formerly Timescale): Combines PostgreSQL, TimescaleDB, and pgvectorscale / BM25 hybrid search with tiger-cli (Apache-2.0) and Tiger MCP. Tiger MCP's guardrails stand out—read_only=prod lets an agent fork PROD into DEV while blocking PROD writes, and destructive PROD operations fail closed if the MCP client lacks elicitation. The big caveat as of December 2026: fast zero-copy CoW forks (~30–90 seconds) exist on Free services only, while Standard services fall back to backup restore plus WAL replay (5–20+ minutes) and full storage billing.

How to choose

  • Instant Postgres data-and-schema branches with TTLs, scale-to-zero, and scoped hosted MCP: Neon (or Databricks Lakebase if your data platform is Databricks).
  • Multi-agent workflows that must diff and merge row/JSON data back to main: Dolt (MySQL) or Doltgres (Postgres, accepting its 1.0 throughput and feature caveats).
  • Per-agent ephemeral SQLite databases or single-file CoW filesystem overlays: Turso Cloud (production-ready on libSQL; Rust engine opt-in beta as of December 2026) or AgentFS (beta as of December 2026).
  • Non-blocking MySQL schema changes with automated Deploy Requests: PlanetScale Vitess.
  • PR-scoped full-stack Supabase previews (Postgres + Auth + Edge Functions): Supabase Branching.
  • Zero-downtime rollout of agent-authored migrations onto any live Postgres: pair your branching workflow with pgroll and zero-downtime Postgres migrations.

Sources and further reading

Primary documentation used to verify this guide.

Frequently asked questions

Which branching database can actually merge agent data changes back into main?
Only Dolt (MySQL-compatible, Dolt 2.0) and Doltgres (PostgreSQL-compatible, 1.0 GA since August 2026) perform true three-way merges of both schema and cell-level row/JSON data with SQL conflict inspection tables. Neon, Databricks Lakebase, Turso, Supabase Branching, and TigerData isolate agent experiments on branches or forks, but promoting changes back to main happens through schema diffs and migrations rather than automatic data merges.
Does PlanetScale for Postgres support the same branching and Deploy Requests as PlanetScale Vitess?
No. As of December 2026, Deploy Requests and non-blocking schema reverts remain Vitess-only and are unavailable on PlanetScale for Postgres and Neki (Platform Preview as of December 2026). Creating a PlanetScale Postgres branch from the Branches page spins up an isolated cluster that copies neither schema nor data unless you restore from a backup.
How do Neon and Databricks Lakebase differ after the acquisition?
Databricks announced its acquisition of Neon in May 2025, and both Neon and Databricks Lakebase now run the same Lakebase Postgres engine. Neon serves developers and AI agents with a 143-tool hosted MCP server, branchable Auth/Storage/Functions, and scale-to-zero up to 16 CU on AWS (Azure is being deprecated on Neon). Databricks Lakebase integrates natively with Databricks governance, scales up to 64 CU (scale-to-zero up to 32 CU), caps projects at 500 branches, and adds managed agent memory/sessions (beta as of December 2026).
Which branching database has the safest MCP lifecycle controls for AI agents?
Neon's hosted MCP server supports server-enforced query parameters (?readonly=true, ?projectId=, ?roleName=, ?secrets=none) and two-step prepare_database_migration / complete_database_migration flows (though Neon recommends MCP for dev/test only). TigerData's Tiger MCP supports read_only=prod—allowing agents to fork production into a dev branch while blocking production writes and failing closed on destructive operations if elicitation is unsupported. PlanetScale's hosted MCP blocks branch creation and deletion entirely.
How does pgroll fit alongside a branching database?
Branching isolates an agent while it writes and tests a migration against a copy of production. pgroll solves the next step: deploying that tested migration onto live PostgreSQL with zero downtime by exposing side-by-side versioned schema views during expand-contract rollouts.

Filed under

comparison · best-of · databases · postgres · branching

About the author

Imtiaz Rayhan

Software developer · Co-founder of DotCamp

Imtiaz Rayhan is a software developer and co-founder of DotCamp, the WordPress plugin company behind Ultimate Blocks, WP Table Builder and Tableberg. He has published plugins on WordPress.org since 2017, and the plugins he develops there have more than 100,000 active installations. He writes and maintains AgentsCamp and builds its sibling projects OptimizeCamp, GritShip and SurePrompts.

Related