db-agent: open-source DBA toolkit and text-to-SQL agent
Read-only checks you run before an upgrade, a migration or another year of license and extended support fees. Each command writes a report you can hand to a manager. Plus the original open-source text-to-SQL agent.
Shown as a demo at the AAAI-25 workshop on open-source AI.
Who it's for
IT teams on SQL Server 2016 or 2017
Find out what an upgrade will break and what to do with each SSRS report, before you commit to a plan.
Databricks consulting partners
Run db-agent databricks health on your customers' workspaces and hand them the report. We train your team or add delivery capacity when you win the work.
Developers and data teams
Ask your database questions in plain English with the text-to-SQL agent, or connect it to Claude and other MCP clients through the MCP gateway.
What db-agent does today
Each command does one job, reads but never writes, and gives you a plain report.
SQL Server and SSRS check
db-agent sqlserver inventory | ssrs | validate | reportInventories a SQL Server and its SSRS reports, lists upgrade risks, sorts each report into move, review or retire, and compares results on the old and new server after a move.
Databricks workspace health
db-agent databricks healthChecks runtimes near end of support, legacy dependencies (Hive metastore, DBFS mounts, no-isolation clusters), DBU spend over time and spend waste.
Text-to-SQL agent and MCP gateway
db-agent mcp serve | mcp setupThe original db-agent: ask a question in plain English and get a validated SELECT. The MCP gateway connects it to MCP clients. Audit and report commands are included.
Postgres and MySQL upgrade readiness
Postgres and MySQL upgrade checkUpgrade readiness, with the cost of staying on versions in paid extended support on AWS RDS, Azure and Google Cloud SQL. Not built yet.
Install the DBA toolkit with the commands in the quick start below.
Still on SQL Server 2016? Start with an inventory
Microsoft ended extended support for SQL Server 2016 on July 14, 2026, and SQL Server 2017 follows on October 12, 2027. Before you upgrade you need to know what you have: how many databases, which features will break, and what to do with every SSRS report.
- Databases, tables, procedures, linked servers and Agent jobs listed from metadata
- Upgrade risks, each linked to the Microsoft page it comes from
- Every SSRS report marked move, review or retire, with the reason
- Old versus new server comparison after the move (row counts and totals only)
- One printable HTML summary and an Excel workbook
- Read-only login, nothing is changed and nothing leaves your network
Databricks workspace health
db-agent databricks health checks a workspace for runtimes near end of support, legacy dependencies (Hive metastore, DBFS mounts, no-isolation clusters), DBU spend over time and spend waste.
Databricks Runtime 14.3 LTS ends on February 1, 2027, so clusters still on it need a new runtime before then.
It is read-only and uses your Databricks CLI profile.
It has been live-tested on one small AWS workspace only. Run it on a non-production workspace first.
Read the Databricks health docsOpen-source text-to-SQL agent
Ask questions in plain English and get validated SQL that runs against Databricks Lakebase, Unity Catalog, Postgres, MySQL or Snowflake. Ships a Node.js/React app that deploys locally or natively to Databricks Apps, with a pluggable LLM endpoint for any OpenAI-compatible server.
The MCP gateway (db-agent mcp serve and db-agent mcp setup) connects the same agent to MCP clients.
The live demo runs on Render against a bundled sample dataset (customers, products, orders). Free-tier hosting: it sleeps after a few idle minutes, so the first question may take 30-60 seconds to wake it up.

Multi-data-plane
Query Databricks Lakebase (Postgres OLTP), Unity Catalog Delta (OLAP), Snowflake, and MySQL through one schema-aware agent. Lakehouse Federation joins handled at the warehouse, not in the agent.
SELECT-only safety guardrail
Every generated SQL statement is validated before execution. Blocks DROP, DELETE, UPDATE, INSERT, ALTER, plus Databricks-specific OPTIMIZE, VACUUM, and ZORDER. Word-boundary regex avoids false positives.
Pluggable LLM endpoint
One env var (LLM_BASE_URL) points the agent at Databricks Model Serving, OpenAI, Azure, GitHub Models, or a self-hosted vLLM server on a neo-cloud GPU. Swap inference providers without touching application code.
How it works
A deterministic pipeline: five steps in order, no autonomous loops, no surprise LLM bills. Every question produces exactly one LLM call and one SQL statement.
Schema
Reads INFORMATION_SCHEMA across all attached data planes.
Prompt
Schema-first prompt template, with types before query shape.
LLM
OpenAI-compatible POST. Returns structured JSON.
Validate
SELECT-only check. Blocks unsafe SQL before it runs.
Execute
Runs against the warehouse with a row-cap. Returns rows + SQL + explanation.
Quick start
DBA toolkit
Python 3.11 or newer. Output goes to a local folder.
pip install db-agent-kit # or from source: git clone https://github.com/db-agent/db-agent-kit cd db-agent-kit python3 -m venv .venv && .venv/bin/pip install -e . db-agent engines # SQL Server and SSRS (password: DBAGENT_SQL_PASSWORD or a prompt) db-agent sqlserver inventory --server sql01 --user dbagent_reader db-agent sqlserver report # Databricks databricks auth login --host https://<workspace>.cloud.databricks.com db-agent databricks health
Text-to-SQL agent
Clone the repo and run it locally with Ollama (no API key needed), or deploy straight to Databricks Apps.
git clone https://github.com/db-agent/db-agent cd db-agent/app ollama pull qwen2.5-coder:7b ./run_local.sh # open http://localhost:3001 # any OpenAI-compatible endpoint works instead of Ollama, # see app/.env.example for OpenAI, Groq, and Databricks Model Serving
Want the end-to-end Databricks Lakebase + Unity Catalog walkthrough? Open the companion lab
Frequently asked questions
What is db-agent?
Two open-source projects under one name: a read-only DBA toolkit CLI (SQL Server and SSRS, Databricks; Postgres and MySQL planned) and a text-to-SQL agent with an MCP gateway.
Is SQL Server 2016 still supported?
No. Microsoft ended extended support for SQL Server 2016 on July 14, 2026. SQL Server 2017 reaches end of support on October 12, 2027. Running an unsupported version means no security patches, which also matters for audits and cyber insurance.
Does db-agent change my databases?
No. The SQL Server checks are read-only, and the text-to-SQL agent only runs validated SELECT statements. The Databricks health check uses list and get calls and read-only queries on system tables. Use a dedicated login with read access only.
Does my data leave my network?
The SQL Server inventory sends nothing anywhere except to the servers you name. The Databricks health check reads workspace metadata and system tables only, using your own Databricks CLI profile. For text-to-SQL you choose the LLM endpoint, including a local model, so you decide where prompts go.
Which databases are supported?
DBA toolkit: SQL Server and SSRS, and Databricks workspaces. Postgres and MySQL upgrade checks are planned, not built. Text-to-SQL agent: Databricks Lakebase, Unity Catalog, Postgres, MySQL and Snowflake.
Is there a text-to-SQL version?
Yes. The original db-agent turns a plain-English question into a validated SELECT statement. The code is at https://github.com/db-agent/db-agent and there is a live demo at https://db-agent-pg42.onrender.com/.
Can consulting partners use it with their clients?
Yes. db-agent is Apache-2.0 and free. Run it on your clients' environments and hand them the report.
What does it cost?
db-agent is free and open source under Apache 2.0. If you want help running an upgrade or a migration, beCloudReady offers paid consulting and team workshops.
From the maintainer
Planning a SQL Server upgrade, or delivering Databricks work for clients?
We built these tools while doing the work. We can run the upgrade for a fixed price, or train your team and add delivery capacity on Databricks projects.