Vercel Blog

Run untrusted code with Vercel Sandbox

thumbnail

Table of Contents

  1. Introduction
  2. Features
  3. Use Cases
  4. Integration
  5. Benefits
  6. Conclusion

Introduction

Vercel Sandbox is a secure cloud resource powered by Fluid compute, designed to run untrusted code in isolated and ephemeral environments. It allows execution of code generated by AI agents with peace of mind, as it ensures security and isolation.

Features

  • Isolated and ephemeral environments
  • Support for untrusted code execution
  • Utilizes Sandbox SDK for standalone execution
  • Ephemeral microVMs for enhanced security
  • Supports execution times up to 45 minutes

Use Cases

Vercel Sandbox is ideal for scenarios where running untrusted code is necessary, such as:

  • AI-generated code execution
  • Running untrusted scripts
  • Testing code from unknown sources

Integration

Integrating Vercel Sandbox into your workflow is straightforward:

  1. Configure Sandbox SDK
  2. Define the code to be executed
  3. Execute the code in the Sandbox environment
  4. Retrieve results securely

Benefits

  • Enhanced security with isolated environments
  • Confidence in running untrusted code safely
  • Flexible execution times up to 45 minutes
  • Pay based on actual CPU usage with Active CPU time model

Conclusion

Vercel Sandbox provides a secure and efficient solution for running untrusted code, enabling users to leverage the power of Fluid compute with peace of mind. It offers a reliable environment for executing code from various sources while ensuring security and isolation for peace of mind.