> For the complete documentation index, see [llms.txt](https://docs.computesdk.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.computesdk.com/sandboxes/sandboxes.md).

# Overview

Run code, work with files and preview applications through ComputeSDK sandboxes.

```typescript
import { compute } from 'computesdk';

const sandbox = await compute.instances.create();
try {
  console.log((await sandbox.runCommand('echo hello')).stdout);
} finally {
  await sandbox.destroy();
}
```

Run agent code, tests and scripts in isolated sandboxes. ComputeSDK handles provider setup and routing. Start with the [TypeScript SDK](https://docs.computesdk.com/interfaces/sdk/sdk-quick-start.md) or [CLI quickstart](https://docs.computesdk.com/interfaces/quick-start.md).

## Build with sandboxes

| Task                                      | Guide                                                                              |
| ----------------------------------------- | ---------------------------------------------------------------------------------- |
| Execute code, tests and long-running jobs | [Run commands](https://docs.computesdk.com/sandboxes/commands.md)                  |
| Read, write, upload and download          | [Work with files](https://docs.computesdk.com/sandboxes/files.md)                  |
| Bring a local application                 | [Project sync](https://docs.computesdk.com/interfaces/quick-start/project-sync.md) |
| Start a server and share its URL          | [Application previews](https://docs.computesdk.com/sandboxes/previews.md)          |
| Reconnect, manage lifetime and clean up   | [Sandbox lifecycle](https://docs.computesdk.com/sandboxes/lifecycle.md)            |
| Choose a provider or fallback order       | [Routing](https://docs.computesdk.com/platform/routing.md)                         |

## Choose your compute

Let ComputeSDK route, pick a provider or set preferences. See the [provider catalog](https://docs.computesdk.com/platform/providers.md) for available integrations and [rates](https://docs.computesdk.com/platform/billing.md) for managed compute. Provider capabilities and available sizes vary. Placement happens when a sandbox is created; a running sandbox stays on its provider.

Use the [SDK reference](https://docs.computesdk.com/interfaces/sdk/reference.md) for create options and methods, [errors and limits](https://docs.computesdk.com/interfaces/sdk/errors.md) for safe retries, or the [REST reference](https://docs.computesdk.com/platform/api-reference.md#sandboxes) for HTTP fields and responses.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.computesdk.com/sandboxes/sandboxes.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
