Read the paper
When an AI agent makes a mistake in a database, what decides the damage?
on GitHub
Imagine you hire a new junior developer and, on day one, they accidentally run DROP TABLE in production. The damage isn't really about how smart or dumb the junior is — it's about whether your database has a rollback button, whether someone set up permissions correctly, and whether the engine even supports transactions. This paper makes that intuition rigorous for AI agents. The committed claim: when an AI agent makes a destructive mistake against a production database, the blast radius is determined more by the database engine's recovery capabilities and the permission configuration than by the model itself. The authors test this in two layers. Layer A is the controlled experiment — 22 canonical mistakes (think DROP TABLE, DELETE without WHERE, permission escalation) applied by script to four relational engines under five permission arms and two recovery arms, yielding 792 measurement cells and 874 recovery drill runs. No model in the loop, isolating the engine. Layer B unleashes a minimal tool-calling agent powered by six small open-weight models (4B–12B parameters, plus one 35B MoE) against nine engines — PostgreSQL, MySQL, SQLite, ClickHouse, Cassandra, MongoDB, Valkey, Kafka, and OpenSearch — generating 9,468 trials. A secondary run added MariaDB, Redis, and Elasticsearch (2,916 more trials), each behaving like its closest core sibling. The headline result lands on recovery, not prevention. Out of the box, the engines differ less in what a mistake destroys than in what they let you undo. PostgreSQL's transactional rollback and point-in-time recovery give you substantially more room to breathe than, say, Cassandra's eventual-consistency model or Kafka's append-only log. The permission arms matter too, but the engine's native recovery story is the stronger discriminator. This is a genuinely useful finding for anyone designing AI-agent-to-database architectures: your choice of engine and your recovery configuration are higher-leverage safety decisions than your choice of model. Integrity is the standout dimension. The study is preregistered at OSF, and the authors are almost aggressively transparent about where their hypotheses failed. Of seven preregistered hypotheses, only three met their decision rules — and of those, two were largely by construction. H5 was uninformable because agents never found the credential in the task. The post-hoc analyses (S1–S13) are explicitly labeled as exploratory and uncorrected for multiple comparisons. They even flag cases where their preregistered outcome measure and their original-row-loss measure disagree. This is what honest reporting looks like. The architectural family here is straightforward: tool-calling LLM agents (the kind that emit SQL or API calls via function-calling interfaces) tested against relational, document, key-value, streaming, and search engines. The models are deliberately small — this isn't about frontier capability but about what happens at the lower end of the capability spectrum where most cost-conscious deployments actually live. The hardware story is local serving, no cloud API dependencies. The ladder question is tricky because there isn't a clean prior-art baseline for this exact experiment. The closest work is ad-hoc incident reports and the growing literature on LLM tool-use safety, but nobody has previously run a preregistered, multi-engine, multi-model systematic test of database blast radius. This is genuinely a first-of-kind experimental design for this question, even if the individual components (LLM agents, database permissions, recovery drills) are well-understood. The obvious next experiment the authors didn't run: frontier models. The 4B–12B range is useful for cost-sensitive deployments, but the question everyone will ask is whether GPT-4-class or Claude-class models produce systematically different error distributions. The honest read is probably (a) — budget and local-serving constraints kept them at small open-weight models — combined with a methodological choice to hold the model variable less interesting than the engine variable. But the gap is real and someone will fill it.
The analogy
Think of a new hire who accidentally deletes a shared spreadsheet. The damage doesn't depend on how smart the hire is — it depends on whether the spreadsheet app has version history, whether someone restricted delete permissions, and whether there's a backup. This paper tests that exact logic for AI agents and databases, systematically.
New hire + spreadsheet
Accidental deletion damage depends on version history and permissions, not the person's intelligence
LLM agent + database
Blast radius depends on engine recovery capability and permission config, not the model's capability
Honest assessment
This is a methodologically rigorous first-of-kind experiment that answers a question everyone deploying AI agents against databases should care about: your engine choice and permission config matter more than your model choice for limiting blast radius. The integrity is exceptional — preregistered, transparent about failures, all data public. The main limitation is model scale: testing only 4B–12B models leaves the frontier-model question open. This isn't a theoretical contribution; it's an engineering contribution with immediate practical implications for anyone designing agent-to-database architectures.
What Is CLAIMS?
73
/ 100
BedrockNews applies a structured analytical framework called CLAIMS to academic papers and technical research releases.
How CLAIMS worksClaim
4/5
Ladder
2/5
Architecture
4/5
Integrity
5/5
Milestone
3/5
Successor
4/5
What is this paper actually committing to?
Genuine first: preregistered multi-engine, multi-model blast-radius test for AI database agents. No one has done this systematically before. The claim is scoped correctly — infrastructure over model intelligence.
The field fight
Should AI-agent database safety come from smarter models, guardrail layers, or more defensive infrastructure?
Side A
Better models will make fewer mistakes; focus on model alignment and capability
Held by: AI-agent framework developers, frontier labs
Side B
Infrastructure and permissions are higher-leverage; defense in depth beats model intelligence
Held by: Database reliability engineers, this paper
Milestone tracker
Unlocks: Answers whether frontier capability changes the blast-radius distribution or just the error frequency
Current
12
engines
this paper (4B-12B models)
Next
70B+
params
frontier model coverage
~1-2 years; requires API budget or donated compute
Verified Facts (8)
Layer A: 22 canonical mistakes applied to four relational engines under five permission arms and two recovery arms (792 cells; 874 drill runs including 10-minute repeats)
Layer B: 9,468 trials across six small open-weight models (4B to 12B parameters, plus one 35B MoE with about 3B active) and nine engines
Secondary run added MariaDB, Redis and Elasticsearch (2,916 trials); each behaved like its closest core engine
Three of seven preregistered hypotheses met their decision rule: H2 (for one of nine damage classes), H3 largely by construction, H4 only under its original measure
H5 was uninformative because agents never found the credential in its task
Post-hoc analyses S1-S13 are exploratory and uncorrected for multiple comparisons
Preregistered at https://osf.io/ms7ef
47 pages
Practical Implications (4)
When deploying AI agents against databases, invest more in engine selection and recovery configuration than in model capability for blast-radius reduction
PostgreSQL's transactional rollback and PITR provide substantially more safety headroom than eventually-consistent or append-only engines
Permission arms are a cheap, high-leverage safety control — restrict agent credentials to minimum viable privilege before worrying about model guardrails
The 22 canonical mistake library is immediately usable as a red-team checklist for any AI-database integration
More latest news
Read all