> 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/start-here/readme.md). Agents can also search and read this documentation through its [MCP server](https://docs.computesdk.com/~gitbook/mcp).

# Introduction

One router for sandboxes and Actions. Run agent code and GitHub workflows; ComputeSDK handles the compute.

One router for sandboxes and Actions. Run agent code and GitHub workflows across compute providers. Let ComputeSDK choose, pick a provider, or set a fallback order through the same integration.

Start with managed compute; you do not need a vendor account or provider key. Bring your own keys whenever you want more control.

## Start with an interface

Choose the interface that fits your workflow. All five use the same ComputeSDK routing, organization and billing.

{% tabs %}
{% tab title="CLI" %}
[Install the CLI](https://docs.computesdk.com/start-here/installation.md#cli), then run:

```bash
compute new
compute exec echo hello
compute destroy
```

The CLI guides setup and selects your sandbox. [CLI quickstart](https://docs.computesdk.com/interfaces/quick-start.md).
{% endtab %}

{% tab title="TypeScript SDK" %}

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

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

Install `computesdk` and set `COMPUTE_API_KEY`. [TypeScript quickstart](https://docs.computesdk.com/interfaces/sdk/sdk-quick-start.md).
{% endtab %}

{% tab title="Actions" %}
[Connect a repository](https://docs.computesdk.com/platform/actions.md#setup) and enable a workflow such as `.computesdk/workflows/hello.yml`:

```yaml
name: Hello ComputeSDK
on: workflow_dispatch
jobs:
  hello:
    runs-on: ubuntu-latest
    steps:
      - run: echo hello
```

Run it from the dashboard, or dispatch it with the CLI:

```bash
compute actions dispatch myorg/myrepo --workflow .computesdk/workflows/hello.yml --ref main
```

Actions provisions compute for the job. Follow its steps, logs and result in the dashboard. [Actions guide](https://docs.computesdk.com/platform/actions.md).
{% endtab %}

{% tab title="MCP" %}
[Connect Claude, ChatGPT or another MCP client](https://docs.computesdk.com/platform/mcp.md) to:

```
https://platform.computesdk.com/mcp
```

Then ask your assistant:

```
Create a ComputeSDK sandbox, run echo hello, show me the output,
and destroy the sandbox when done.
```

[MCP setup and permissions](https://docs.computesdk.com/platform/mcp.md).
{% endtab %}

{% tab title="REST API" %}
Set `COMPUTE_API_KEY` to your [organization API key](https://docs.computesdk.com/platform/authentication.md), then create a sandbox:

```bash
curl --fail-with-body https://platform.computesdk.com/api/v1/sandboxes \
  -H "Authorization: Bearer $COMPUTE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{}'
```

Copy `sandbox.id` from the response into `SANDBOX_ID`, then run a command and release the compute:

```bash
SANDBOX_ID="<sandbox.id from the response>"
curl --fail-with-body "https://platform.computesdk.com/api/v1/sandboxes/$SANDBOX_ID/commands" \
  -H "Authorization: Bearer $COMPUTE_API_KEY" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{"command":"echo hello"}'
curl --fail-with-body -X DELETE "https://platform.computesdk.com/api/v1/sandboxes/$SANDBOX_ID" \
  -H "Authorization: Bearer $COMPUTE_API_KEY"
```

Destroy the sandbox even if your command fails. [REST API reference](https://docs.computesdk.com/platform/api-reference.md#sandboxes).
{% endtab %}
{% endtabs %}

## Build with sandboxes

A [sandbox](https://docs.computesdk.com/sandboxes/sandboxes.md) is the environment where your code runs.

| I want to…                              | Guide                                                                                                                         |
| --------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| Run code, tests or agent tools          | [Run commands](https://docs.computesdk.com/sandboxes/commands.md)                                                             |
| Read, write, upload or download files   | [Work with files](https://docs.computesdk.com/sandboxes/files.md)                                                             |
| Send a local project to a sandbox       | [Project sync](https://docs.computesdk.com/interfaces/quick-start/project-sync.md)                                            |
| Start a server and share a URL          | [Preview an application](https://docs.computesdk.com/sandboxes/previews.md)                                                   |
| Reconnect, control lifetime or clean up | [Sandbox lifecycle](https://docs.computesdk.com/sandboxes/lifecycle.md)                                                       |
| Choose where compute runs               | [Providers](https://docs.computesdk.com/platform/providers.md) and [routing](https://docs.computesdk.com/platform/routing.md) |

## Manage compute

The [platform overview](https://docs.computesdk.com/platform/platform.md) covers providers, routing and account management. [Open the dashboard](https://platform.computesdk.com) to manage resources and account settings. See [pricing and billing](https://docs.computesdk.com/platform/billing.md) for credits, compute rates and cleanup. A sandbox keeps running until destroyed or its lifetime expires.


---

# 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/start-here/readme.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.
