datasette-agent-edit 0.1a0 Simon Willison released datasette-agent-edit 0.1a0, a base plugin for Datasette Agent that provides core text editing tools for agentic editing of files. The plugin implements view, str_replace, and insert tools modeled after the Claude text editor design, allowing other plugins to build collaborative editing features for Markdown, SQL queries, and SVG files. Release: datasette-agent-edit 0.1a0 https://github.com/datasette/datasette-agent-edit/releases/tag/0.1a0 I'm planning several plugins for Datasette Agent https://agent.datasette.io/ 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 https://platform.claude.com/docs/en/agents-and-tools/tool-use/text-editor-tool use-the-text-editor-tool , 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 numberRather 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. Tags: ai https://simonwillison.net/tags/ai , datasette https://simonwillison.net/tags/datasette , generative-ai https://simonwillison.net/tags/generative-ai , llms https://simonwillison.net/tags/llms , llm-tool-use https://simonwillison.net/tags/llm-tool-use , datasette-agent https://simonwillison.net/tags/datasette-agent