I’m sure you’ve seen one of those social media posts about “my AI agent deleted my database.” They keep happening again and again and again, and each time it does, we share it around the office and we’re just agog.
We know as an industry how to prevent this problem. We’ve known how to prevent it from day one, and it’s the exact same way you protect your database from any errant tool, or from an inexperienced intern, or an unauthenticated user: you don’t give them write access to the data in the first place.
But people keep doing it. Either because they can’t be bothered to make data replicas, or because they’re convinced that guardrail instructions are sufficient to keep their agent from misbehaving, or because they want the agent to be able to make changes to their database and lack a good way to review or test those changes before they land.
To be fair, there’s currently not a standard way to achieve that last bit. But we think that Dolt is a pretty good candidate. It’s our SQL database with Git-style version control, which is a killer feature if you’re giving agents access to your database.
To see how much version control helps, think about how much rarer it is to hear about an AI deleting someone’s codebase. It’s happens, but it’s not nearly as common, and usually it’s because the victim wasn’t using any version control. Simply having a git remote is enough to make that kind of data loss impossible.
Isolation and Change Review#
Version control is more than just data protection; by having an agent work in a separate code branch, the user responsible for that agent can review and diff the code changes, and then make an informed decision about whether or not to merge them, discard them, or request further changes. The usefulness of version control for coding agents is so universally understood that many agent harnesses have version control workflows built in.
But most people don’t version control their database, only their code. Even though they really should. I’m not going to advocate whether or not you should give an AI agent direct access to your database. But if you’re going to do it anyway, you need isolation. You need auditing. And you need the ability to diff and review changes.
Dolt accomplishes all of those. You can create an isolated branch for each agent, and create a database role that only has access to that branch, and can’t invoke any of Dolt’s version control functionality. Then you can spun up a SQL server and point your agent at it, and you’ll have total confidence that no matter what changes the agent makes, you’ll be able to review them before they can affect any other branch.
Dolt isn’t a full agent sandbox on its own, but it can be a powerful component in a full sandbox solution. And we recently learned about PRAT, a project by Matthew Summers which is attempting to do just that.
An Overview of PRAT#
PRAT is a harness for AI agents, similar to Claude Code et al. But instead of the typical chat-style interface, the user defines structured tasks, called “cards”. Each card defines the resources that should be available for the task, and PRAT creates a sandbox that isolates the agent from unauthorized resources while only providing access to version controlled branches of authorized resources. The goal is to only allow the agent to make changes to its local environment, which can then be reviewed via pull request.
Full disclaimer: PRAT is prerelease software. It doesn’t currently achieve the full database sandboxing I described above, although that’s on its roadmap. As it currently stands, the way that PRAT uses Dolt is a lot closer to guardrail instructions than enforced isolation. Given that agents can and do ignore guardrails, you current shouldn’t use PRAT yet for any data you’re not prepared to lose.
But with that out of the way, I think that PRAT is at least worth understanding and discussing.
The Good#
The mechanisms by which PRAT achieves its sandboxing are pretty straightforward:
- Most commands executed by the agent run in a Docker container. This prevents the agent from interacting with other processes on the host machine, or accessing files outside of the project root. The container is configured to have no network access by default.
- Your project exists in a Git repo on the host machine. PRAT clones the repo and the agent works on the downstream clone. Git runs on the host machine, but uses both a custom Git configuration and Git hooks to block most operations. For example, the agent can fetch changes from upstream but cannot push.
- PRAT runs a Dolt SQL server with a branch per-agent. Currently, the agent connects to the Dolt server with the same credentials as the user, meaning that the agent could potentially write SQL statements that modify other branches or run version control operations. In the future, PRAT plans to leverage Dolt’s role permissions to prevent this.
When a user creates a card, they enumerate the scripts that the agent is allowed to invoke, such as build, lint, and test hooks. Then each card is given its own isolated environment. When the agent completes the task, the harness can validate the test hooks against the current state of the environment. Then the produced artifacts (the Git diff, the Dolt diff, and the log journal) can be manually reviewed and collectively merged or rejected.
I like this design a lot because it minimizes the trust placed in the agent. When the agent is responsible for running tests and summarizing its own behavior, users don’t have guarentees that these summaries are accurate, or that no additional changes were made between running the tests and the user review.
The Ugly#
The general design of PRAT is great. It’s exactly in line with what I had imagined for a Dolt-powered sandbox. But I’m not completely sold on it yet.
Some of this might be because PRAT is prerelease software. It’s not fair to judge prerelease software with release standards. But given that Matthew has been promoting PRAT himself on LinkedIn, I figure he’s ready to get some eyeballs on it, so I figure it was fair game for me to make my own assessment.
My main concern is about the documentation: namely, there’s a lot of it, and it’s pretty obviously AI-generated with minimal human review. I’ve been blunt in the past about how good documentation needs to be human-edited, for two reasons:
- Good documentation is concise and targeted, and that often requires an editor with a firm grasp on the project’s design.
- In an age where generated text and code is cheap, anything clearly human made is demonstrable proof of real effort and intent behind the project. It’s like “proof of work” for meatspace.
At its worst, the documentation has a disorganized, laundry-list-of-features writing style typical of AI text. This can create the impression of software bloat and a lack of real design or structure. Regardless of whether that impression is accurate, it nearly turned me off from the project, and I would encourage any developer who is actively promoting their project to manually edit their documentation with this in mind.
For a more serious example, remember how I mentioned that PRAT currently doesn’t enforce database isolation and instead gives the agent the full database permissions of the user? That’s a pretty important disclaimer and should probably appear in the project’s README. But it doesn’t. Instead, the README creates a false impression of safety by promising that PRAT is “in daily use on real projects” with a single throwaway mention that per-card database users are coming later. This is another place where human review would have helped.
Overall Impressions#
Like I said, I think that the high-level design of PRAT makes a ton of sense. At the same time, the quality of the documentation gave me some pause and made the project feel bloated even though it’s currently in a pre-release state. I think that manual editing of the documentation could go a long way to combatting that impression. But this is also a pretty subjective take, so readers should feel free to check out the project themselves and form their own opinions.
In any case, I’m very excited to see how the project develops.
If you have your own thoughts and opinions about PRAT or agentic coding or sandboxing or version control, or if you just want to come by and say hello, you can always join our Discord and chat with the whole Dolt team.