Datasette Agent 0.4a0 Adds Controlled Browser Tasks
Datasette Agent 0.4a0, released July 31, adds a browser-task mechanism that lets approved agent tools execute server-authored JavaScript in the user's browser and return results to the suspended agent turn. The interface uses one-shot task claims and separates persistent task HTML from per-run payloads, giving plugin authors a controlled path for screenshots, page measurements, and other browser-side work.
Datasette released Agent 0.4a0 on July 31 with one focused addition: a context.browser_task() interface for agent tools that need work to run inside the user's browser. The release is an alpha update to the open-source Datasette Agent plugin, not a new standalone browser agent.
How the browser-task flow works
A tool can provide trusted, server-authored HTML, an optional payload, a user-visible label, and a timeout. Datasette Agent then suspends the current turn while the browser claims the task, runs the supplied code, and posts a success or failure result back to the server. The resumed tool receives that result as ordinary structured data.
The documented use cases include capturing a rendered page, executing JavaScript against the live DOM, and measuring layout. Results are capped at 512 KB, and the overall browser task can run for up to 10 minutes. The feature is available in the web chat environment; background agents and terminal chat can detect that browser tasks are unsupported and use a fallback.
Controls around execution
The design separates executable HTML from per-run payloads. Datasette Agent stores the HTML for audit, while one-shot payloads can carry task-specific values without embedding them in that persistent record. Plugin authors are explicitly warned to keep the HTML server-authored and to avoid interpolating model output or user input into executable markup.
Each task can be claimed once, and the first completion write wins. That prevents a duplicated or reloaded tab from replaying the same browser work. Completed task HTML is then torn down and represented by an inert record in conversation history.
For plugin developers, the practical change is a first-class bridge between server-side agent tools and browser-only capabilities. It does not remove the need to define narrow tasks, validate inputs, and treat executable browser code as privileged application logic.
Key Points
- 1Datasette Agent 0.4a0 adds context.browser_task() for controlled browser-side work initiated by agent tools.
- 2The turn suspends while the browser claims the task and returns a structured completion or failure result.
- 3One-shot claims, first-write-wins completion, and separation of persistent HTML from per-run payloads limit replay and secret exposure.
- 4The feature is available in Datasette Agent's web chat, while background and terminal contexts must use a fallback.
Scoring Rationale
A concrete developer-facing capability that expands what Datasette Agent plugins can do in the browser, with documented replay and payload controls. Its immediate reach is limited to an alpha release and the Datasette Agent ecosystem.
Sources
Primary source and supporting public references used for this report.
Practice interview problems based on real data
1,625 SQL & Python problems across 15 industry datasets — the exact type of data you work with.
Try 250 free problems
