Git4Data: Database-Native Version Control for AI Agents

Hongshen Gou, Jianguo Wang and colleagues (MatrixOrigin, Purdue) present Git4Data, a database-native version control layer that gives agents Git-style branching over relational data through ordinary SQL.
Ask this paper
Agents branch data, and nothing supports it: Agents explore many candidate states of relational data in parallel and each needs to be isolated, reproducible and auditable. Source control does not scale to large datasets and databases rarely expose native branching.
Database as repository, table as versioned object: Snapshot and tag, branch, diff, and merge with explicit conflict-resolution policies, all exposed as SQL extensions rather than an external tool.
Cost proportional to the change: Implemented in MatrixOne on immutable object storage plus MVCC, so operation cost scales with the size of the diff rather than the size of the data.
Order-of-magnitude speedup: On the BranchBench agentic branching workloads, up to 10x over DoltDB.
Why it matters: Agent infrastructure is where a lot of the next practical progress will come from, and 'let the agent branch the database like it branches the repo' is an obviously right primitive that did not exist.
Abstract
Large Language Model (LLM) agents increasingly explore many candidate states of relational data in parallel, each of which should remain isolated, reproducible, and auditable, preferably through the same SQL interface used for ordinary data work. Existing tools support this requirement only partially: source-code version control does not scale to large datasets, whereas relational databases manage large data efficiently but rarely expose native branching, comparison, and merging. We present Git4Data, a database-native version-control layer for agentic workflows. Git4Data treats a database as a repository and a table as a versioned object, exposing Git-style operations (snapshot/tag, branch, diff, and merge with explicit conflict-resolution policies) through SQL extensions. Implemented in MatrixOne, a cloud-native relational database, Git4Data leverages immutable object storage and MVCC to make the cost of these operations proportional to the size of the change rather than the size of the data. On the BranchBench agentic branching workloads, Git4Data outperforms DoltDB by up to an order of magnitude. Overall, we believe this work sheds light on how relational databases can better support AI agents through efficient versioning.