Sandcastle is a TypeScript library for running AI coding agents inside controlled sandboxes. Instead of wiring together Git worktrees, containers, prompts, agent CLIs, and merge logic by hand, developers call sandcastle.run() and give the library an agent, sandbox provider, and prompt. Sandcastle then creates the isolated environment, lets the agent work, and reports the branch, commits, and iteration results.
The project is built for teams experimenting with AFK coding agents, agent review loops, CI automation, and custom multi-agent orchestration. It is provider-agnostic at the sandbox layer and supports Docker, Podman, Vercel Firecracker microVMs, no-sandbox mode, and custom sandbox providers. On the agent side, the README shows usage with Claude Code and includes API shapes that can be adapted for other coding-agent providers.
Sandcastle is most useful when the risk of giving an agent direct access to a repository is too high. A sandbox lets teams isolate file changes, inspect commits, compare outputs from multiple runs, and decide whether to merge. That is a practical fit for codebase maintenance, bug-fix experiments, test-writing runs, pull-request drafting, and internal tooling scripts where agents need to touch real files but should not freely mutate the host environment.
The developer experience is intentionally code-first. Installation uses npm, setup starts with npx @ai-hero/sandcastle init, and the main workflow lives in TypeScript. Teams can use the generated .sandcastle folder, set environment variables such as ANTHROPIC_API_KEY, and run scripts with tsx. Advanced users can choose branch strategies, run agents interactively, create sandboxes directly, or build custom providers for their own infrastructure.
Pricing depends on how you run it. The repository is MIT licensed and the npm package can be installed into a project, but users still pay for agent APIs, Claude subscriptions, Vercel sandbox usage, or the compute used by Docker and Podman environments. Sandcastle should be treated as orchestration infrastructure: it does not remove agent costs, but it can reduce operational risk when you run many agent attempts in parallel.
The most important Sandcastle design choice is that the sandbox is explicit. A team can choose Docker for local bind-mounted development, Podman for rootless container workflows, Vercel for isolated cloud microVMs, or a custom provider when the default options do not fit. That flexibility lets the same orchestration code run in local experiments, CI jobs, and more controlled internal automation. It also makes Sandcastle useful as a foundation for evaluation harnesses where multiple agents attempt the same task and maintainers compare the resulting commits.
Sandcastle is not a full no-code agent platform. It expects developers to write TypeScript, understand Git, and choose the right sandbox and agent provider for their risk profile. That is a feature for technical teams: the library keeps the interface small while exposing the pieces that matter for reliable automation. If your team already runs Claude Code, Codex-style tools, or internal coding agents, Sandcastle can provide the isolation and orchestration layer around those agents instead of replacing them.