Article
News
June 8, 2026

We set out to build an AI DBA. First we had to build an AI agent for agentic AI itself.

Sanjay Agrawal
CEO, Co-founder of Revefi

Two incidents in late 2025 taught us a hard lesson: you can’t build a trustworthy agent on a foundation you don’t control, or can’t measure.

Everyone is racing to build agents that do real work. So were we. Our goal was easy to say and hard to do: an AI DBA that manages, optimizes, and operates cloud data platforms on its own, the way a great database administrator would.

Here’s what we learned along the way: the agent was the easy part. The hard part was everything underneath it. Two incidents made that painfully clear.

The night our AI DBA got slow, and we’d changed nothing

Late last year, we watched our AI DBA’s interactions visibly slow down. No deploy on our side. No config change. No new code. Nothing we did.

We root-caused it anyway. The culprit wasn’t us. It was a specific model from our LLM provider whose latency had jumped 5–10x, a change the provider attributed to their terms of use. Our agent was sitting there, patiently waiting on a model that had quietly gotten an order of magnitude slower overnight.

Incident 01 · Latency

5 – 10×

overnight spike in a single model’s latency — zero changes on our end

The fix was almost insulting in its simplicity: switch the model. But sit with it for a second. Our agent’s reliability was hostage to one model we didn’t own, on terms we didn’t set, with latency we couldn’t see until our customers felt it.

Remediation

Switch out the model — and never again depend on one we can’t observe and swap on the fly.

The day it tried to spend a fortune to save a little

The second incident was the opposite problem: not too passive, too ambitious.

On selected complex tasks, query optimization in particular, we caught our AI DBA firing 1M+ tokens at the LLM to crack a single problem. It wasn’t wrong, exactly. It was thorough. It just had no sense of whether the problem was worth that much compute in the first place.

Incident 02 · Token economics

1M+

tokens fired at the LLM for a single optimization task

An agent with no economic judgment will happily burn more than it saves. That isn’t intelligence — it’s enthusiasm. A good DBA knows that a “thorough” answer that costs more than the problem is the wrong answer.

Remediation

Tie the work done to the ROI of the problem. Before the agent goes deep, it asks: what is solving this actually worth?


The moment we wired ROI into the loop, the behavior changed. The agent stopped treating every problem like a research project and started spending like it had a budget, because now it did.

These were never DBA problems. They were agent problems.

Notice what neither of those stories was actually about: databases. Swap “AI DBA” for any serious agent doing real work, and the plot is identical. Which model? At what latency? At what cost? And was the work even worth doing?

So we stopped treating them as one-off fires and built the layer underneath the DBA: an AI agent for agentic AI itself. The building blocks every trustworthy agent needs, ours included: auto model selection, prompt optimization, automated ROI of work, observability, token economics, and governance.

Get the foundation right, and the agent gets easy. Every lesson from those two incidents is now a capability — not a patch we bolted on, but a layer the agent stands on.

But a great DBA needs more than a great agent

Here’s the part that’s easy to miss, and it’s the most important one. That foundation makes our AI DBA trustworthy. It doesn’t make it a DBA.

What makes it a DBA is innate, hard-won expertise: the things a senior administrator carries in their head and never has to look up. The architecture of each warehouse. How each one bills consumption (credits, DBUs, slots, nodes) because on consumption-based pricing, the “thorough” query plan is often the expensive one. And the no-no’s: the specific things you simply do not do on a given platform, because they’re cheap on one and ruinous on another.

You don’t solve a Snowflake problem the way you’d solve a BigQuery one. An agent that doesn’t know that in its bones isn’t a DBA. It’s a very confident intern with a corporate card.


One foundation without the other doesn’t get you there. Agentic intelligence with no data expertise is a clever bot loose in your warehouse. Deep data expertise with no agentic foundation is a great tool that still needs a human babysitting every model call and every dollar. The AI DBA needs both, and that’s exactly what we built.

“The best AI embodies the human, not the other way around.”

— Sanjay Agrawal, Co-Founder & CEO, Revefi


We didn’t read about these problems in a paper. We hit them, in production, with our own agent. And every fix became part of the foundation our AI DBA now runs on: the same foundation we’re opening up so you can build and trust agents of your own.

Because that’s the quiet truth of this whole agentic moment: the model is the easy part. The judgment underneath it, what to run, on which model, at what cost, and whether it’s worth doing at all, is the product.

Sanjay Agrawal
CEO, Co-founder of Revefi
Sanjay founded Revefi using his deep expertise in databases, AI insights, and scalable systems. Sanjay also has multiple awards in data engineering to his name. With over 20 years of experience, Sanjay boasts a rich background in organizational leadership and a deep expertise in enterprise systems, covering high-performance databases, analytics, learning, and data recommendation systems. He was instrumental in shaping ThoughtSpot from its inception. Sanjay has spent many years at Microsoft Research working on topics related to automated SQL optimization and worked on various innovations at Google.
Blog FAQs
Why does an AI agent need its own “agentic foundation” instead of just a good model?
Because the model is the easy part. Two production incidents showed that an agent’s reliability depends on things the model alone doesn’t handle: which model is running, at what latency, at what cost, and whether the work is even worth doing. The agentic foundation supplies auto model selection, prompt optimization, automated ROI of work, observability, token economics, and governance, so the agent can be trusted in production.
What happened when the AI DBA suddenly got slow?
A specific model from our LLM provider had its latency jump 5 to 10x overnight, with no deploy or config change on our side. The agent sat there waiting on a model that had quietly gotten an order of magnitude slower. The immediate fix was to switch the model, and the lasting lesson was to never again depend on a model we can’t observe in real time and swap on the fly.
How did you stop the agent from overspending on tokens?
On complex tasks like query optimization, the agent was firing more than a million tokens at a single problem with no sense of whether it was worth it. We tied the work done to the ROI of the problem, so before the agent goes deep it asks what solving the problem is actually worth. Once it had a budget, it stopped treating every problem like a research project.
What’s the difference between the data foundation and the agentic AI foundation?
The agentic AI foundation is what makes the agent trustworthy: auto model selection, prompt optimization, automated ROI of work, observability, and governance. The data foundation is what makes it an actual DBA: warehouse architecture, consumption-based pricing across credits, DBUs, slots, and nodes, platform-specific no-no’s, and query and resource tuning. The AI DBA needs both.
Why can’t the same approach solve a Snowflake and a BigQuery problem?
Each platform bills consumption differently and has its own no-no’s, so a plan that’s cheap on one can be ruinous on another. A senior DBA carries that platform-specific judgment in their head, and an agent without it is a very confident intern with a corporate card. The AI DBA pairs deep data expertise with the agentic foundation so it applies the right approach for each platform.