Sandcastle
www.aihero.dev
TypeScript library from Matt Pocock that runs AI coding agents in isolated sandboxes with one sandcastle.run() call and merges their branch commits back.
- Pricing
- Open source
- Published
- Nov 4, 2026
Next steps
- Shielda Agent Guard
Both tools are listed under AI Developer Tools, AI Agent, and typescript.
- Brickie
Both tools are listed under AI Developer Tools, AI Agent, and sandbox.
- Mudroom
Both tools are listed under AI Developer Tools, AI Agent, coding-agents, and sandbox.
- Strix
- Pi
- Daily Stock Analysis (DSA)
What it does
Sandcastle is an MIT-licensed TypeScript library by Matt Pocock for orchestrating AI coding agents in isolated sandboxes. You invoke an agent with a single sandcastle.run(); Sandcastle sandboxes it with a configurable branch strategy, and the commits made on those branches are merged back. It is provider-agnostic: native sandboxes use your OS's own process sandbox (Bubblewrap on Linux and WSL2, Seatbelt on macOS), image-based providers cover Docker and Podman, and cloud providers include Daytona, E2B, Fly.io Sprites, Modal and Vercel — or you can write your own. The documentation covers agent providers and sessions, iterations, structured output, prompts, hooks, run logs and a CLI, and is published at aihero.dev/sandcastle. Useful for running several AFK agents in parallel, building review pipelines or orchestrating your own agents. About 8.8k GitHub stars.

Use cases
- Run several unattended coding agents in parallel on separate branches
- Build an automated review pipeline around agent-written commits
- Switch an agent workflow between local sandboxes and cloud sandboxes like E2B
Frequently asked questions
- How do I start an agent?
- Call sandcastle.run(); Sandcastle sandboxes the agent and merges its branch commits back.
- Which sandboxes are supported?
- Bubblewrap (Linux/WSL2), Seatbelt (macOS), Docker, Podman, Daytona, E2B, Fly.io Sprites, Modal, Vercel, or your own provider.
- Where are the docs?
- In docs/guide in the repo and at aihero.dev/sandcastle.
- What is the license?
- MIT.