Skip to main content

Introducing Run SDK: secure eval for your agents

By Steven Van ·

Agents increasingly write TypeScript programs to coordinate tools and process their results.

Vercel has released the Run SDK, a package for running untrusted JavaScript or TypeScript without giving it direct access to an application's secrets, network, or internal services. Agents increasingly generate code to coordinate tools and process results, and running that code with eval gives it the same access as the surrounding app with no way to pause for approval. The Run SDK addresses both problems.

  • Code runs in a fresh QuickJS context inside a worker thread, with no direct route to Node.js or the network. Applications expose specific operations as hostFunctions, which become callable globals inside the sandbox.
  • Host functions can interrupt a run for authentication or human approval. The application saves a signed token and resumes the run when a decision arrives; completed host function calls are not repeated.
  • createRunner() sets shared limits such as timeout and memory, which can also be set per run.

The Run SDK is the module powering code mode tool execution in the AI SDK, where existing AI SDK tools are mapped to host functions. It grew out of the js-exec runtime originally built for just-bash, and was tested in eve before this release. It supports Node.js 22.13+ and Bun, and is installed with pnpm add run.

Vercel
Vercel
The platform for frontend developers — deploy, preview, and scale web apps and AI agents with zero config.
View Vercel →

Read the original announcement →

Read Introducing Run SDK: secure eval for your agents on Creators Toolbox