# AI agent sandbox

> A constrained environment where an AI coding agent can run commands, write code, and verify behavior without causing unwanted external side effects.
>
> Source: https://local.cloud/glossary/ai-agent-sandbox/

Glossary

A constrained environment where an AI coding agent can run commands, write code, and verify behavior without causing unwanted external side effects.

[Read docs](https://local.cloud/docs/) [Check compatibility](https://local.cloud/compatibility/) [SDK examples](https://local.cloud/docs/sdk-examples/)

In LocalCloud

## AI agent sandbox with LocalCloud

- It has two boundaries: where the agent's code runs (execution) and what that code can call (dependencies).
- Code sandboxes such as E2B, Vercel Sandbox or Docker Sandboxes contain execution; LocalCloud contains Google Cloud dependencies, so agent-written cloud calls resolve to localhost.
- A sandbox with real cloud credentials can still create real cloud resources and charges, and an emulator without a sandbox still lets generated shell commands touch the host, so most agent setups that handle cloud code use both.

Copy-ready setup

## Commands and prompts

### Copy a prompt for your coding agent

#### Start LocalCloud

Give an agent one URL and have it start the local GCP sandbox.

```
Fetch https://local.cloud/ai/agents.md and follow the instructions to start LocalCloud on my machine. Install the LocalCloud CLI if it is missing, verify Docker, start or reuse LocalCloud, export emulator environment variables, and run one local GCP SDK/API smoke check. Do not ask for or use real GCP credentials.
```

Production boundary

## Before production

Use LocalCloud for non-production development, testing, and CI under the [Public Preview License](https://local.cloud/license/), check [each service's local boundaries](https://local.cloud/compatibility/), and validate against real Google Cloud before you deploy.

Related

## Next steps

- [Local cloud for AI agents](https://local.cloud/local-cloud-for-ai-agents/) — How the two boundaries fit together.
- [LocalCloud vs hosted agent sandboxes](https://local.cloud/compare/e2b-vercel-sandboxes/) — Where each boundary applies.
- [Agent setup guides](https://local.cloud/agents/) — Run coding agents against LocalCloud.
