Skip to main content
Omnara is an open-source managed agent platform. It handles execution and state while you choose the model, tools, and machines for each agent. In this tutorial, you connect your Blaxel workspace as an Omnara machine pool, launch an agent that runs commands in a Blaxel sandbox, and watch the sandbox sleep and wake.

Prerequisites

Tested with Omnara CLI 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

Note the secret ID (sec_...) in the output.

4. Create a Blaxel pool

Save the following as blaxel-pool.json. Replace the secret ID and the workspace name:
  • image must include Blaxel’s sandbox-api and curl. Blaxel’s public blaxel/claude-code image has both. To build your own, see templates.
  • region is one of the Blaxel regions.
  • sleep_after_ms turns on sleep: how long a machine must be idle before it sleeps, in milliseconds, with a minimum of 30000. Without it, the sandbox never sleeps and bills for memory until it’s deleted.
  • Blaxel pools set memory only. CPU scales with it.
Create the pool, then grant it to your project with the pool ID (mpo_...) from the output:

5. Launch an agent

Save the following as agent.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:
Omnara creates a sandbox from the pool, and the agent runs the commands there. Note the agent ID (agt_...) in the output. To follow the conversation in your terminal, run:
You can also follow it in the Omnara dashboard. In the Blaxel Console, the sandbox is named 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:
The machine’s 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:
The agent’s command wakes the sandbox, and the agent prints the date it wrote before the machine slept. Standby keeps the sandbox’s memory and files.

7. Archive the agent

Archiving the agent deletes its sandbox from your workspace. The pool and secret stay, so you can launch more agents on Blaxel.

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.
Last modified on October 16, 2026