Repolode
mattpocock

mattpocock/sandcastle

A TypeScript library that runs AI coding agents in isolated sandboxes, then merges their commits back via sandcastle.run().

Stars
8,909
Forks
963
Open issues
144
Last commit
yesterday

What is it?

Sandcastle is a TypeScript library for orchestrating AI coding agents. You call a single sandcastle.run() function, and the library sandboxes the agent, applies a configurable branch strategy, and merges the resulting commits back into your repository.

It is provider-agnostic. Native sandboxes use the operating system's own process sandbox (Bubblewrap on Linux and WSL2, Seatbelt on macOS). Image-based providers cover Docker and Podman, and cloud providers cover Daytona, E2B, Fly.io Sprites, Modal and Vercel. Custom providers can also be written.

The project is aimed at running several unattended agents in parallel, building review pipelines, or simply driving your own agents from code.

Key features

  • 01Runs agents in isolated sandboxes through a single sandcastle.run() call.
  • 02Supports native OS sandboxes, Docker and Podman, and several cloud sandbox providers.
  • 03Applies a configurable branch strategy and merges agent commits back.
  • 04Lets you define custom sandbox providers.
  • 05Includes a CLI and documented run() and createSandbox() APIs.

Use cases

  • Running several unattended coding agents in parallel on separate branches.
  • Building automated code review pipelines where agent output is checked before merging.
  • Orchestrating your own AI coding agents from TypeScript code.

Quick start

  1. 1

    Clone the repository and install dependencies

    npm install
  2. 2

    Run the test suite to confirm the setup works

    npm test

Things to know

  • Native sandboxes rely on Bubblewrap (Linux and WSL2) or Seatbelt (macOS), so they are platform-specific.
  • The README does not cover end-user installation; setup details are in the separate getting-started docs.

In collections

Topics

FAQ

What is sandcastle?
A TypeScript library that runs AI coding agents in isolated sandboxes, then merges their commits back via sandcastle.run(). Sandcastle is a TypeScript library for orchestrating AI coding agents. You call a single sandcastle.run() function, and the library sandboxes the agent, applies a configurable branch strategy, and merges the resulting commits back into your repository.
Is sandcastle free to use? What license does it have?
sandcastle is open source under the MIT license. Check the license terms before using it in commercial products.
Is sandcastle still maintained?
Actively maintained. The last commit to sandcastle was on Nov 6, 2026.
What can I use sandcastle for?
Running several unattended coding agents in parallel on separate branches. Building automated code review pipelines where agent output is checked before merging. Orchestrating your own AI coding agents from TypeScript code.
How do I install sandcastle?
Clone the repository and install dependencies: npm install Run the test suite to confirm the setup works: npm test
Where can I get sandcastle?
The source code and installation instructions are on GitHub: https://github.com/mattpocock/sandcastle

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects