我们刚刚发布了 Datasette Agent 的首个版本,这是一个面向 Datasette 的全新可扩展 AI 助手。我开发 LLM Python 库已经三年多了,而 Datasette Agent 标志着 LLM 与 Datasette 终于融合在一起。对此我感到非常兴奋!
Datasette Agent 提供了一个对话式界面,用于查询存储在 Datasette 中的数据。添加 datasette-agent-charts 插件后,它还能生成数据的图表。
演示
公告文章(发布在全新的 Datasette 项目博客上)包含了这段演示视频:
我录制视频时使用的是新的 agent.datasette.io 在线演示实例,该实例针对示例数据库运行 Datasette Agent,这些数据库包括 WRI 的经典全球发电厂数据集,以及我博客的 Datasette 备份副本。
在线演示运行在 Gemini 3.1 Flash-Lite 上——它价格低廉、速度快,并且编写 SQLite 查询毫无问题。
我在演示中问了一个问题:
Simon 最近一次看到鹈鹕是什么时候?
该问题执行了以下 SQL 查询:
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
然后回复道:
Simon 最近一次观察到鹈鹕的记录是在 2026 年 5 月 20 日。
该观察记录包括一只加州褐鹈鹕,以及一只普通潜鸟、一只加拿大雁、一只条纹岸蟹和一只加州海狮。
这是我博客上关于那次观察的记录,以及完整对话记录的 Markdown 导出文件。
插件
我最喜欢 Datasette Agent 的一点是,与 Datasette 的其他部分一样,它可以通过插件进行扩展。
到目前为止,我们已经发布了三个插件:
- datasette-agent-charts,在视频中展示过,它为 Datasette Agent 添加了图表功能,由 Observable Plot 驱动。
- datasette-agent-openai-imagegen 使用 ChatGPT Images 2.0 为 Datasette Agent 添加了图像生成工具。
- datasette-agent-sprites 提供了在 Fly Sprites 持久化沙箱中执行代码的工具。
构建插件非常有趣。我还有很多原型尚未达到 alpha 版本的质量。
Claude Code 和 OpenAI Codex 在编写插件方面都表现出色——只需让它们参考 datasette-agent 仓库的检出副本,并告诉它们你想要构建什么即可!
在本地模型上运行它
我还一直在玩把新插件跑在本地模型上。下面是一行 uv 命令,可以在 Mac 上的 LM Studio 里针对 gemma-4-26b-a4b 运行这个插件:
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 需要可靠的工具调用能力,以及模型能够生成针对 SQLite 运行的 SQL 查询。过去六个月发布的开源权重模型越来越能胜任这项任务了。
下一步计划
Datasette Agent 为整个大语言模型和 Datasette 生态打开了众多可能性。
它已经为 LLM 0.32a0 的重大重构提供了参考,我差不多准备好把这个版本作为稳定版发布了,可能还会从 Datasette Agent 本身提取一些额外的“LLM 智能体”抽象。
我一直在探索自己对 Claude Artifacts 的实现方式,目前作为一个插件进展得不错。
我很期待用 Datasette Agent 来构建我自己的 Claw——一个围绕我从数字生活中不同部分导入的数据构建的个人 AI 助手,这也是一个重新审视我早期 Dogsheep 工具系列的好借口。
我们还会为 Datasette Cloud 的用户推出 Datasette Agent。
如果你想讨论这个项目,欢迎加入我们的 #datasette-agent Discord 频道。
2026 年 5 月 21 日
更多近期文章
- Kimi K3,以及我们还能从 pelican 基准测试中学到什么——2026 年 7 月 16 日
- 新的 GPT-5.6 系列:Luna、Terra、Sol——2026 年 7 月 9 日
- sqlite-utils 4.0,现已支持数据库 schema 迁移——2026 年 7 月 7 日
本文是 Simon Willison 的 Datasette Agent,发布于 2026 年 5 月 21 日。
uv
datasette-agent
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.
21st May 2026
More recent articles
- Kimi K3, and what we can still learn from the pelican benchmark - 16th July 2026
- The new GPT-5.6 family: Luna, Terra, Sol - 9th July 2026
- sqlite-utils 4.0, now with database schema migrations - 7th July 2026
This is Datasette Agent by Simon Willison, posted on 21st May 2026.
uv
datasette-agent