Firecracker Poc banner
tyrchen tyrchen

Firecracker Poc

Development community

Description

A simple POC to verify firecracker as a code/agent sandbox

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

![](https://github.com/tyrchen/firecracker-poc/workflows/build/badge.svg)

Firecracker POC

A proof-of-concept project demonstrating secure Python code execution in isolated microVMs using AWS Firecracker virtualization technology.

![sandbox](./docs/images/sandbox.jpg)

Overview

This project provides a secure sandbox environment for executing Python code using Firecracker microVMs. It features:

  • Secure Isolation: Python code execution in lightweight, secure microVMs
  • REST API: Axum-based web server with clean JSON responses
  • HTTP API Communication: VM-host communication via HTTP for reliable execution
  • VM Pooling: Pre-warmed VM pool for optimized latency (<1s for subsequent requests)
  • Unique Network Isolation: Each VM gets its own subnet (172.16.x.0/24) preventing conflicts
  • Smart TAP Interface Management: Prevents cleanup conflicts between active VMs
  • Test-Friendly: Unit tests run without sudo requirements using intelligent test detection
  • Cross-Platform: Runs on macOS using Lima VMs with KVM support
  • Production Ready: Comprehensive test suite with robust error handling

Architecture

┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐
│   Client        │───▶│   Rust Backend  │───▶│  VM Pool        │
│   (HTTP)        │    │   (Axum Server) │    │  (Pre-warmed)   │
└─────────────────┘    └─────────────────┘    └─────────────────┘
                                │                       │
                                ▼                       ▼
                       ┌─────────────────┐    ┌─────────────────┐
                       │   Lima VM       │    │  Firecracker    │
                       │   (x86_64)      │    │   microVMs      │
                       └─────────────────┘    │  + HTTP API     │
                                              │  + TAP Networks │
                                              └─────────────────┘

Key Components

  • VM Pool: Pre-warmed Firecracke