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

# Blaxel

> Infrastructure for autonomous agents, with microVMs that resume in about 25 ms

[Blaxel](https://blaxel.ai) is the infrastructure foundation for autonomous agents. Each machine is an isolated microVM that can sleep between turns and wake with its memory intact.

On Omnara's hosted service, your organization's default pool runs on Blaxel and is managed by Omnara, so there's nothing to set up. You can also connect your own Blaxel workspace with a custom pool.

## Why Blaxel

* **Hardware isolation.** Each machine runs in its own microVM with its own kernel, boots in milliseconds, and is fully isolated from every other machine.
* **Resume in about 25 ms.** With [sleep](/machines/providers/overview#sleep-when-idle) on, idle machines stop using compute and come back in about 25 ms with their memory, files, and running processes intact, with no cold starts to manage.
* **Files at memory speed.** Each machine's file system runs in memory, so installs, builds, and searches are fast.
* **Bring your own Dockerfile.** Build images from any Dockerfile, including base images from private Docker Hub, GitHub, Google Artifact Registry, and Amazon ECR repositories.
* **US and European regions.** Run machines in Oregon, Virginia, London, or Frankfurt.

## Set up a Blaxel pool

<Steps>
  <Step title="Create an API key">
    In the [Blaxel console](https://app.blaxel.ai), create a service account in your workspace settings and generate an API key for it. A personal key from **Profile > Security** also works, but it can access every workspace you belong to.

    Store the key as an org-owned [secret](/organization/secrets) in Omnara, and note your workspace **name** from the console URL (`app.blaxel.ai/{workspace}`).
  </Step>

  <Step title="Build an image">
    Every Blaxel image must include Blaxel's `sandbox-api` binary. Start from a Dockerfile that installs your agents' tools and meets the [custom image requirements](/machines/providers/overview#custom-image-requirements):

    ```dockerfile theme={null}
    FROM ubuntu:24.04
    RUN apt-get update \
      && apt-get install -y --no-install-recommends ca-certificates curl git \
      && rm -rf /var/lib/apt/lists/*
    COPY --from=ghcr.io/blaxel-ai/sandbox:latest /sandbox-api /usr/local/bin/sandbox-api
    ENV HOME=/root
    ENTRYPOINT ["/usr/local/bin/sandbox-api"]
    ```

    Add a `blaxel.toml` next to it. Blaxel slims images by default, which can remove compilers and package manager files, so turn that off:

    ```toml theme={null}
    type = "sandbox"
    name = "omnara-agent"

    [build]
    slim = false
    ```

    Run `bl push` with the [Blaxel CLI](https://docs.blaxel.ai/cli-reference/introduction), then use `sandbox/omnara-agent:latest` or a pinned tag as the image. See Blaxel's [template docs](https://docs.blaxel.ai/Sandboxes/Templates) for private registries.
  </Step>

  <Step title="Create the pool">
    On the **Machines** page, click **New pool** and choose **Blaxel**. Enter the workspace name, credential, image, region, memory, and capacity limits. Blaxel keeps each machine's files in memory, so give each machine at least 4 GB for coding work.

    To use the API instead, call [Create a pool](/machines/pools#create-a-pool) with the fields under [API fields](#api-fields). The dashboard can't turn on sleep yet, so set `sleep_after_ms` through the API.
  </Step>
</Steps>

## API fields

When you create a pool through the API, send these fields in the [Create a pool](/machines/pools#create-a-pool) request. `provider_config` applies to the whole pool, and `default_machine_provider_options` sets the options for each new machine, which project grants and agent configs can override. For example:

```jsonc theme={null}
{
  "name": "blaxel-pool",
  "provider": "blaxel",
  "provider_auth_secret_id": "sec_hcyd5n6a2bfgik7mv4qtrwz3je",
  "provider_config": {
    "workspace": "acme-main"
  },
  "default_machine_provider_options": {
    "image": "sandbox/omnara-agent:latest",
    "region": "us-pdx-1",
    "sleep_after_ms": 300000 // optional
  },
  "default_machine_memory_mb": 4096,
  "max_machine_memory_mb": 8192,
  "max_total_memory_mb": 40960,
  "max_total_machines": 10
}
```

* `workspace` is your Blaxel workspace name.
* `region` is `us-pdx-1`, `us-was-1`, `eu-lon-1`, or `eu-fra-1`.
* `sleep_after_ms` turns on [sleep](/machines/providers/overview#sleep-when-idle). Omit it to keep machines awake.
* Blaxel pools set memory only, so don't send any CPU fields.
* Optional: `startup_script` in `default_machine_provider_options` runs on each new machine before the daemon starts, and `allowed_images` and `allowed_regions` in `provider_config` are [allowlists](/machines/providers/overview#allowlists).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.