Insert an AI suggestion into the editor
When the assistant’s answer contains a code block, DevOpsPad shows an Insert into editor button under it. Click it to put the query into the active tab, read it, then run it yourself with Run query or ⌘ / Ctrl + Enter. Nothing the assistant writes runs on its own.
Ask for a query
- Open the assistant with AI assistant in the header. It shows the connection you are working on.
- Type a question in Message DevOpsPad… and press Enter to send. Shift + Enter adds a new line.
- Or click one of the starters: Summarize the available resources, Help me write a query, or Explain how to explore this database.
For better answers, check Include resource names so the model knows your table, collection or topic names. See What DevOpsPad sends to the AI provider.
Insert the suggestion
Each fenced code block in the answer is shown separately with Insert into editor.
- With a query tab open, the code replaces the text in that tab and DevOpsPad switches to the workbench with the message “Suggestion inserted. Review it before running.” Save anything you want to keep from the tab first.
- With no tab open but a connection selected, DevOpsPad opens a new tab named AI suggestion with the code.
- With no connection selected, it asks you to open a connection first.
Open current query in the assistant takes you back to the active tab.
Review before running
Check the suggestion the same way you would check a colleague’s query:
- Do the table, column, key or resource names exist? The model sees names only if you shared them, and never sees columns.
- Is it scoped? Add
LIMIT, aWHEREclause or a namespace. - Does it fit the engine’s format? Redis needs an allowlisted command, MongoDB a JSON
finddocument, Kubernetesget <resource> [namespace].
The query workspace limits what a suggestion could do: ClickHouse runs with readonly=1, Redis accepts only an allowlist of read commands, MongoDB only runs find, and cluster tabs only list. MySQL runs in a read-only transaction, which blocks data changes but not DDL such as DROP TABLE, because MySQL commits DDL implicitly outside the transaction. The real protection is a read-only database account; see Create least-privilege accounts and What is read-only in DevOpsPad.
Limits
- Answers are not streamed; you see the full reply when it arrives (60-second timeout).
- Follow-up questions do not include earlier messages. Repeat the context you need.
- The assistant cannot read your query results, so it cannot explain specific rows unless you paste them in.
Frequently asked questions
Can the AI assistant run queries on my database?
No. The assistant can only put text into the editor. A query runs only when you click Run query or press Cmd or Ctrl+Enter.