Simon Willison’s Weblog

Subscribe

Sunday, 7th June 2026

Sighting 5:08 PM — Hummingbirds, in San Mateo County, CA, US
Hummingbirds
Hummingbirds
Hummingbirds
Hummingbirds
Hummingbirds
Hummingbirds
Sighting 8:37 AM – 9:38 AM — Western Bluebird, California Brown Pelican, Osprey, in San Mateo County, CA, US
Western Bluebird
Western Bluebird
California Brown Pelican
California Brown Pelican
Osprey
Osprey
Osprey
Osprey

I'm planning several plugins for Datasette Agent which can make edits to existing pieces of text - things like collaborative Markdown editing, updating large SQL queries, and editing SVG files.

Agentic editing of text is a little tricky to get right. My favorite published design for this is for the Claude text editor, which implements the following tools:

  • view - view sections of a file, with line numbers added to every line.
  • str_replace - find an exact old_str and replace it with new_str - fail if the original string is not unique
  • insert - insert the specified text after the specified line number

Rather than recreate these patterns for every plugin that needs them I decided to create this base plugin, datasette-agent-edit, which implements the core tools in a way that allows them to be adapted for other plugins.

Saturday, 6th June 2026

2026 » June

MTWTFSS
1234567
891011121314
15161718192021
22232425262728
2930