Guides

AI Assistant

Generate, explain, and fix SQL with Groq, OpenAI, Anthropic, Gemini, or a local Ollama model — with your keys encrypted at rest.

AI Assistant

Dora's AI assistant helps you write SQL from a description, explain an existing query, fix an error, or suggest indexes — with the connected schema as context. It works with a hosted provider (with an API key) or a fully local model.

Providers

ProviderNeeds an API key?Runs locally?
GroqYesNo
OpenAIYesNo
AnthropicYesNo
GeminiYesNo
OllamaNoYes

Groq is the default, using llama-3.3-70b-versatile — fast, with a generous free tier.

Configure a provider

Open Sidebar → AI keys, pick a provider, and add a key. You can name a key, Test it, and choose a model. Alternatively, set the matching environment variable before launching Dora and it is picked up automatically (a key saved in the app takes precedence):

ProviderEnvironment variable
GroqGROQ_API_KEY
OpenAIOPENAI_API_KEY
AnthropicANTHROPIC_API_KEY
GeminiGEMINI_API_KEY
Keys are encrypted at rest with AES-256-GCM; the master key lives in your OS keychain. See Credentials & security.

Run models locally with Ollama

Ollama runs models on your machine — no API key, and no data leaves your computer.

  1. Install Ollama (Dora can detect it and guide a managed install from Sidebar → AI keys → Ollama).
  2. Start it and pull a model: ollama pull llama3.2.
  3. Select Ollama as the provider. The default model is llama3.2.

Dora's built-in Ollama manager shows whether the server is running, lists and pulls models with live progress, and removes models you no longer need.

Use it

From the SQL Console or Data Studio, open the assistant and ask it to:

  • generate — "find users who haven't logged in for 30 days",
  • explain — paste a query and ask what it does,
  • fix — share a failing query and its error,
  • optimize — ask which indexes would help a query.