Favicon of Sandcastle

Sandcastle

A coding agent orchestration library for TypeScript, with local Docker and Podman sandboxes, Vercel cloud execution, and an MIT license.

Sandcastle is an open-source TypeScript library for developers building automated coding and review workflows. It runs AI coding agents in local Docker or Podman containers, or in Vercel cloud sandboxes, and manages how their changes reach your Git repository. The library uses the MIT license.

Its main distinction is the combination of sandbox control and Git branch management. Agents can work in your current directory, on a temporary branch whose commits merge back, or on a named branch you keep for further work. This supports parallel unattended agents and review pipelines without requiring every task to share the same working directory.

Reusable sandboxes let an implementation agent and a review agent work on the same branch. Dependencies and build artifacts persist between runs, avoiding repeated container startup. Your workflow can also run verification commands in that environment before handing the code to a reviewer.

Sandcastle fits scripts, CI pipelines, and custom developer tools. It supports interactive agent sessions as well as automated runs, returns commit and iteration results, and can forward agent output to your own monitoring system. Custom sandbox providers let you use environments beyond the built-in choices.

The supplied Claude Code integration accepts Claude models and authenticates through a Claude Code token or an Anthropic API key. Local containers determine where the agent's tools execute; they don't make Claude inference local. Vercel execution uses cloud Firecracker microVMs. An optional host execution mode runs agents directly without container isolation.

Similar to Sandcastle