A geological database

Postgres your
agents can't destroy.

Every state preserved. Every change attributed. Every mistake reversible — by session, by agent, by minute. Sandstone is wire-compatible Postgres, indestructible by design.

Request access Read the docsprivate beta · limited slots
fig. 01 — cross-section
depth = timeretained: ∞

Each layer is a session. None of them are ever erased.

§02 — principles

Three properties your currentPostgres can't guarantee.

§02.1

Indestructible by design

DROP TABLEwrites a layer, doesn't lose data. Truncates, bad migrations, runaway updates — all recoverable down to the row, structurally. There is no “disable history” switch because history is the storage model.

§02.2

Agent-native connections

Every connection carries identity, session, and prompt as first-class metadata. Query “what did claude-code touch on Tuesday” as cleanly as you query “rows where status equals active.”

§02.3

Postgres-compatible wire

Speaks the Postgres protocol. Works with psql, Prisma, SQLAlchemy, Drizzle, anything. No driver changes. No new query language. The extras are extensions to the SQL you already write.

§03 — interface

Recovery is a query, not a ticket.

Sandstone exposes time, branches, and agent identity through the same SQL surface you already use. Connection variables tag every write. AS OF reads any past state. One stored procedure reverts a single agent session without touching legitimate writes around it.

No new client. No vendor lock at the protocol layer. If you ever need to leave, your data exports back to vanilla Postgres — with the history as a sibling schema you can keep or drop.

-- tag every write with agent identity
SET sandstone.agent     = 'claude-code';
SET sandstone.session   = '3a4f-deploy';
SET sandstone.prompt    = 'add email index to users';

-- read any moment of any table
SELECT * FROM users AS OF '2026-05-08 14:00';

-- selective revert: undo one session, nothing else
CALL sandstone.revert_session('3a4f-deploy');

-- branch a database in milliseconds, hand it to an agent
CALL sandstone.branch('main', 'agent-sandbox-9b21');
§04 — ask the strata

Questions that used to require forensics.

What did claude-code do in the last hour?
SELECT table_name, op, ts FROM sandstone.changes
WHERE agent = 'claude-code'
  AND ts > NOW() - '1 hour'::interval;
Show me the orders table at 9am Tuesday.
SELECT * FROM orders
AS OF '2026-05-05 09:00:00';
Undo the last thirty minutes — but only the agent writes.
CALL sandstone.revert_where(
  agent_pattern => 'agent:%',
  since         => NOW() - '30 min'::interval
);
Diff what cursor changed against what claude-code changed.
SELECT * FROM sandstone.diff_sessions(
  '9b21-refactor', '3a4f-deploy'
);

Built for the era when your code writes itself.

Private beta. Limited slots. Migration tooling included. We onboard ten teams a week.

soc 2 in flight · eu & us regions · managed or byo-postgres