Release

BasaltDB 0.1.0-alpha: Your Agent Writes to Postgres, You Approve and Undo

BasaltDB sits between your AI agent and your own Postgres. In 0.1.0-alpha, setup, approvals and undo happen on pages in your browser, signed with your passkey.

The whole loop, sped up to 40 seconds. Claude Code is asked to make 20 lead names uppercase. BasaltDB holds the write, the approval page shows every row, a passkey signs it, and a second page puts the names back.

BasaltDB is a small open-source program that sits between your AI agent and your own Postgres. The agent still does the work. Small changes go through with the reason the agent gave. Bigger ones wait until you approve them with your passkey. Anything the agent changed can be undone later, and rows that you, your team or your app changed since stay as they are.

0.1.0-alpha is our first release. After you install it, you don’t type basalt commands yourself. Your agent runs them and sends you links, and setup, approvals and undo happen on pages in your browser.

What happens when the agent writes

Say you ask Claude to make the names in your leads table uppercase. It writes an UPDATE that changes 20 rows in your real database. Without BasaltDB, if that was the wrong call, you’re digging through a backup and hoping nothing else changed since. The video at the top shows the same request with BasaltDB in the way.

1. The write is held. Changing 20 rows is over the 10 that BasaltDB lets through on its own, so it stops the write and tells the agent why. The agent passes that on and sends you a link.

Claude Code in a terminal. After “update all name to uppercase”, the agent says the update would change 20 rows, above the 10 BasaltDB applies on its own, so it sent it for approval.

2. You see exactly what would change. The link opens a page on your own computer with the agent’s reason, the SQL, and every row before and after. Anything from 11 to 50 rows, and any delete, waits here. Bigger writes are refused.

The approval page: “Update 20 rows in public.leads”, the reason “Convert every lead name in public.leads to uppercase, as the user requested”, the UPDATE statement, and each row with the old name struck through and the new uppercase name highlighted.

You approve with your passkey: Touch ID, Face ID or a security key. Postgres checks the signature itself. The agent can deliver the link, but it can’t sign for you.

3. You can take it back. Ask the agent to undo it. You get a page listing every row that goes back. Nothing happens until you sign. You can undo one change, a whole run, or a task several agents worked on.

The undo page after signing: “Undo 20 rows that demo_bot changed”, the reason given, and the result “Reverted: 20 rows restored, 0 left as they are.”

“0 left as they are” is the count of rows someone changed after the agent did. Here, nobody had. If you had fixed one of those names by hand in the meantime, the undo would leave your fix alone.

Setup is one page

Ask your agent to run basalt init. Your computer asks for your password once, then a page opens on localhost:8787. You paste your database’s admin connection string, read the SQL it will run, and add a passkey. The box hides the string unless you press the eye, and pasting it runs the check. The string is used once and never stored, and your agent never sees it.

Before anything runs, the page asks: Is this your database? It shows the database name, the host, the user the string signs in as, and how its certificate was checked. If something on your computer tried to point BasaltDB at a database it controls, this is where you catch it.

Run basalt init again later and the same page checks what needs you: a guard update, a new database certificate, a passkey to add.

To remove BasaltDB, ask your agent. A page opens with what goes and one button. One press removes it from the database and from your computer, and the agent drops its own BasaltDB entry. Your tables and rows stay.

Agents on another computer

Some agents live on a server or a bot’s own machine that you never sit in front of. That agent runs basalt init --remote and sends you a link to the connect page on the BasaltVault portal. You finish setup there, on your phone or laptop. The agent never gets your database address, your table names or your password.

Approvals and undo for that agent come to the same portal. The page talks to the agent’s engine over an end-to-end encrypted session, shows you the engine’s fingerprint to compare, and hands back a receipt for your signature.

Also in this release

  • Verified connections to Supabase and RDS. BasaltDB checks the database’s certificate and host name by default, from built-in lists of each provider’s root certificates. The connection string Supabase gives you works as it is.
  • It keeps itself running. The engine restarts after a crash and tells your agent once a day when a newer release is out. After brew upgrade, your agent runs basalt init, which moves the engine onto the new build after one password dialog. A crash report stays on your machine, with your data scrubbed out.
  • The agent can take a request back. If you tell it to cancel an approval or an undo it sent you, it withdraws it, and the page then says the agent withdrew it and nothing changed.
  • Signed releases. Each release carries a Sigstore signature of its checksum file, so you can check a download came from the project’s own release workflow.

What it won’t catch

BasaltDB records and limits what an agent does in your database. It can’t tell that a valid one-row change is wrong for your business, and it can’t take back data an agent already read and sent somewhere. The full list is on one page.

Try it

brew install basaltdbhq/tap/basaltdb

Then ask your agent to run basalt init --demo. It sets up a sample table with 30 leads, so you can watch a write get held, approve it and undo it before you point BasaltDB at your own data.

The full list of changes is in the release notes. BasaltDB is free and open source under Apache-2.0.

If you tried 0.0.1

This is an alpha, and this release breaks the old setup on purpose. A 0.0.1 install can’t be updated in place, so 0.1.0-alpha replaces it. You don’t have to remove anything by hand.

  1. Homebrew installs BasaltDB as a cask now, not a formula. Run brew uninstall --formula basaltdb, then brew install basaltdbhq/tap/basaltdb.
  2. Ask your agent to run basalt init. Your computer’s password dialog opens, as on a first install. It moves the old setup to a .old folder next to it (nothing is deleted), removes the old engine service and sets the computer up again. Your agent prints a new basalt mcp --agent NAME line to register.
  3. The setup page opens and says This BasaltDB install is too old to update. It names what set the database up and what this release needs, then walks you through the normal setup. The last button, Remove the old install and set up, waits until you type the database’s name. Then it replaces the old install in one transaction. If setup fails, the old install is left as it was.

Your tables and rows stay. The old agents’ history and undo, their held approvals and their passkeys go, so you add a passkey again during setup. Delete the .old folder once the new setup works.

If basalt init can’t do it, for example over SSH with no password dialog, the removal guide has the steps and the SQL to do it by hand.