Give an AI coding agent an isolated sandbox to safely execute generated code.
Self-host a Docker-backed alternative to a commercial sandbox service like E2B.
Learn how sandbox lifecycle management and container isolation are implemented in Go.
| harshalvk/cage | advayc/wrapped | aegrail/aegrail-engine | |
|---|---|---|---|
| Stars | 1 | 1 | 1 |
| Language | Go | Go | Go |
| Setup difficulty | moderate | easy | hard |
| Complexity | 4/5 | 2/5 | 5/5 |
| Audience | developer | general | ops devops |
Figures from each repo's GitHub metadata at analysis time.
Requires Go 1.25+, Docker and Docker Compose, and the golang-migrate CLI to apply database migrations.
Cage is a backend service, written in Go, that lets you create isolated sandbox environments through a simple REST API, run commands inside them, and then tear them down. The idea is to give something like an AI coding agent a safe place to run code without touching the actual machine it is deployed on. It is described by its author as an open source, self hostable learning project inspired by a commercial product called E2B, and is explicitly marked as work in progress rather than production ready. Right now each sandbox is backed by a Docker container, though the author plans to eventually explore Firecracker microVMs, a lighter weight virtualization technology, as an alternative isolation layer. Using the API, you can create a sandbox with a single request, list existing sandboxes, get details about one, run commands inside it while streaming their output, upload and download files to and from it, and delete it when finished. Sandboxes automatically clean themselves up after sitting idle or expiring, and their metadata is stored in Postgres so state survives a restart. All of the sandbox management routes require an API key passed as a bearer token, except for a public health check endpoint, and a command line tool included in the project can generate new API keys. To run Cage yourself, you need Go 1.25 or newer, Docker and Docker Compose, and the golang-migrate command line tool for applying database schema changes, a live reload tool and a linter are optional but supported. After cloning the repository and copying the example environment file, you can either run the whole stack, including Postgres, inside Docker Compose, or run Postgres in Docker while running the Go application directly on your machine with live reloading for faster development. The project is released under the MIT license. It is aimed at developers who want to understand or experiment with sandbox infrastructure for running untrusted or AI generated code, rather than at people looking for a polished, ready to deploy product.
A Go-based REST API for creating, running commands in, and tearing down isolated Docker sandboxes, useful for safely running AI-generated code.
Mainly Go. The stack also includes Go, Docker, Postgres.
MIT licensed, free to use, modify, and distribute.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
double-check against the repo, no cap.