AI agents
Sandboxes and AI agents fit together in two directions: an agent can run inside a Sandbox, and an agent can operate Sandboxes from outside. Both are covered in depth in the AI agents section - this page is the map.
Running an agent inside a Sandbox
A Sandbox is a clean, isolated machine with your repository already fetched, full sudo, and popular coding agents preinstalled. The agent gets a real environment to install, build, run, and break things in - and none of it touches your laptop.
Start here: Run agents in a sandbox.
What to set up on the Sandbox side:
- Git and Artifacts - get the repository in, and grant write access if the agent should push
- Snapshots - prepare the toolchain once, start every agent from it
- Terminal and SSH - give each agent its own system user when several work in parallel
- Files - collect whatever the agent produced
The agent changing its own Sandbox
An agent inside a Sandbox can reconfigure the machine it is on - expose a port, define an app, snapshot a good state - using the this command, with no identifier and no credentials. See Self-management.
Agents operating Sandboxes over MCP
Through the Model Context Protocol, an agent can create Sandboxes, run commands in them, manage apps and snapshots, and tear them down - as tools, from any MCP-capable client. See MCP.
Agent Skill
Buddy ships a skill that teaches agents the patterns of our API, CLI, and SDKs, so an agent orchestrating Sandboxes does not have to guess. See Skills.
Claude Managed Agents
Anthropic runs the agent loop; Buddy runs the execution layer - an orchestrator Sandbox plus one isolated worker Sandbox per session, created from a prebuilt snapshot. A reference implementation is available. See Claude Managed Agents.
Driving it from code
For your own orchestration, the SDK and the REST API expose the full Sandbox lifecycle.
Last modified on Jul 31, 2026