Prerequisites
- A Blaxel account and workspace
- An Omnara Cloud account
- Node.js
22or newer, to run the Omnara CLI withnpx
1.0.30 and the blaxel/claude-code:latest image.
On Omnara Cloud, your organization’s default pool already runs on Blaxel and is managed by Omnara, so there’s nothing to set up. To start there, follow the Omnara quickstart. This tutorial connects your own Blaxel workspace instead, so sandboxes run and are billed in your account.
How it works
- Agents live in Omnara as event logs. Omnara runs the agent loop and calls the model, so model keys never enter the sandbox.
- When an agent needs a machine, Omnara creates a sandbox in your workspace and starts the Omnara daemon,
omnarad, in it. The daemon connects outbound, so there are no ports to open. - When the machine is idle for the time you set, it sleeps and Blaxel puts the sandbox on standby with its memory and files intact. The agent’s next command wakes it.
1. Create a Blaxel API key
Create a service account in your workspace and generate an API key for it. Pick the member role, not the default admin role. Member covers everything Omnara needs: creating and deleting sandboxes and using the sandbox API. Export the key:2. Log in to Omnara
login opens your browser to approve the CLI. config select sets the organization and project for the commands below. Choose your Default project, which already has access to Omnara’s hosted models.
3. Add the key as an Omnara secret
sec_...) in the output.
4. Create a Blaxel pool
Save the following asblaxel-pool.json. Replace the secret ID and the workspace name:
imagemust include Blaxel’ssandbox-apiandcurl. Blaxel’s publicblaxel/claude-codeimage has both. To build your own, see templates.regionis one of the Blaxel regions.sleep_after_msturns on sleep: how long a machine must be idle before it sleeps, in milliseconds, with a minimum of30000. Without it, the sandbox never sleeps and bills for memory until it’s deleted.- Blaxel pools set memory only. CPU scales with it.
mpo_...) from the output:
5. Launch an agent
Save the following asagent.yaml:
omnara-openrouter is the model provider every Omnara Cloud organization starts with. Because the config has a machine source, Omnara adds the command, process, and file tools for you.
Launch the agent with a first task:
agt_...) in the output. To follow the conversation in your terminal, run:
omnara-mch-... and has an omnara-machine label set to its Omnara machine ID (mch_...).
6. Watch the sandbox sleep and wake
Wait about a minute without sending the agent anything, then list the pool’s machines:connection_state is asleep. It sleeps after 30 seconds of idle time, and Blaxel puts the sandbox on standby about 15 seconds later. Blaxel doesn’t charge for memory during standby.
Ask the agent for the file it wrote:
7. Archive the agent
Troubleshooting
Resources
Omnara Blaxel provider guide
Configure custom images, regions, sleep, and pool limits for Blaxel pools in Omnara.
Omnara on GitHub
Read the source of the open-source Omnara platform, or self-host it.
Sandbox lifecycle
Learn how sandboxes move between active mode, standby, and deletion.
Service accounts
Create service accounts and API keys with the role your integration needs.