What is Sandkiln?
Sandkiln is a self-hosted runtime for executing untrusted or AI-generated code inside Firecracker microVMs. Each execution gets its own kernel, filesystem, and network, with hardware virtualization providing the isolation boundary rather than a shared container kernel. It is aimed at teams that need to run code they did not write alongside their own systems. Developers can use its HTTP API, JavaScript and TypeScript or Python SDKs, or command-line interface.
Sandkiln Features:
Firecracker MicroVMs: Each execution runs in its own Firecracker microVM, giving it a dedicated kernel instead of sharing the host kernel.
Dedicated Resources: A sandbox has its own filesystem on a dedicated virtio-blk device and its own network, separate from the host's.
Measured Startup: The project reports measured cold starts of 10.5–10.9 milliseconds and publishes benchmarks for comparison.
HTTP Daemon: A Rust virtual machine monitor and guest agent communicate through vsock, with an HTTP daemon driving the system.
Typed Client SDKs: JavaScript and TypeScript SDKs, a Python SDK, and a CLI provide clients for the daemon's HTTP API.
Self-Hosted Runtime: Sandkiln is designed to run on hardware you control and is released under the MIT license.
Sandkiln Benefits:
Reduced Shared-Kernel Risk: A dedicated kernel for each run avoids relying on container namespaces as the sole boundary for code you do not trust.
Separate Execution Space: Giving each run its own filesystem and network helps keep untrusted work apart from the host environment.
Quick Test Cycles: The reported cold-start time can help teams run sandboxed code without waiting through long startup delays.
Flexible Integration: Teams can choose a language SDK, the CLI, or direct HTTP calls to fit their preferred development workflow.
Infrastructure Control: Self-hosting lets teams run the execution system on hardware they control rather than relying on a hosted service.
Use Cases:
AI Code Execution: Run code generated by an AI agent in a microVM before allowing its output to interact with other systems.
User Code Submissions: Execute code submitted by users in a separate environment instead of running it directly on an application host.
Third-Party Scripts: Test or run scripts from external sources while keeping each execution in its own kernel and filesystem.
Sandboxed Development: Build a service that needs to execute code written by its users without treating that code as trusted.
Runtime Evaluation: Compare sandbox startup performance with the published benchmarks when evaluating an isolated code execution setup.

