Datasette Agent Can Now Turn a Chat Request Into an Editable Chart
Datasette users can ask for a chart from a named SQLite table, open it in the chart builder, and ask the agent about the chart after changing it.
Datasette Agent can now turn a question about a SQLite table into a chart you can open and edit in Datasette’s chart builder. Simon Willison’s Nov. 24 release of datasette-charts 0.2a0 adds the integration using the chart plugin’s existing suggestion and generation tools. The release demo shows what changes for developers and analysts working with SQLite. They can change the chart themselves and then ask the agent to explain the updated view in the same chat. Read the chart release and watch Willison’s demo.

From a named table to a chart you can change
Willison starts with the prompt “Use #stats to show sqlite-utils downloads over time as a chart.” Typing #stats opens a table search box. The request gives the agent a data source, a package and a time dimension. The chart appears inline in the conversation. Clicking Open in the chart builder opens it in a side panel with the table page, where Willison switches the package from sqlite-utils to datasette. When he returns to chat and asks “what does the chart show?”, the agent describes the datasette chart now in the panel. The package name in the original prompt stays in the conversation, so that switch gives viewers a concrete way to tell which chart the agent is describing. See the demonstrated sequence in the release note.
The companion datasette-agent 0.7a1 release explains one piece of the integration. Chat sessions can open an embedded side panel, and that panel can navigate between pages. The update improves navigation when the fragment, the part of a URL after #, changes. Plugins can update that fragment as people interact with them. Willison says he made the change to fix bugs in the chart integration. Read the companion Datasette Agent release note.
Datasette Agent already writes and runs SQL against SQLite and accepts plugins for visualization and analysis. For someone exploring a table, the chart builder gives them direct control over a result generated in chat. In Willison’s example, changing the package in the builder also changes which chart the agent describes in the next reply. Datasette Agent demo site
Automater previously covered Datasette’s work on local models, SQL-capable apps and streaming renderers. Read the earlier Datasette coverage.
Try it with a series you can verify
Willison points readers to the hosted demo, which offers GitHub sign-in. The package-download example makes a good first test because the two chart subjects have recognizable names. Start with the named table and request a single series over time. Open the result in the builder and change one selection. Ask the agent which package the current panel shows and what period the chart covers. Compare its answer with the visible selection and time axis. That checks two parts of the workflow. First, did the prompt produce the intended chart? Second, did the follow-up use the chart you actually ended up with? Find the hosted demo and walkthrough in the release announcement.
For your own data, make the first question specific enough to check against the underlying rows. For a download trend, spell out the package, the date range and the expected time interval if those details matter. If a line dips unexpectedly, check a few plotted periods against the table before interpreting the dip. A missing period, a partial period and a genuine fall in downloads can lead to different conclusions. If the apparent drop is in the last point, check whether the latest period is complete before comparing it with earlier periods. Then use the same chat to ask about the view you’ve inspected.