Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>SQL AI AgentNew to Visual Studio Code? Get it now.
SQL AI Agent

SQL AI Agent

Ednoer

|
2 installs
| (0) | Free
Azure Data Studio only. Ask questions about your SQL Server databases using Claude, ChatGPT, DeepSeek, Qwen or any OpenAI-compatible model.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

SQL AI Agent for Azure Data Studio

A chat panel in Azure Data Studio that answers questions about your SQL Server databases. The agent reads your schema, tables, views, stored procedures, functions and triggers through the connections you already have, runs read-only queries, and writes SQL you can open straight in a query editor. Use it with Claude, ChatGPT, DeepSeek, Qwen, Gemini, a local Ollama model, or any OpenAI-compatible API.

Azure Data Studio only. This extension does not work in Visual Studio Code. If you install it there, it only shows a notice and you can uninstall it.

Microsoft retired Azure Data Studio on February 28, 2026. This extension keeps working in installed copies of Azure Data Studio (version 1.40 or later), but Azure Data Studio itself no longer receives updates.

Install

Azure Data Studio does not search this Marketplace, so the extension will not appear in its Extensions view, and this page has no download button.

  1. Open this download link in your browser. It saves the latest .vsix file. With curl, add --compressed, otherwise the saved file is still gzip-wrapped and Azure Data Studio cannot install it.
  2. In Azure Data Studio, open Extensions, click the ... menu, choose Install from VSIX, and pick the downloaded file.
  3. Reload Azure Data Studio when it asks.

Getting started

  1. Open SQL AI Agent from the activity bar.
  2. Click the AI providers button at the top of the panel, then the key button next to a provider to enter its API key. Ollama runs locally and needs no key: click its sync button to load the models you have installed.
  3. Choose a connection from the list at the top of the panel, or click Add connection. Saved connections connect when you select them.
  4. Type a question, for example "Which tables store invoices, and how are they related?"

What you can ask it to do

Explore a database

  • The agent lists tables, views, procedures, functions and triggers; describes columns, keys and indexes; reads the source of procedures, functions, views and triggers; traces which objects use which; and searches columns by name across tables.
  • It runs SELECT queries to look at real rows. Results appear as a table you can copy into Excel (tab-separated) or reopen as a query.
  • Click the editor button in the message box to include the SQL from your active query editor. If you selected text, only the selection is sent.

Work from menus

  • Right-click in a query editor: Explain Query, Optimize Query and Review Query with SQL AI Agent, or Ask SQL AI Agent About This SQL to type your own question. Explain also runs with Cmd+Alt+E on macOS and Ctrl+Alt+E on Windows and Linux.
  • Right-click in the SERVERS panel: Explain with SQL AI Agent on tables, views, procedures, functions and triggers; Write SELECT with SQL AI Agent on tables and views; Summarize Database with SQL AI Agent on databases.

Use the SQL it writes

  • Every SQL block in an answer can be opened in a new query editor (already connected to the selected connection), inserted into your active editor, or copied.

Choose the model

  • Presets are included for Anthropic (Claude), OpenAI (ChatGPT), DeepSeek, Qwen (Alibaba DashScope), Google Gemini, OpenRouter and Ollama.
  • Add any other OpenAI-compatible API (Groq, Mistral, LM Studio, vLLM, a server inside your company) with its base URL, model IDs and API key.
  • The sync button next to a provider loads its model list from the provider's /models endpoint, so you pick models instead of typing IDs.
  • You can switch model or provider in the middle of a conversation.
  • The effort selector appears for Anthropic models, and for OpenAI-compatible providers where you turned on "Send effort as reasoning_effort".

Keep track

  • The last 100 conversations are saved and can be reopened or deleted from History.
  • Each answer shows how many tokens it used, including tokens read from the provider's cache.

Your data and safety

  • Read-only by default: the agent runs only SELECT and WITH queries. The lock button in the message box allows other statements, and each one still asks for your confirmation before it runs.
  • The read-only check looks at SQL keywords, so treat it as a first layer only. For important servers, connect with a login that can only read (db_datareader plus VIEW DEFINITION).
  • Query results the agent reads are sent to the provider you selected, up to claudeAgent.maxRows rows per query (200 by default). For sensitive data, use a local model through Ollama or a provider your company has approved.
  • API keys are stored in Azure Data Studio's secret storage (the Keychain on macOS), one per provider. You enter them in Azure Data Studio's own password box, never in the chat panel.

Requirements and limits

  • Azure Data Studio 1.40 or later.
  • SQL Server connections (MSSQL provider) only.
  • The model must support tool calling (function calling). Small local models sometimes call tools incorrectly.
  • run_query returns one result set per call and does not accept GO.

Build from source

npm install
npm run package

Install the generated .vsix in Azure Data Studio with Extensions, then the ... menu, then Install from VSIX. CONTRIBUTING.md in the source folder describes how the code is organized.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft