Datasette Agent, an extensible AI assistant for Datasette

Today we are releasing Datasette Agent, an open source plugin for Datasette that provides an extensible AI assistant for interacting with your SQLite databases.

Datasette Agent integrates LLM into Datasette, providing support for hundreds of different tool-calling models - from frontier vendors like OpenAI, Anthropic and Google Gemini, through to open weight models that you can run on your own hardware.

The result is a conversational interface for answering questions about your data in SQLite, enhanced by additional plugins to add visualizations and other custom tools.

Datasette Agent in action

This video demo shows how Datasette Agent works and what you can do with it.

You can try the demo yourself on agent.datasette.io. This requires you to sign in with a GitHub account to help prevent abuse.

The demo uses Gemini 3.1 Flash-Lite via the llm-gemini plugin. That model is fast and inexpensive, and our testing has shown it to be proficient at the SQLite queries needed by Datasette Agent.

Datasette Agent includes an "export Markdown" option. Here's the Markdown export of the conversation I recorded for the demo.

One of the questions I asked was this:

when did Simon most recently see a pelican?

Which ran this SQL query:

SELECT
  title, commentary, created
FROM
  blog_beat
WHERE
  beat_type = 'sighting'
  AND (title LIKE '%pelican%' OR commentary LIKE '%pelican%')
ORDER BY
  created DESC
LIMIT
  5

And replied:

The most recent sighting of a pelican by Simon was recorded on May 20, 2026.

The observation included a California Brown Pelican, along with a Common Loon, Canada Goose, Striped Shore Crab, and a California Sea Lion.

Here's that sighting on my blog.

Running Datasette Agent locally

If you want to try out Datasette Agent yourself, the easiest way to do so is using uv.

Here's how to run it with your own OpenAI API key. First grab a demo database:

wget https://datasette.io/legislators.db

Then set your API key as an environment variable:

export OPENAI_API_KEY="sk-..."

And start Datasette running like this:

uvx --prerelease=allow --with datasette-agent \
  datasette -s plugins.datasette-llm.default_model gpt-5.5 \
  --internal internal.db --root legislators.db

This will provide you with a link to sign in as root on your local machine, and set gpt-5.5 as the default model.

If you have OpenAI Codex installed and configured, you can use llm-openai-via-codex to avoid needing a separate API key and to bill your experiments to your existing ChatGPT subscription:

uvx --prerelease=allow --with datasette-agent --with llm-openai-via-codex \
  datasette -s plugins.datasette-llm.default_model openai-codex/gpt-5.5 \
  --internal internal.db --root legislators.db

Datasette Agent also works with local models. Here's how to run it with Qwen 3.5 9B served via a local installation of LM Studio:

uvx --prerelease=allow \
  --with datasette-agent --with llm-lmstudio \
  datasette --internal internal.db --root \
  legislators.db \
  -s plugins.datasette-llm.default_model lmstudio/qwen3.5-9b

Plugins for your agent

The Datasette ecosystem is built on plugins, and Datasette Agent continues that tradition. We are launching with three plugins:

Plugins are easy to build. The README includes detailed documentation, and we've found that coding agents like Codex and Claude Code can spin up new plugins really quickly.

We have several exciting plugins in the pipeline - expect to hear more about these over the next few days and weeks.

Come hack with us

Today's alpha release is just the start. We're actively iterating on Datasette Agent and extra plugins for it right now - come and join us on Discord in the #datasette-agent channel to learn more and share what you are planning to build.