Datasette Apps 0.2a0 adds agent-driven debugging with invisible iframes
New tools let an AI agent open, list, and test apps invisibly — a step toward autonomous app quality assurance.
The latest release of Datasette Apps, version 0.2a0, introduces two new tools designed for use with Datasette Agent, an AI-powered assistant. The app_debug() tool allows the agent to open an app in an invisible iframe — styled with opacity: 0 and pointer-events: none — and then execute JavaScript inside that sandboxed environment. This enables the agent to smoke-test the app's functionality, measure element dimensions, and verify that the app is working without any visible or interactive disruption to the user.
The second tool, app_list(), gives the agent the ability to list all apps the user has permission to edit, so the agent can select and modify them. These features rely on a new context.browser_task() mechanism introduced in Datasette Agent 0.4a0. Together, they represent a move toward more autonomous, agent-driven development workflows where an AI can not only create apps but also test and iterate on them.
Why it matters
This release signals a growing trend: AI agents are moving beyond generating code to actively testing and debugging the software they produce. For developers and learners, this means understanding how agents interact with browser environments — through sandboxed iframes, JavaScript execution, and permission-aware tooling — will become an increasingly valuable skill. It also raises important questions about security and control when agents operate in user contexts.
This release signals a growing trend: AI agents are moving beyond generating code to actively testing and debugging the software they produce.
Agent calls app_debug()
Agent sends app ID and JavaScript snippet to the tool
App loaded in hidden iframe
Iframe created with opacity:0 and pointer-events:none
JavaScript executed inside iframe
Agent-provided script runs in the app's context
Results collected and returned
What you can learn from this
- Sandboxed iframes for safe agent execution: An iframe with
opacity: 0andpointer-events: nonerenders an app invisible and non-interactive to the user, while still allowing JavaScript to run inside it. This is a common pattern for isolating untrusted content or running automated tests without affecting the user experience. As a learner, practise creating hidden iframes in a web page and executing JavaScript inside them usingcontentWindoworpostMessage— this is the foundation of many agent-driven testing tools. - Agent tool design patterns: The
app_debug()andapp_list()tools are examples of how to expose specific, scoped capabilities to an AI agent. Each tool has a clear purpose (debugging or listing), a defined input (e.g., app ID), and a controlled output (test results or a list). When building your own agent tools, follow this pattern: keep each tool focused on one task, validate inputs, and return structured data that the agent can parse and act on. - Permission-aware agent actions: The
app_list()tool only returns apps the user has permission to edit. This is a critical security principle: agents should never be given more access than the user themselves has. In your own projects, always check permissions at the tool level — not just at the API gateway — and ensure the agent cannot escalate privileges or access resources it shouldn't. - Automated smoke testing with agents: Smoke testing is a quick check to see if an app loads and functions at a basic level. The agent can now do this automatically after creating or editing an app, catching errors early. As a learner, try writing a simple script that opens a web page in a headless browser (like Playwright or Puppeteer), checks for console errors, and measures element sizes — this is essentially what the agent's
app_debug()does. - The
context.browser_task()mechanism: This new API allows the agent to run browser-based tasks in a controlled environment. Understanding how such mechanisms work — spawning a browser instance, injecting scripts, collecting results — is key to building agents that can interact with web UIs. Experiment with tools like Selenium or Playwright to automate browser actions, and think about how you would expose those actions as safe, parameterised tools for an agent.
Sources
- datasette-apps 0.2a0 — Simon Willison
Our reporting is an original summary; full coverage is at the links above.
Don't just read about it — build it.
Square 1 teaches the skills behind the headlines, with every line of your work graded by AI. Find your starting point in 3 minutes.
Get your free skill report