OpenHands-compatible runtime API

A real Linux box for OpenHands.

OpenHands provisions sandboxes through a runtime API. Containarium Cloud serves that API, so pointing OpenHands at us gives every session its own persistent box — same session, same box, state intact.

~ / give OpenHands its own box
# OpenHands SDK: provision the workspace on Containarium
from openhands.workspace import APIRemoteWorkspace

with APIRemoteWorkspace(
    runtime_api_url="https://cloud.containarium.dev/runtime",
    runtime_api_key=CONTAINARIUM_API_TOKEN,
    server_image="ghcr.io/openhands/agent-server:latest-python",
) as workspace:
    ...

Sessions

One session, one box — and it's still there when you come back.

Each OpenHands session maps to one Containarium box, provisioned on start and reused when the same session starts again. Files the agent wrote and tools it installed are where it left them.

An ephemeral runtime

Every start is a fresh container. Anything the agent set up has to be rebuilt, and work that wasn't pushed somewhere is gone.

A Containarium box per session

The session's box persists across runs. Pause and resume map to stopping and starting the box, so idle sessions don't hold compute.

No upstream changes

Containarium implements the runtime API OpenHands' own clients already speak, so the SDK and the self-hosted app work unmodified.

Your org, your quotas

The API key is a Containarium API token, so sessions land in your org with its isolation, quotas and billing.

Open at both ends

OpenHands is MIT-licensed; Containarium is Apache 2.0. Both halves are open source.

Connecting

Two ways to connect OpenHands.

The OpenHands SDK

Use APIRemoteWorkspace with runtime_api_url set to https://cloud.containarium.dev/runtime and a Containarium API token as runtime_api_key, as in the example above.

The self-hosted OpenHands app

Point the app's remote runtime at the same URL and token. It uses the same runtime API, so sessions it creates land in Containarium boxes too.

Using another agent? The same box works with Claude Code, Cursor, Cline, Codex CLI, Gemini CLI, Aider, Goose, or your own agent. Need a GPU in it? That works too.

FAQ

Common questions

Can OpenHands use Containarium as its sandbox?

Yes. Containarium Cloud serves an OpenHands-compatible runtime API at https://cloud.containarium.dev/runtime. Point APIRemoteWorkspace (or the self-hosted app's remote runtime) at it with a Containarium API token.

Are OpenHands sessions persistent on Containarium?

Yes. Each session maps to one persistent box. Starting the same session again reuses the box, and pause and resume stop and start it.

What does it cost?

Sessions are ordinary Containarium boxes, billed on the same terms as any other box in your organization, including the free tier.

Give every OpenHands session a box that stays.

Start free on the hosted cloud, or self-host the open source on your own VM.