# Sandcastle

A TypeScript library for orchestrating AI coding agents in isolated, provider-agnostic sandboxes, merging their branch commits back automatically.

Sandcastle is a TypeScript library for orchestrating AI coding agents in isolated sandboxes. Agents are invoked with a single sandcastle.run() call, which sandboxes the agent using a configurable branch strategy and merges the commits it makes on that branch back into the main line of work.

It is provider-agnostic, shipping with built-in sandbox providers for Docker, Podman and Vercel's Firecracker microVMs, plus the option to create custom providers, including a noSandbox() option to run an agent directly on the host. It is useful for parallelizing multiple unattended agents, building review pipelines, or general agent orchestration.

An init command scaffolds a .sandcastle directory with configuration, environment variables for the chosen agent and its credentials, and a script that runs an agent such as Claude Code against a chosen sandbox provider.

Website: https://github.com/mattpocock/sandcastle
