The Bits
Infrastructure Company
01

Open sourcePostgreSQL extension

Gnomon: Git for Postgres data, built for agents

Give an agent its own branch of your real database, as nothing more than a connection string. See every field it changed, merge it into main when it’s right, and undo it if it wasn’t.

Gnomon runs inside the Postgres you already have. One extension, no copies, no second database.

The main database drawn as rows of grey bits, with three branches beneath it, each a single row of bits. A branch stores only the rows it changes, outlined in red, and reads everything else from main. Agent branches wait for review and then merge, and their rows land on main in red. Test branches are dropped when their tests finish, and nothing reaches main.
02

A branch of production, in an instant

A branch reads everything from main and keeps only what it changes, so it opens instantly and copies nothing, however big your database is. Give one to every agent run, every pull request and every test.

Your application doesn’t change. A branch is a connection string: point a session at it, and the queries it already runs read and write the branch instead of main.

SQLOpen a branch
  1. select gnomon.create_branch('agent/refunds');
  2. select gnomon.use('agent/refunds');
  3. -- Every query from here on runs on the branch
  4. update orders set status = 'refunded' where id = 4182;

Schema changes come along too. Run a migration on a branch to add a column, rename one or create a table, and main stays as it is until the merge, which brings the new shape and its data across together. Every pull request gets its own branch, with the rows and the schema it changed in a comment.

03

Review data like code

Every branch comes with a diff: each row and field it changed, before and after. Review it in your browser, comment on a single row and settle conflicts side by side. When an agent is done, Gnomon opens the review and sends you the link.

Add checks written in SQL, and Gnomon runs them on the merged result before the merge is allowed to land. An approval covers what you saw: if the branch changes afterwards, it comes back to you.

Example reviewTry it
agent/refunds→main3 changesWaiting for review
  1. orders4182statuspaidrefunded
  2. refundsnew rowamount129.00
  3. customers77credit0.00129.00

A refund never exceeds its order totalPassed on the branch

A review shows the change itself, not a description of it.
04

Merges that understand your data

When main and a branch change the same value, Gnomon doesn’t just pick a side. Counts add up, JSON merges key by key and text merges line by line. Anything that truly clashes becomes a conflict, for a person to settle or for a query to resolve.

Stock of one item · 1 bit = 1 unit
Taking either side would have lost a sale. The merge keeps both.

Branches merge into each other too, not only into main, and a single transaction can be picked from one branch onto another.

Undo works the same way. Take back one transaction, everything an agent did this afternoon, or a whole merge. Gnomon never overwrites a change made since; if one is in the way, it asks. And when you just want a table back the way it was at three o’clock, revert it to that moment.

05

Any moment, exactly as it was

Gnomon keeps the history of every table you track. Read the whole database as it was at any moment, with the queries you already have, and get the same answer every time. When an agent makes a decision, you can see exactly what it saw.

One table, a week of history · 1 bit = 1 rowNow
Drag to read the table at any moment in the last week. Red rows have changed since then.
SQLRead the past
  1. -- The open invoices at the end of October
  2. select gnomon.as_of('2026-10-31 23:59');
  3. select sum(amount) from invoices where status = 'open';

The same history streams out as it happens, to Kafka, NATS or a webhook, and into dbt as snapshots that keep deleted rows. Older history can move to object storage, and Gnomon brings it back when a query reaches that far.

06

Find the change that broke it

When a check that used to pass starts failing, Gnomon finds the transaction that broke it. It runs the check on the database as it was halfway between the last good moment and now, then halves what’s left, until one transaction remains: who made it, when and why.

Check: a refund never exceeds its order totalTry it
  1. Passed at 08:00, fails now64
  2. As of 13:10 · passes32
  3. As of 15:50 · fails16
  4. As of 14:30 · fails8
  5. As of 13:50 · passes4
  6. As of 14:10 · fails2
  7. As of 14:00 · passes1

Found in 6 steps: transaction 88137, by support-bot at 14:10, “Refund order 4182”. Undo just that one, and everything after it stays.

Each bit is one of the day’s transactions, in order. Each step runs the check at the middle of what’s left: a dark bit where it passed, a red outline where it failed.
ShellBisect a check
  1. # The first transaction after which the check fails
  2. gnomon bisect refund_within_total --good '2026-11-12 08:00'
07

Safe to hand to an agent

One command gives an agent a database role, a branch of its own and a connection string. That’s all it needs, whatever it’s built with. It reads and writes its branch, and the database refuses the rest, main included, even when the agent asks for it by name.

ShellMake an agent
  1. # A database role, a branch of its own and a connection string
  2. gnomon agent create support-bot
  • It merges only what you allow

    Merging is for the people you choose. Or let an agent merge on its own within rules you write, such as at most twenty rows, only these tables and every check passing. Postgres enforces them, whatever the agent is told.

  • Nothing leaves before you approve

    Emails, webhooks and payments an agent queues stay on its branch until the merge.

  • Every change has a name on it

    Each change records the agent, the run and the reason it gave. Ask which agent changed a price, and why.

  • Replay what it saw

    Gnomon records the moment of every read an agent makes. Replay a run and get back exactly the rows it read.

  • Try a few ways at once

    Start several attempts from the same moment, compare their changes and checks, and keep the best one.

  • Stop it, and take it back

    One command locks an agent out, closes its branches and undoes what it merged, newest first.

  • Ready for your agents

    The Gnomon MCP server, on the agent’s machine or over HTTP, lets it explore the schema, try a change without keeping it, and rewind its branch to a checkpoint.

08

Build it into your product

The TypeScript and Python SDKs give each task your agents take on a run: a branch of its own, with limits already set. Merge it, send it for review, or let it go.

TypeScriptA run
  1. import { Gnomon } from "@bitsinfra/gnomon";
  2. import { nodePostgres } from "@bitsinfra/gnomon/pg";
  3. const gnomon = new Gnomon({
  4. app: nodePostgres(appPool), // your application's own login
  5. runs: nodePostgres(runsPool), // one login shared by every agent run
  6. });
  7. // A branch for this task, discarded unless it's merged or submitted
  8. await using run = await gnomon.startRun({
  9. task: "Refund order 4182",
  10. actor: "support-bot",
  11. });
  12. await run.sql("update orders set status = 'refunded' where id = 4182");
  13. const { checks, changes } = await run.summary();
  14. if (checks.passed && changes.rows <= 20) await run.merge();
  15. else await run.submit({ title: "Refund order 4182" });

Runs can’t read each other’s branches, even when they share one database login. The Approve, Reject and Undo buttons in your own product call the same review.

Bring the agent framework you already use: the Anthropic SDK, the Claude Agent SDK, the Vercel AI SDK, the OpenAI Agents SDK, LangChain or any MCP client gets the same few tools, bound to one run. They work through your drivers and ORMs, from node-postgres and Prisma to psycopg and Django. And in your tests, each test gets its own branch of one seeded database and can check exactly what it changed.

09

Get started

Gnomon is open source under the PostgreSQL License. It runs on PostgreSQL 15 to 18, on your own servers or on managed Postgres such as Amazon RDS and Supabase.

create extension gnomon;

Or let gnomon init install it, track your tables and check the setup. There’s also a container image with everything switched on. The tutorial takes you through a branch, a review and an agent with its own connection string.

ShellAdd the SDK
  1. # TypeScript
  2. npm install @bitsinfra/gnomon
  3. # Python
  4. python -m pip install gnomon-postgres