AI Assistant
The assistant answers questions about your database, writes SQL, and in Agent Mode does multi-step work for you. It never changes your database without your approval.
Set up a provider
The assistant uses your own AI provider and key. Open the assistant panel with Alt A (web) or ⌘ ⇧ A (desktop) and follow Quick setup, or go to Settings → AI.
| Provider | What you need |
|---|---|
| OpenAI | API key |
| Anthropic | API key |
| Google Gemini | API key |
| Groq | API key |
| Ollama | URL of your Ollama server, for example http://localhost:11434. No key. |
Any server with an OpenAI-compatible API, such as a local llama.cpp or LM Studio server, works through the OpenAI provider with a custom URL.
Pick a model after the provider is saved. The model picker shows whether each model supports tool calls. Agent Mode and database lookups need a model with tools.
API keys are stored encrypted. On a shared server each user sets up their own provider, and an admin can limit who may do that. See Authentication and users.
Ask and Agent modes
Switch modes in the bar above the message box.
| Mode | What it can do |
|---|---|
| Ask | Answers and read-only lookups. Never changes the database. |
| Agent | Multi-step work. Can propose schema changes and write statements, which you review before they run. |
What the assistant can do in your database
| Action | Ask | Agent |
|---|---|---|
| List tables and views | Yes | Yes |
| Describe a table | Yes | Yes |
| Run a read-only query (at most 100 rows, 10-second timeout) | Yes | Yes |
| Propose a schema change | No | Yes, you review it on a diagram |
Request an INSERT, UPDATE, DELETE, or DDL statement | No | Yes, you confirm each one |
Each step appears in the chat as a card that shows what ran and what came back. Open query results in the data grid or copy them as CSV.
Agent Mode
In Agent Mode the assistant can plan a change across several steps. It still cannot run a write on its own:
- Schema changes open as a pending changeset on the diagram. Click Review & apply to see the SQL and run it, or Reject.
- Writes appear as a card that shows the exact statement. Click Confirm & run, or reject it. Each card works once.
UPDATEorDELETEwithout aWHEREclause,DROP, andTRUNCATEare always refused. Run those yourself in the SQL editor.
Confirmed writes go through the connection's Safe Mode, so a protected connection still asks for your password.
Agent workspace
For longer work, click Expand to Agent in the assistant panel, or press Alt ⇧ E (web) / ⌘ ⇧ E (desktop). The chat opens full screen with your sessions listed on the left and a connection switcher at the top.
Click Back to DBO or press Esc to return. Your tabs and editor text are exactly as you left them, and the panel shows the same chat. While a reply is streaming, the first Esc stops it.
Context
The assistant knows which database, schema, and tables you are looking at. By default the context follows the explorer. Click the context chip to pin it, so it stays the same while you browse elsewhere. The token estimate next to it shows roughly how much context goes with your next message.
Chats
- Every conversation is saved per connection. Open History in the panel to search, pin, export as Markdown, or delete chats.
- Press
↑in an empty message box to edit your last message. - Regenerate asks again. Copy answer copies the reply.
In the editor and forms
- In the SQL editor, right-click selected SQL for Explain selection or Fix selection.
- In table and view forms, Suggest definition drafts the object from a short description.
MCP server
DBO Studio can expose your connections to external AI tools, such as Cursor, Claude Desktop, and GitHub Copilot in VS Code, through the Model Context Protocol.
- Go to Settings → AI → MCP server and enable it.
- Copy the configuration for your client and paste it into that tool's MCP settings.
- Regenerate the token if it leaks. The old token stops working right away.
MCP queries are read-only and limited in size. Even so, anything that can reach the endpoint with the token can read your databases. Prefer connections whose database user only has read access.
On a self-hosted server, MCP uses the public URL. See Configuration.
Privacy
Your messages, plus table and column names from the context, go to the AI provider you configured. Query results the assistant fetches go to the provider as well. Use a local model through Ollama if data must not leave your network.