Show HN: What sandboxing an AI coding agent in a VM costs (www.veloworkspaces.com)

🤖 AI Summary
A new benchmark study reveals the performance and cost implications of sandboxing AI coding agents within virtual machines (VMs) on Apple Silicon. Traditionally, AI coding agents operate with full access to local resources, leading to potential security vulnerabilities through indirect prompt injections. The recommended solution involves running the coding agent in a VM; however, Apple's Virtualization.framework restricts GPU access for Linux guests, which complicates performance. The researchers propose a mechanism that separates the agent from the model: the model runs on the host while the agent operates in the VM, connected through a streamlined proxying system, maintaining functionality without significant performance loss. The results demonstrate that single-request responses incur minimal overhead; however, under load, the performance fluctuates significantly based on the inference engine used. While running MLX resulted in a small performance penalty in the VM under load, switching to Ollama showed a notable speed advantage, suggesting that the VM may optimize resource allocation differently. This variability emphasizes the importance of the specific inference engine's I/O model, which can offset the VM's inherent latency. The findings challenge prevailing assumptions about VM performance in AI applications and highlight the necessity for tailored benchmarking in varied environments, ultimately paving the way for safer and more efficient AI coding operations.
Loading comments...
loading comments...