Google's Paul Kinlan explores repurposing web browsers as secure execution environments for AI agents, leveraging decades of sandboxing technology to create lightweight alternatives to container-based solutions.

The quest for secure execution environments for AI agents has typically involved heavyweight solutions like containers and virtual machines. Paul Kinlan, a web platform developer advocate at Google, proposes a radical alternative: repurposing the web browser – technology refined over 30 years to safely execute untrusted code – as a ready-made sandbox for next-generation coding agents.
Kinlan's experimental project Co-do demonstrates how browser-native technologies can create functional agent environments. By combining the File System Access API (though currently Chrome-limited), Content Security Policy headers with <iframe sandbox>, and WebAssembly running in Web Workers, he replicates core functionalities found in systems like Anthropic's Claude Cowork without requiring multi-gigabyte local containers.
The approach leverages inherent browser strengths:
- Filesystem access via the emerging standards, including the lesser-known
<input type="file" webkitdirectory>that enables folder-level access across Firefox, Safari and Chrome - Network constraints enforced through CSP sandboxing
- Secure execution via WebAssembly's sandboxed memory model
Co-do operates as an interactive chat interface where users select local folders, configure LLM providers, and leverage tools that interact directly with their files – demonstrating how browsers could become lightweight agent hosts. Kinlan documents sophisticated techniques like double-iframe encapsulation to enforce network rules, revealing nuances of browser security models rarely covered in official documentation.
However, significant hurdles remain. The File System Access API's browser fragmentation creates compatibility concerns, with Firefox and Safari lagging in implementation. Documentation gaps around advanced <iframe sandbox> behaviors persist across vendors, forcing developers to rely on experimentation. Some security researchers question whether browsers can match container-level isolation for high-risk operations, noting that browser vulnerabilities remain common attack vectors.
The exploration reveals an intriguing tension: while browsers offer ubiquitous, battle-tested sandboxing infrastructure, their design prioritizes user experience over computational workloads. Performance limitations for intensive agent tasks and the inherent constraints of browser security models may restrict this approach to moderate-risk scenarios. Yet as Kinlan notes, the web's three-decade refinement of hostile-code execution presents an unparalleled foundation worth investigating – potentially democratizing agent development by eliminating complex local setups.
This browser-centric approach represents a fascinating counterpoint to the current container-dominated landscape, suggesting that sometimes the most powerful solutions are already running on our devices, waiting to be rediscovered.

Comments
Please log in or register to join the discussion