# Omnigent on NVIDIA OpenShell [NVIDIA OpenShell](https://github.com/NVIDIA/OpenShell) is a self-hosted sandbox provider. Omnigent connects to an OpenShell **gateway** with the official [`openshell`](https://pypi.org/project/openshell/) Python SDK and asks that gateway to create, execute in, and delete sandboxes on the gateway's configured compute driver. This guide covers the Omnigent-specific OpenShell setup: - install the `openshell` extra; - select a working OpenShell gateway; - use an OpenShell-compatible Omnigent host image; - configure CLI-launched or server-managed sandboxes. ```bash pip install 'omnigent[openshell]' ``` Omnigent uses OpenShell two ways: - **CLI-launched**: `omnigent sandbox create` / `connect` provisions a sandbox from your terminal, ships your local checkout into it, and registers it as a host with your server. - **Server-managed**: the server provisions a sandbox automatically when a session is created with `"host_type": "managed"` and terminates it when the session is deleted. This is a sandbox-provider guide, not a server deploy target. Two traits shape the rest of this guide: - **gRPC, and a gateway you select — not an API key.** Omnigent connects through the OpenShell gateway you've made active with `openshell gateway select`. The SDK's `from_active_cluster()` resolves that gateway's endpoint, TLS material, and OIDC token from `$OPENSHELL_GATEWAY` / `~/.config/openshell/active_gateway`. There is no base-URL or token knob in Omnigent — gateway setup and auth are an OpenShell concern. - **No local port forward.** OpenShell has no sandbox→laptop callback path, so the interactive in-sandbox `omnigent login` / App OAuth step is skipped automatically (as on Modal, Daytona, and CoreWeave) — fine for token/OIDC-auth servers. ## Prerequisites You need a **running OpenShell gateway** with a compute driver, made active on the machine the launcher runs on. Installing and operating the gateway is an OpenShell concern — follow the [OpenShell docs](https://docs.nvidia.com/openshell). Install the runtime + CLI: ```bash curl -LsSf https://raw.githubusercontent.com/NVIDIA/OpenShell/main/install.sh | sh ``` (Apple Silicon macOS installs the Homebrew formula; Linux installs the deb/rpm.) > [!IMPORTANT] > **The gateway host must be amd64 Linux.** OpenShell's supervisor > (Landlock/seccomp/netns) does not run reliably under emulation — on an arm64 > host (e.g. Apple Silicon via colima) the sandbox never reaches READY. The > official host image now publishes multi-arch (amd64 + arm64), but its arm64 > variant omits `cel-expr-python` (no linux-arm64 wheel — CEL policies degrade to > unavailable there), so the amd64 variant is the one to run with OpenShell. On an > Apple-Silicon laptop, point the gateway at a remote **amd64 Linux** box (and the > server at that gateway) rather than the local Docker VM. ### Minimal local Docker gateway (for trying it out) For a quick local test, run one OpenShell gateway backed by your local Docker daemon. The gateway needs a signing key so sandbox containers can authenticate back to it; the helper script creates that key, writes the gateway config, starts the gateway, registers it with the OpenShell CLI, and waits for `openshell status` to report `Connected`. Make sure Docker is running first. If you use colima, set `DOCKER_HOST` before running the script: ```bash export DOCKER_HOST=unix://$HOME/.colima/default/docker.sock ``` Then start and register the gateway: ```bash deploy/openshell/start-local-docker-gateway.sh ``` The script writes local development state under `~/.openshell-local` and leaves gateway logs at `~/.openshell-local/gateway.log`. For a real deployment, run the gateway behind TLS with OIDC or mTLS (see the OpenShell docs), then `openshell gateway add ` and `openshell gateway login`; the SDK picks up the TLS/OIDC material from the gateway metadata automatically — Omnigent needs no extra configuration. > [!WARNING] > `allow_unauthenticated_users = true` and `--disable-tls` are local-development > conveniences. Don't expose such a gateway on a network. ## The host image Sandboxes boot from `ghcr.io/omnigent-ai/omnigent-host:latest`, published by CI from the `host` target of [`deploy/docker/Dockerfile`](../docker/Dockerfile) with Omnigent and its dependencies preinstalled — including the coding-harness CLIs (`claude`, `codex`, `pi`, `kiro-cli`), so agents on any harness run without an in-sandbox install. OpenShell injects its own supervisor as the container entrypoint. The `host` target also carries the two things OpenShell's image contract requires (and which are inert for the root-based providers): a non-root **`sandbox` user/group** and **`iproute2`/`nftables`** for the per-sandbox network namespace. A custom image used with OpenShell must include both, or the supervisor refuses to start. (The launcher handles the remaining non-root detail — pinning each exec's cwd and `$HOME` to `/home/sandbox` — so the image's `/root` default still works for the other providers.) Before using an image with OpenShell, smoke-test that contract from the same Docker daemon the gateway uses: ```bash docker run --rm --entrypoint sh ghcr.io/omnigent-ai/omnigent-host:latest \ -lc 'id sandbox && command -v ip && command -v nft' ``` To use a different image (a fork, or extra tooling baked in), run the build from an Omnigent repository checkout on an amd64 Docker-capable machine, then push it where the gateway's driver can pull from: ```bash docker build -f deploy/docker/Dockerfile --target host \ --platform linux/amd64 \ -t docker.io//omnigent-host:latest . docker push docker.io//omnigent-host:latest ``` Then point Omnigent at it with `OMNIGENT_OPENSHELL_HOST_IMAGE`. > [!NOTE] > **Air-gapped?** Pre-load the host image (and OpenShell's supervisor image) into > the registry or host the gateway pulls from — the first launch from an uncached > image otherwise waits on a registry pull. ## CLI-launched sandboxes With a gateway selected, provision a sandbox and ship your local checkout into it: ```bash omnigent sandbox create --provider openshell --server https://your-host ``` This creates a sandbox from the host image, builds wheels from your local checkout, and overlays them on top — so the sandbox runs *your* code, not whatever the image was built from. Then register it as a host with your server: ```bash omnigent sandbox connect --provider openshell \ --sandbox-id \ --server https://your-host ``` `connect` runs `omnigent host` inside the sandbox and holds the connection open in your terminal — Ctrl-C tears it down (stopping the in-sandbox host). New sessions targeting that host now run in the sandbox. Pass a unique `--host-name