Vercel Run SDK: Secure Eval for Agent-Generated Code

What shipped? Vercel released the Run SDK — a package for executing untrusted JavaScript and TypeScript in a sandboxed QuickJS context without giving it direct access to your application or system.

What changed? Agents that write TypeScript to coordinate tools now have a safe execution environment. The SDK evaluates code inside a worker thread backed by QuickJS, with no direct route to Node.js or the network. Applications expose narrow host functions — regular functions that become callable globals inside the sandbox. Calls cross the boundary through serialization, and host functions can return promises, so existing service clients sit behind this interface without being passed into the sandbox.

Key capabilities: human-in-the-loop interruption (execution pauses at a sensitive operation, a signed token lets it resume after approval), per-run limits (heap size, output size, timeout), and dynamic evaluation disabled with hardened prototypes. Built-in support for code mode in the AI SDK.

Why a builder cares? Every agent platform eventually needs to run generated code safely. The Run SDK is the extracted, reusable layer. If you're building agents that write and execute code, this replaces the DIY sandbox — no more eval() in a worker and hoping it holds.