Over the past few weeks, I’ve been vibing with a couple of websites for my hobbies. Not gonna lie, back in the pre-AI boom, I was also that software engineer guy who bought a lot of domains and had a lot of ideas piling up,

And thanks to AI, I’ve already made a couple of them come alive — though no users 😂. I can share all the websites and apps that I have built (and have been planning for years after buying the domain) in a separate post.
Recently, I completed an app, and thanks to AI, development has never been this easy. And because of that, I’ve become addicted and started getting lazy.
It’s just very convenient to do everything through AI now. Development, Triaging issues, Testing, Monitoring, etc. MCP is everywhere; I just need to connect it through my agents, either locally or from the cloud. So I connect all my setups to an MCP and check it through my local agents, eg, Claude Code.
But…, here’s the thing: no matter how clever the model is, I’m still a bit hesitant to give my AI agents access to my database. There are a couple of reasons
- Disaster-level and irreversible. For a vibe coder/solo builder like myself, I don’t have enough budget to do a full setup for database reliability (e.g., snapshots, etc.), though if I use Supabase, it’s probably possible for a cheaper fee. But anyway, changes in the DB are irreversible; one wrong action, and you lose everything.
- PII and sensitive data handling. I still don’t trust all those AI providers, Google, OpenAI, Anthropic, etc. And I’m not really comfortable giving them access to all PII data in my system. So no, this is also one of the most important reasons why I don’t give AI access to my production database.
Solutions?
I’m sorry, but you might see this as yet another “marketing” post, or yet another vibe-coder post. You’re right; I apologize. I’m a software engineer and know nothing about marketing. I did a couple of blog posts for years, even before the AI boom, so here I am writing yet another one.
So, to solve the 2 problems I mentioned above, basically the reluctance to give access to the AI provider, I built an open-source tool for myself.
I tried a couple of tools, like LiteLLM; they have a plugin to protect PII (Presidio), but there’s no option for it to write access to the DB. Well, from the principle, it’s the wrong tool/direction; even if I open a PR to the repo for DB access, it would be a different vision, and LiteLLM would lose direction. Another tool I tried, dbhub, is promising, but again, from their vision, they’re focused on read-only mode. So no, I need write access too.
Introducing BasaltDB:
Make agent mistakes reversible. Let AI agents work on your real Postgres. Approve the risky changes. Undo the bad ones.
Fancy, isn’t it? The tagline looks expensive! 😂 Jokes aside, as the tagline claims, I’m trying to solve the 2 core problems I mentioned above, with (now) 3 core functionalities of BasaltDB:
- Record all changes made by your AI agent in your own database.
- Approve risky changes with a passkey
- Revert all changes with a passkey.
BasaltDB is a small, open-source program that sits between your AI agent and your database. It will run a mini MCP server closer to your agent. It becomes the foundation for your agent to write to and read from your actual database.
A glimpse of how it works is shown below in this GIF (please wait until it’s fully loaded for the best experience).

1. Record all changes made by your AI agent in your own database.
All these write operations go directly to the database; they stay in the database itself. In this case, if I have a Postgres instance in Supabase, all changes my agent makes will be recorded in that database under the basalt_meta schema. So, my data will still survive, not in any other Agent memory, but closer to the data source itself.
Currently, retention is 30 days for revert, meaning I can still revert all actions for the next 30 days after the agent runs. After 30 days, the delta (the values that changed) will be deleted; basalt_meta will only keep the historical metadata (e.g., which agent, table, and type of change) for 1 year.
2. Approve Risky Changes With Your Own Passkey

One of the key features of BasaltDB is that, for every risky change, it will ask for human approval. Approval currently uses the passkey configured during setup. For people who use a MacBook, it will be just like using Touch ID to approve the request from your agent for risky changes

This passkey is configured during setup. And you will use it for every risky change and revert. If your device doesn’t have Touch ID, you can use your computer/laptop password by default. Or can use a mobile device through Chrome.
3. Revert All Changes With Your Own Passkey

Another core feature I mentioned is the ability to revert changes made by your AI agent. It gives us extra assurance that mistakes can be reverted.
But the caveat is that if you have a database trigger that, e.g., triggers a webhook, you won’t be able to revert that. In my experience, having a webhook on a database change directly is an anti-pattern; usually people don’t do that. So I think it’s still okay as a limitation.
How to use it?
Now, I have told you what the core features of BasaltDB (per current version v0.1.0-alpha) are, but how do you use it?
Easy: just go to our GitHub repository here, https://github.com/BasaltDBHq/BasaltDB; we put the steps on how to use it.
Or simply, just,
brew install basaltdbhq/tap/basaltdb
On Linux, you can also use the .deb or .rpm from Releases. Then in your Claude Code, Codex, OpenCode, etc., just tell them to run basalt init.
Initialize basalt with basalt init
It will open a browser (if not, it will give your agent a URL that you can open in a browser). You will need admin access to your Postgres, once, during the setup.
What’s Next: the Roadmap!
With this post, I’m releasing the second version, v0.1.0-alpha (previous version was v0.0.1-alpha). There are a couple of stuff that I will need to build for the long term, or at least for v1.0.0.
- Fixing any visible bugs and making it stable for the first release.
- PII Masking, as of the date I’m writing this. I’m still building the PII masking system on BasaltDB. Planned for v0.2.0-alpha. Stay tuned, and watch the GitHub repository for new releases.
- Cloud agent harness: some people have agents on their own VM, or maybe an in-house setup with a local mini PC to run a local agent. I’ll be targeting them as my main users. If you are one of them, let me know; maybe we can collaborate.
- More Data Storage, eg, MySQL and MongoDB: I’m open to any contribution, PR, or issue (idea) from anyone who is interested in building this 🎉
- Any feature request: if you have something that could be a BasaltDB use case, let’s talk here or on the GitHub repository: https://github.com/BasaltDBHq/BasaltDB. Raise an issue, and we can start building together.
Bonus: A fun fact when building BasaltDB
- I reached the all-time high commit history of my 10-year career as a software engineer in 1 day. I recorded 1117 commits in 1 day when building this.

- Also, I set an all-time high in my 10-year career for additions (942K) and deletions (610K) in just 1 month 😂.

👆This screenshot is the real meme of “Tell me you’re a vibe coder without telling me you’re a vibe coder”. This happens because of the back-to-back refactor that I did. In the first version, it works at a minimum, but when I check the code, yikes… I have to refactor this! And ended up doing refactoring for a week.