AI Agents Overview
The AI agents are ten assistants for database work. Each does one job: review a change script, write a query, answer questions about a schema, diagnose an error, tune a query, write a rollback, trace what a change reaches, summarise a release, check compliance rules, or spot unusual script runs. An agent runs only when someone starts it, and every run is recorded.
Before you start
- Your license must include AI. Without it the AI routes are refused.
- An administrator chooses an AI provider under Settings → AI Configuration. Until then the AI Agents page says that AI is not set up, and agents that need the AI model fail with that message. Anomaly Detection with nothing to report, and a Compliance Check whose rules are all patterns, still work.
- An administrator can switch AI off, exclude tables and limit how much of a schema is sent. See AI Settings and Privacy.
Using the page
Open DB DevOps → AI Agents. Each agent is a tab; the arrow keys move between tabs. Fields marked * are required, and Run Agent stays disabled until they are filled; hover over it to see what is missing.
- Connection. When you choose one, the agent uses that connection's engine and reads its schema. Agents that can work without a connection ask for the engine instead; no engine is assumed.
- Pickers. Release Summary picks one of your releases and Anomaly Detection picks one of your scripts, so you never type ids or JSON.
- Result. The answer appears under the form. Advisories above it say when something was left out, for example tables excluded by an administrator. Next to the button, the last run shows how long it took, the tokens used and the model.
What each agent sends to the AI provider
| Agent | Read from your databases | Sent to the AI provider |
|---|---|---|
| Script Review | The schema, when a connection is chosen | The script, your notes, the engine and the schema summary |
| Natural Language → SQL | The schema | Your question and the schema summary |
| Schema Explorer Chat | The schema and its foreign keys | The conversation so far, the schema summary and the foreign keys |
| Error Diagnosis | The schema, when a connection is chosen | The SQL, the error message and the schema summary |
| Query Optimization | The query plan, read without running the query, and the schema | The query, its plan and the schema summary |
| Auto-Rollback Generation | Nothing | The forward script and your preconditions |
| Change Impact Analysis | The dependency graph of the objects the script changes | The script, the objects it changes and the objects that depend on them, with how each is linked |
| Release Summary Generator | The release's scripts and their past runs | Script names, environments, the first 4,000 characters of each script and the past run results |
| Compliance Check | Your compliance rules | Only for rules judged by the AI model: the rule and the script |
| Anomaly Detection | Recent script runs | Only when something is found: what was found, with script names |
The schema summary holds table names and, depending on the detail level, column names, types, lengths, nullability and defaults, on every engine: from the catalog on PostgreSQL, CockroachDB, TimescaleDB, MySQL, MariaDB, SQL Server and Oracle, and from the same reader Schema Ops snapshots use on the others, SQLite columns, MongoDB fields sampled from documents, Cassandra columns, Neo4j label properties, Elasticsearch mappings and Redis hash fields per key pattern. If the columns cannot be read, an advisory gives the reason and the agent receives names only. Excluded tables are never in it. Row data is sent only when an administrator turns on sample rows. Text you type and scripts you choose are sent as written, so a table you name in them is sent even if it is excluded.
Run history
Every run is recorded with the agent, who ran it, the connection, the model, the tokens, how long it took, whether it succeeded and a short description of the input and output, such as dialect=postgresql, 412c. Prompts and answers are not stored. The IDE's AI assistant, the AI review on approvals and blast radius narratives are recorded in the same way. You see your own runs; administrators see everyone's. If a run cannot be recorded, the answer carries an advisory saying so.
Queued runs
When an administrator sets the async mode to Always, runs are queued and the page waits for the answer. A run that has not finished after 5 minutes is cancelled, and the page says so. A run that stops part way, for example because the server restarted, is queued again after 10 minutes.