Datasette Agent Runs on Local Qwen 27B Without the Cloud via LM Studio and Ollama
Datasette is a tool for working with databases, and its chat agent, which writes SQL on its own, now runs on a local 27-billion-parameter Qwen model with no cloud involved. The datasette-llm 0.1a11 plugin connects to LM Studio, Ollama, and llama.cpp, programs that run a neural network on your machine and accept requests in the OpenAI format. In a demo, the agent counted 200 repositories and 1889 releases in the database. Private data can be explored entirely with a SQL agent running on your own hardware.
AI-processed from Simon Willison; edited by Hamidun News
Imagine you have a database of customers, logs, or a CRM export, and you want to ask it questions in plain language: "How many orders did we get this month?" A neural network writes the SQL query itself and returns the answer. But many people are not ready to send such data to a cloud service.
The new release of the datasette-llm 0.1a11 plugin by Simon Willison solves exactly this problem. Datasette is an open-source tool for browsing and exploring databases, and it has a chat agent, datasette-agent, which looks at the list of tables and writes SQL on its own.
Now this agent can run on a Qwen model with 27 billion parameters that works on your own computer. The connection goes through LM Studio, Ollama, or llama.cpp.
These are programs that run a neural network locally and accept requests in the OpenAI format, which is why they are called OpenAI-compatible.
What changed in datasette-llm
datasette-llm acts as an intermediate layer. It stores settings for large language models (LLMs), and other Datasette plugins pull them from there. Previously, the choice of models was limited to what the plugin supported. Version 0.1a11 adds support for OpenAI-compatible endpoints. This term refers to servers that understand requests in the same format as the OpenAI API. That format has long since become an informal standard, so many different programs accept it, including LM Studio, Ollama, and llama.cpp. According to the author, llama.cpp has just reached version 1.0.0.
Because the protocol is shared, Datasette is no longer tied to a specific provider. Any model that responds at the right address will work, whether it runs on the computer on your desk or on a server in another country.
How it looks in practice
In the example from the release, everything starts with a single command through the uv package manager. First, a test database, content.db, is downloaded from datasette.io. Then uvx starts Datasette together with the datasette-agent plugin. In the settings, three fields define default_model:
- model: the internal name under which the model appears in the interface (in the example, lmstudio-qwen);
- model_name: the name of the model on the server side (qwen/qwen3.8-27b);
- api_base: the address of the local server, here http://localhost:1234/v1.
After launch, a chat opens. In the screenshot, the user asks how many repositories and releases are in the database. The agent first calls the list_databases_and_tables tool to learn the structure. It then sends a SQL query with two COUNT subqueries and gets the answer: 200 repositories and 1889 releases. The entire chain runs through the local Qwen model. Not a single request goes to an external service.
Why it matters for developers and where the limits are
For a practitioner, there are two benefits. The first is privacy. An agent that answers questions about a database can be tested on real data without arguing with the security team about transferring that data to a third party. The second is freedom of choice. If a better model comes out tomorrow, you only need to change two lines in the config, and the code stays the same. Different models can also be compared on the same database.
There are limitations too. The version number 0.1a11 means this is an alpha, so the settings format may change. The example in the release is simple: counting rows in two tables. The note does not show how a local model handles tangled schemas, joins across several tables, and ambiguous questions. For a 27-billion-parameter model on home hardware, this has to be verified yourself. Response speed and memory requirements also depend on your computer and the chosen server.
A sensible approach is this: take a small copy of your database, start Datasette with a local model, and ask a dozen typical questions. If the SQL comes out correct, you can think about more serious deployment. If not, you can try a different model or connect a cloud one. Now this is done by replacing a few lines in the configuration.
- Nov 21, 2026Kimi K3 and DeepSeek V4 Weights Show Traces of Banned Nvidia Blackwell Chips
- Nov 21, 2026AcpGram Lets You Control Claude Code, Codex, and Gemini CLI Directly from Telegram
- Nov 21, 2026A Breakdown of llama.cpp: Which Thread, Context, and Batch Flags Affect Speed
- Nov 21, 2026A 16 GB Mac mini instead of a paid API: Qwen analyzes food photos in 20–40 seconds
Key Questions Answered
What changed in datasette-llm?
datasette-llm acts as an intermediate layer. It stores settings for large language models (LLMs), and other Datasette plugins pull them from there. Previously, the choice of models was limited to what the plugin supported. Version 0.1a11 adds support for OpenAI-compatible endpoints. This term refers to servers that understand requests in the same format as the OpenAI API. That format has long since become an informal standard, so many different programs accept it, including LM Studio, Ollama, and llama.cpp.
How it looks in practice?
In the example from the release, everything starts with a single command through the uv package manager. First, a test database, content.db, is downloaded from datasette.io. Then uvx starts Datasette together with the datasette-agent plugin.
Why it matters for developers and where the limits are?
For a practitioner, there are two benefits. The first is privacy. An agent that answers questions about a database can be tested on real data without arguing with the security team about transferring that data to a third party. The second is freedom of choice. If a better model comes out tomorrow, you only need to change two lines in the config, and the code stays the same. Different models can also be compared on the same database. There are limitations too.
Test Frontier LLMs & Autonomous Agents in One Workspace
Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.
The AI world, distilled — once a week
Seven stories that actually mattered, hand-picked. No noise, no reposts, no press releases.
Done! Check your inbox for a confirmation.