Vibeleaderboard
← All Intel
Intel / article

Vercel Sandbox Python SDK 1.0 is now available

Source
vercel.com
Author
Scott Trinh
Date

Context

Vercel's Python SDK for Vercel Sandbox has reached version 1.0. Vercel is a hosted service that starts isolated Linux machines on demand, each a Firecracker microVM with its own filesystem and network, according to Vercel's documentation. It exists so an application can run code it does not trust, such as code written by an , without exposing its own systems. The SDK is the library a Python application uses to create those sandboxes, run commands in them and shut them down. In the changelog, 1.0 means the library's public API is now stable and the Python version can do everything the TypeScript one can.

The changelog's example shows the intended pattern. A Python program opens a sandbox from a Git branch inside an async with block, runs the project's tests there, and the block cleans the sandbox up when it ends, so the program does not have to remember to. The library supports the asyncio and Trio async frameworks, and offers a separate module, vercel.sandbox.sync, for code that does not use async at all.

Anyone upgrading from a 0.x version has breaking changes to handle. The 1.0 release notes say command input and output are now bytes rather than text, so code that treated a command's output as a string must decode it explicitly, and Python 3.10 is no longer supported, with 3.11 the new minimum. The same release adds managed npm credentials, which let a sandbox install a team's private npm packages while the access stay outside the sandbox. Vercel announced that feature for the service days earlier, with the reasoning that a coding agent can then install dependencies without ever seeing the tokens.

Key takeaways · AI-distilled
  • Vercel's Sandbox Python SDK reached 1.0, which stabilizes its public API and brings feature parity with the TypeScript SDK for running AI-generated code, tests and data analysis in isolated sandboxes from Python.
  • The SDK provides managers that clean up sandboxes automatically, AnyIO-based async support that works with both asyncio and Trio, and a vercel.sandbox.sync module for synchronous code.
  • Upgrading from 0.x involves breaking changes; Vercel calls out the switch to bytes for command input and output.
Terms in this piece · Glossary
  • sandbox — An isolated environment where AI-generated code or agent actions run without being able to touch anything real.
  • AI agent — An AI system that doesn't just answer once but works toward a goal in a loop — taking actions, reading the results, and deciding what to do next.
  • token — The chunk of text a model reads and writes in — roughly three-quarters of a word — and the unit AI usage is billed in.
  • context window — The maximum amount of text a model can consider at once — its working memory for the current conversation or task.
Recommended reads
Comments

Checking sign-in…

Loading comments…