Letting AI agents touch your Postgres?
Some agent mistakes are permanent.BasaltDB makes them reversible.
Let your agent work on your real Postgres. It can't drop a table or change more than 50 rows at once, and if a whole job goes wrong, you undo that job. Anything your team or your app changed since stays as it is.
Free, Apache-2.0, built in public. No download yet: you build it from source.
Works with Supabase, RDS or a Postgres you host yourself, and any agent that supports MCP.
Illustration. Real output is JSON and plain text, and undo asks for your passkey.
Every change your agent makes
Saved so you can undo it, or it never runs.
BasaltDB checks every write before it touches your data. Everyday changes go through and are saved with their old values. Changes to the tables themselves, and bulk changes, are refused.
Saved, can be undone
Adding and updating rows. Every change keeps its old values for 30 days.
Never runs
Dropping or changing tables, or touching more than 50 rows at once. Those are yours to run.
Undo
Undo your agent's job. Keep everyone else's work.
A backup restore takes everything back to last night, including the orders your customers placed this morning. BasaltDB undoes only what the agent did. Rows your team or your app changed after it stay as they are, and you get a list of them.
Your data stays yours
Your data stays in your Postgres.
BasaltDB runs next to your agent and adds one schema, its own roles, and triggers on the tables you guard. It never copies your data anywhere. If you change your mind, basalt uninstall removes everything it added to your database.
Your Postgres
Supabase, RDS or self-hosted.
Your agent
Any agent that supports MCP, in a terminal or a chat.
Your code
Apache-2.0. Read it, run it, fork it.
What it won't catch
We'd rather tell you now.
BasaltDB catches what it can see in your database. Some mistakes happen elsewhere.
- A single change that's allowed but wrong. You can undo it, but nothing stops it first.
- Emails sent or payments made because of bad data.
- Data your agent already read and passed on somewhere else.
- Undo after 30 days. Old values are kept for 30 days.
- An agent that holds your own admin password.
- Time-critical or mission-critical systems. It isn't built for those.
Get started
Three steps on your own database.
- 1Build basalt
go build -o basalt ./cmd/basalt - 2Guard your database
basalt init - 3Connect your agent
basalt mcp --agent my_bot
The quickstart ends with you running the session from the top of this page on a sample table. Open the quickstart
Let your agent do the real work.
Build BasaltDB, point your agent at your database, and keep a way back.
BasaltDB · Apache-2.0