Skip to content

0.2a0

Pre-release
Pre-release

Choose a tag to compare

@simonw simonw released this 10 Jun 23:57
· 3 commits to main since this release
  • Tools can now ask the user questions mid-execution. Tools that declare a context parameter receive a ToolContext object, and await context.ask_user(...) can ask a yes/no, multiple-choice (options=[...]) or free-text (free_text=True) 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() before performing side effects. #20
  • New built-in save_query tool: 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
  • ask_user() accepts an html= parameter for displaying trusted HTML above the question, used by save_query to show exactly what is being approved.
  • Suspension and resume are now built on llm.PauseChain and chain resume, so resumed tool calls emit the same SSE events as live ones. The plugin now depends on llm>=0.32a3.
  • Updated the system prompt to avoid common mistakes made by smaller locally-hosted models, such as passing a literal kwargs argument or calling sql_query with query instead of sql. Thanks, Paul Mison. #14
  • Tool calls now stream to the UI as they happen.
  • Each response now has its own copy button. #19