Datasette Agent is an open-source plugin that puts a chat assistant on top of any SQLite database in Datasette. You ask a question in plain English. The model decides which tables to look at, writes read-only SQL, runs it, and answers from the result. Simon Willison walked through it in a short video on December 5, 2026, part of the Datasette Advent calendar, and the project's own site says the plugin works with hosted frontier models and with open-weight models you run on your own machine.
This post explains what Datasette Agent is, how to run it in a few minutes, which models fit, what the plugins add, and where the sharp edges are. The plugin is not new: the Datasette project announced it on May 21, 2026. What is new is the advent video, which shows the agent working with Datasette Charts, and a steady run of alpha releases since the launch.
Datasette Agent at a glance
| Question | Short answer |
|---|---|
| What is it? | An open-source Datasette plugin that adds an extensible AI assistant for SQLite data |
| Who maintains it? | The Datasette project, led by Simon Willison |
| License | Apache License 2.0, per the PyPI listing |
| Status | Alpha. Releases on PyPI, latest listed on PyPI was 0.7a1, uploaded November 24, 2026 |
| Install | datasette install datasette-agent or a one-off uvx run |
| Models | Any tool-calling model reachable through the LLM library |
| Can it change my data? | The main SQL tool is read-only. PyPI also lists a separate execute_write_sql tool that needs approval in chat before it runs |
| Try it without installing | agent.datasette.io, with GitHub sign-in |
What Datasette Agent actually does
Datasette is a long-running open-source tool that turns a SQLite file into a browsable website and JSON API. Datasette Agent adds a conversational layer. The launch post gives a simple example: the author asked when he last saw a pelican, and the agent ran a SQL query against his blog's database to find out.
Under the hood, this is the standard tool-calling agent pattern. The model gets a small set of tools, decides which to call, reads the output, and repeats until it can answer. According to the PyPI listing, the built-in tools list databases and tables, describe a table, and run read-only SQL queries. A separate execute_write_sql tool exists for writes and requires approval in chat before anything runs. Everything the model says about your data should therefore trace back to a query you can read.
That traceability is the main reason this is more useful than pasting a CSV into a chat window. You see the SQL. You can copy it, run it yourself in Datasette, and save it as a canned query. If you want a refresher on how tools and agents fit together, our explainer on the Model Context Protocol covers the same idea from the standards side.
The interface also has an export option: the launch post notes you can save a conversation as Markdown, which makes it easy to keep an analysis log.
How to try it in five minutes
The project documents a uvx one-liner that installs Datasette with the agent plugin and sets a default model in one command. The hosted example in the launch post uses OpenAI's gpt-5.5. A second example uses openai-codex/gpt-5.5 through the llm-openai-via-codex plugin, which bills an existing ChatGPT subscription instead of an API key. A local example uses Qwen 3.5 9B served through LM Studio.
If you already use Datasette, the shorter path is:
datasette install datasette-agent
Then configure a model through the datasette-llm plugin. That plugin is the layer other Datasette plugins depend on for model access. On December 5, 2026, Willison also released datasette-llm 0.2a0, which adds a datasette llm sub-command. You can now set a key with datasette llm keys set openai and paste it when prompted. This fixes a real annoyance: people who installed Datasette with Homebrew or uv tool install did not have the llm command on their path and had to work around it.
Prefer not to install anything? A public preview runs at agent.datasette.io. You sign in with GitHub. The project says that is purely to discourage abuse. Treat it as a demo: do not paste private data into a shared instance.
Which model should you use?
The plugin does not pick a model for you. It needs one that supports tool calling, and the LLM library exposes hundreds of them. The sources give three concrete data points:
| Setup | Source | Why you might choose it |
|---|---|---|
gpt-5.5 via the OpenAI API | Datasette launch post | Strong hosted baseline, pay per token |
openai-codex/gpt-5.5 via llm-openai-via-codex | Datasette launch post | Uses an existing ChatGPT subscription |
| Qwen 3.5 9B through LM Studio | Datasette launch post | Runs locally, so rows never leave your machine |
Gemini 3.1 Flash-Lite via llm-gemini | Public demo, per the launch post | Fast and cheap; the author calls it proficient at the SQLite queries the agent needs |
The pattern is useful beyond Datasette. SQL generation over a small, well-described schema is one of the easier jobs for a model, so a cheap, fast model can do well. Heavier models earn their cost when questions need several joins or careful reading of messy column names. If you want to run local models on a Mac, see our guides to Ollama 0.31 and LM Studio's agent features.
The plugin ecosystem: charts, images and sandboxes
The agent is meant to be extended. Other plugins can register new tools through a hook the project calls register_agent_tools. At launch the author shipped three examples:
- datasette-agent-charts draws charts with Observable Plot.
- datasette-agent-openai-imagegen generates images using ChatGPT Images 2.0.
- datasette-agent-sprites runs code in a Fly Sprites sandbox.
The advent video shows the charts integration. Willison asks the agent to add an annotation to a chart that explains a gap in the data. That works because Datasette Charts added agent integration in its 0.2 alphas on November 24, and later releases added annotations for labels, lines and shaded areas. Our earlier post on datasette-charts 0.1a0 explains how the charts plugin compiles charts to SQL GROUP BY queries over the whole table, which is why an agent can chart a million rows without loading them into a page.
The same release cadence shows up in other Datasette work. See datasette-arrows for streaming Apache Arrow exports and Datasette 1.0a43 for a private stored-query leak fix. Together they show a project that ships small alpha releases quickly.
Why this matters: a data assistant you can inspect
Nodes joined by lines with a green path highlighted, like the path an agent takes through tables when it answers a Datasette Agent question
Many "chat with your data" products hide the query step or send your data to a vendor. Datasette Agent takes the opposite route, and that is where the real value sits.
- Open source and self-hosted. You run it where your database lives.
- Model choice. You can use a frontier API for hard questions and a local model for private tables.
- Visible SQL. Every answer comes from a query you can audit.
- Extensible. New capabilities arrive as plugins, not as a vendor roadmap.
For analysts, the workflow is simple: load a CSV into SQLite, open Datasette, and ask questions. For product teams, it is a cheap way to build an internal "ask the data" tool. For students, it is a clear, small example of an agent loop. Our guide to text-to-SQL and context layers for agents covers the harder, enterprise version of the same problem.
Limits and risks to know before you use it
It is alpha software. The package ships as alpha releases, and the maintainers can change the plugin API. Pin the version and read the release notes before upgrading.
Read-only is not the same as private. The built-in SQL tool only reads, but the model still sees the rows it queries. With a hosted model, that data goes to the provider. Use a local model for anything sensitive.
Plugins widen the attack surface. A code-execution sandbox or an image generator gives the model new actions. Install only the plugins you need, and read what each one can do. If you are wiring agents into real systems, our piece on why labs skip security basics for agents is a useful reality check.
Models can still be wrong. An agent can write a query that runs but answers a different question than you asked. Read the SQL, check row counts against a hand-written query, and be careful with joins and date ranges.
Some details are not in the sources. The launch post and the advent notes do not cover every configuration option or known limit. For those, read the project README on GitHub and the Datasette Discord channel the project points to.
One naming note: advent day numbers
The advent notes and the datasette.io calendar do not agree on the day number for the agent video. Willison's post title calls it Day 4, while the datasette.io calendar lists it as Day 5 and lists Datasette Lite as Day 4. This post therefore refers to it as the December 5 advent video. The calendar runs a short video each day through December 25, each showing one feature from the year's releases, so more Datasette features will follow.
What to do next
- Try the public demo at agent.datasette.io to see the flow.
- Install
datasette-agentin a throwaway environment and point it at a small SQLite file. - Start with a cheap tool-calling model, then test a local one on the same questions.
- Add
datasette-agent-chartsif you want visuals. - If your team wants structured training on building agents, see our workshops.
Related reading
- datasette-charts 0.1a0: SQL aggregates across every row
- datasette-arrows: streaming Apache Arrow exports
- Datasette 1.0a43: stored-query leak fixed
- What is MCP? The Model Context Protocol guide
- LLM 0.37 and OpenAI-compatible endpoints
- Text-to-SQL context layers for agents
Official sources: Datasette Agent launch post, datasette-agent on PyPI, Simon Willison's advent notes.
Version numbers and project details are accurate as of December 6, 2026. Datasette Agent is in alpha and can change quickly.
