> ## Documentation Index
> Fetch the complete documentation index at: https://hexelstudio.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Compute Overview

> Sandboxes, agents, and instances — the Hexel Compute model.

Use Hexel Compute when you need to run agent workloads (a support bot, a fraud detection pipeline) on managed infrastructure, or execute dynamic code on behalf of an agent without provisioning servers yourself.

Hexel Compute provides two ways to run workloads:

**Agent Hosting.** Deploy a Docker image and receive a permanent endpoint. Your agent stays in memory with millisecond wake times. The platform handles authentication, health checks, and automatic recovery.

**Sandboxes.** Allocate an isolated execution environment in milliseconds. Run Python code, shell commands, and file operations. Release when done.

## Tiers

Every sandbox and instance runs on a tier that sets its CPU and memory.

| Tier       | CPU       | Memory  | GPU | Best for                          |
| ---------- | --------- | ------- | --- | --------------------------------- |
| `micro`    | 0.25 vCPU | 256 MiB | —   | Lightweight agents, quick tasks   |
| `standard` | 0.5 vCPU  | 512 MiB | —   | Most agents and sandboxes         |
| `large`    | 1 vCPU    | 1 GiB   | —   | Heavier processing, RAG pipelines |
| `gpu`      | 2 vCPU    | 2 GiB   | 1   | GPU-accelerated workloads         |

<Warning>
  If the requested tier has no capacity available, allocation fails with HTTP `503`. The platform does not silently substitute a different tier and does not implement fallback.
</Warning>

## Concepts

| Term                   | Meaning                                                                                                              |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------- |
| **Agent**              | A Docker image registered in the Hexel registry. Contains your application code and dependencies.                    |
| **Instance**           | A running deployment of an agent. Receives a permanent endpoint derived from its configuration.                      |
| **Sandbox**            | An isolated execution environment for running code on demand. Single-use; not recycled after release.                |
| **Permanent endpoint** | A URL assigned to an instance based on a hash of the agent + configuration. Same inputs always produce the same URL. |

## Agent endpoint format

```
https://agent-<name>-<hash>.compute.hexelstudio.com
```

## Sandbox endpoint format

```
https://sandbox-<id>.compute.hexelstudio.com
```

## Limits & quotas

Concurrency and resource use are governed per organization by your plan.

| Limit                | Scope            | Notes                                                              |
| -------------------- | ---------------- | ------------------------------------------------------------------ |
| Concurrent sandboxes | Per organization | Enforced by plan quota. Exceeding it returns `429 quota_exceeded`. |
| Registered skills    | Per organization | Enforced by plan quota.                                            |
| Sandbox TTL          | Per sandbox      | Default 3600s; extend with `renew`.                                |

<Note>
  Exact numeric limits depend on your plan. View current quotas and pricing in the [Console](https://console.hexelstudio.com). Quota checks fail open — if the quota service is briefly unavailable, requests are allowed rather than blocked.
</Note>

## Errors

Compute returns a consistent error body: `{ "code": <http_status>, "message": <human_message>, "error_code": <machine_code> }`.

| `error_code`                 | HTTP | Meaning                                                                   |
| ---------------------------- | ---- | ------------------------------------------------------------------------- |
| `invalid_request`            | 400  | Malformed request or invalid parameters.                                  |
| `unauthorized`               | 401  | Missing or invalid credentials.                                           |
| `forbidden`                  | 403  | Authenticated but not permitted.                                          |
| `vm_not_found` / `not_found` | 404  | Sandbox, instance, or resource doesn't exist.                             |
| `quota_exceeded`             | 429  | Plan quota reached. Upgrade your plan or wait for the limit to reset.     |
| `vm_unavailable`             | 503  | No sandboxes available for the requested tier. Retry shortly.             |
| `capacity_exhausted`         | 503  | No warm capacity for the tier. Retry; a `Retry-After` header is included. |
| `internal_error`             | 500  | Transient platform error. Retry or contact support.                       |

## Security

| Concern           | How Compute handles it                                                                                                       |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| Authentication    | Every request uses a short-lived Bearer token; the platform authenticates agent traffic so your code never validates tokens. |
| Isolation         | Sandboxes are isolated and single-use — never shared or recycled across workloads.                                           |
| Scoping           | All resources are scoped to your organization, workspace, and environment.                                                   |
| Image credentials | Private-registry pull secrets are encrypted at rest and used only to pull the image.                                         |

## In this section

<CardGroup cols={2}>
  <Card title="Sandboxes" icon="terminal" href="/docs/compute/sandboxes">
    Isolated environments for running code on demand.
  </Card>

  <Card title="Agents" icon="robot" href="/docs/compute/agents">
    Register Docker images and define the agent contract.
  </Card>

  <Card title="Skills" icon="wand-magic-sparkles" href="/docs/compute/skills">
    Author reusable capabilities for your agents.
  </Card>

  <Card title="Instances" icon="server" href="/docs/compute/instances">
    Deploy agents and manage permanent endpoints.
  </Card>

  <Card title="Scaling" icon="up-right-and-down-left-from-center" href="/docs/compute/scaling">
    Adjust capacity for production load.
  </Card>

  <Card title="Sessions & Filesystems" icon="folder-tree" href="/docs/compute/sessions-and-filesystems">
    Group runtime resources and attach persistent storage.
  </Card>

  <Card title="Runtime Lifecycle" icon="arrows-rotate" href="/docs/compute/runtime-lifecycle">
    Leases, recovery, and how instances stay healthy.
  </Card>
</CardGroup>

## Next steps

New to Compute? Start with the [Quickstart](/docs/getting-started/quickstart), then follow [First Deployment](/docs/getting-started/first-deployment).
