How to add secure code interpreting in your AI app
summary
Builds a Next.js chat + preview that runs AI‑generated Python inside per‑user sandboxes using Sonnet 3.5, Vercel AI SDK and E2B Code Interpreter SDK. Claims secure execution via Firecracker VMs that start ~800–900 ms, execute Jupyter cells and return stdout/stderr plus cell results (PNG base64, HTML, files). Supports custom Dockerfile environments, mounting S3 compatibles for persistence, no GPU sandboxes yet, and automatic sandbox reconnect by user ID; demo generates visualizations successfully and streams tool invocation status.
AI-written summary · about
chapters (10)
- 0:00Secure AI code interpreting
- 10:18Workshop environment setup
- 26:09Chat backend with AI SDK
- 37:02Secure sandboxes for code
- 44:29Python execution with E2B
- 1:00:12Displaying code results
- 1:14:19Streaming tool status
- 1:23:08Rendering charts and outputs
- 1:30:37Sandbox isolation security
- 1:47:38Q&A
related talks
24mContained Intelligence: Secure Sandboxing for Gen AI Code
38mWhy, and how you need to sandbox AI-Generated Code?
25mPlease Sandbox your AI Agents
28mProtect Your Code & IP 🔥 Beyond Vibe Coding
14mOpenAI on Securing Code-Executing AI Agents
38mSponsored Session: Jupyter AI v3: Human + AI Collaboration
52mBuild an Intelligent Python App, No Infra Hassles!
06mQ&A with Jòan Varvenne
