# Datasette Agent

- 来源：Simon Willison 博客
- 发布时间：2026-05-22 03:52
- AIHOT 分数：71
- AIHOT 标记：精选
- AIHOT 链接：https://aihot.virxact.com/items/cmpfy3oks0am6sljw9otht8dv
- 原文链接：https://simonwillison.net/2026/May/21/datasette-agent

## 精选理由

Simon 终于把 Datasette 和 LLM 接上了，自然语言查 SQL 数据库有了现成方案，插件生态和本地模型支持让这工具的可玩性极高，做数据分析的值得试试。

## AI 摘要

Datasette Agent是Datasette推出的首个可扩展AI助手，为用户提供对话式界面以查询数据，并支持通过插件生成图表。该工具基于其LLM Python库构建，是LLM与Datasette整合的重要成果。目前提供图表生成、AI图像创建和沙箱代码执行等官方插件。它既可运行于Gemini 3.1 Flash-Lite等云端模型，也支持通过LM Studio连接本地开源模型，具备可靠的工具调用与查询能力。

## 正文

Simon Willison’s Weblog

Sponsored by: Teleport — Prevent access bottlenecks. Unify identity. Teleport replaces fragmented identity and access tooling with a single identity layer that security teams trust, and engineers want to use.

Datasette Agent

21st May 2026

We just announced the first release of Datasette Agent, a new extensible AI assistant for Datasette. I’ve been working on my LLM Python library for just over three years now, and Datasette Agent represents the moment that LLM and Datasette finally come together. I’m really excited about it!

Datasette Agent provides a conversational interface for asking questions of the data you have stored in Datasette. Add the datasette-agent-charts plugin and it can generate charts of your data as well.

The demo

The announcement post (on the new Datasette project blog) includes this demo video:

I recorded the video against the new agent.datasette.io live demo instance, which runs Datasette Agent against example databases including the classic global-power-plants by WRI, and a copy of the Datasette backup of my blog.

The live demo runs on Gemini 3.1 Flash-Lite—it’s cheap, fast and has no trouble writing SQLite queries.

A question I asked in the demo was:

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, and the Markdown export of the full conversation transcript.

The plugins

My favorite feature of Datasette Agent is that, like the rest of Datasette, it’s extensible using plugins.

We’ve shipped three plugins so far:

datasette-agent-charts, shown in the video, adds charts to Datasette Agent, powered by Observable Plot.

datasette-agent-openai-imagegen adds an image generation tool to Datasette Agent using ChatGPT Images 2.0.

datasette-agent-sprites provides tools for executing code in a Fly Sprites persistent sandbox.

Building plugins is really fun. I have a bunch more prototypes that aren’t quite alpha-quality yet.

Claude Code and OpenAI Codex are both proving excellent at writing plugins—just point them at a checkout of the datasette-agent repo for reference and tell them what you want to build!

Running it against local models

I’ve also been having fun running the new plugin against local models. Here’s a uv one-liner to run the plugin against gemma-4-26b-a4b in LM Studio on a Mac:

uvx --prerelease=allow \
--with datasette-agent --with llm-lmstudio \
datasette --internal internal.db --root \
-s plugins.datasette-llm.default_model lmstudio/google/gemma-4-26b-a4b \
data.db

Datasette Agent needs reliable tool calls and the ability for a model to produce SQL queries that run against SQLite. The open weight models released in the past six months are increasingly able to handle that.

What’s next

Datasette Agent opens up so many opportunities for the LLM and Datasette ecosystem in general.

It’s already informed the major LLM 0.32a0 refactor which I’m nearly ready to roll into a stable release, maybe with some additional “LLM agent” abstractions extracte from Datasette Agent itself.

I’ve been exploring my own take on the Claude Artifacts, which is shaping up nicely as a plugin.

I’m excited to use Datasette Agent to build my own Claw—a personal AI assistant built around data imported from different parts of my digital life, which is a neat excuse to revisit my older Dogsheep family of tools.

We’ll also be rolling out Datasette Agent for users of Datasette Cloud.

Join our #datasette-agent Discord channel if you’d like to talk about the project.

Posted 21st May 2026 at 7:52 pm · Follow me on Mastodon, Bluesky, Twitter or subscribe to my newsletter

More recent articles

Publishing WASM wheels to PyPI for use with Pyodide - 13th June 2026

Claude Fable is relentlessly proactive - 11th June 2026

Initial impressions of Claude Fable 5 - 9th June 2026

This is Datasette Agent by Simon Willison, posted on 21st May 2026.

projects 535 sqlite 467 ai 2,073 datasette 1,510 generative-ai 1,830 llms 1,798 llm 606 uv 95 datasette-agent 16

Next: Notes on Pope Leo XIV's encyclical on AI

Previous: Gemini 3.5 Flash: more expensive, but Google plan to use it for everything

Monthly briefing

Sponsor me for $10/month and get a curated email digest of the month's most important LLM developments.

Pay me to send you less!

Sponsor & subscribe

Disclosures

Colophon

©
