{"slug": "datasette-agent-0-2a0", "title": "datasette-agent 0.2a0", "summary": "Datasette-agent 0.2a0 was released, introducing tools that can ask users questions mid-execution via a new `ToolContext` object and `ask_user()` method. The release also adds a built-in `save_query` tool that allows the AI agent to save SQL queries as Datasette stored queries, but only after requiring human approval.", "body_md": "**Release:** [datasette-agent 0.2a0](https://github.com/datasette/datasette-agent/releases/tag/0.2a0)\n\nHighlights from the release notes:\n\n- Tools can now ask the user questions mid-execution. Tools that declare a\n`context`\n\nparameter receive a`ToolContext`\n\nobject, and`await context.ask_user(...)`\n\ncan ask a yes/no, multiple-choice (`options=[...]`\n\n) or free-text (`free_text=True`\n\n) question. While a question is unanswered the agent turn suspends: the question renders as a form in the chat UI and persists to the internal database, so suspended conversations survive a server restart. Once answered, the tool re-executes from the top with stored answers replayed, so call`ask_user()`\n\nbefore performing side effects.[#20]- New built-in\n`save_query`\n\ntool: the agent can save SQL it has written as a[Datasette stored query]. Saving always requires human approval - the agent shows the full SQL plus the proposed name, database and visibility, and nothing is stored until you click Yes.[#20]\n\nThe `ask_user()`\n\nfeature was enabled by the new LLM alpha I [built yesterday](https://simonwillison.net/2026/Jun/9/claude-fable-5/#adding-features-to-datasette-agent-and-llm-using-claude-code) with the help of Claude Fable 5.\n\nTags: [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), [datasette-agent](https://simonwillison.net/tags/datasette-agent)", "url": "https://wpnews.pro/news/datasette-agent-0-2a0", "canonical_source": "https://simonwillison.net/2026/Jun/10/datasette-agent/#atom-everything", "published_at": "2026-06-10 23:57:27+00:00", "updated_at": "2026-06-11 19:14:55.818872+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "generative-ai", "large-language-models"], "entities": ["datasette-agent", "Datasette", "Claude Fable 5", "Simon Willison"], "alternates": {"html": "https://wpnews.pro/news/datasette-agent-0-2a0", "markdown": "https://wpnews.pro/news/datasette-agent-0-2a0.md", "text": "https://wpnews.pro/news/datasette-agent-0-2a0.txt", "jsonld": "https://wpnews.pro/news/datasette-agent-0-2a0.jsonld"}}