@mogenius/sandbox SDK lets an agent or application create a sandbox, run commands and code in it, work with its files, and tear it down — all programmatically. The surface is deliberately small and is Daytona-compatible, so it drops into existing agent frameworks with minimal change.
Sandboxes created through the SDK are the same ones you see in the UI and CLI: pods in your Kubernetes cluster, driven through the mogenius API with full RBAC and audit.
Install
mogenius/mo-sandbox-sdk for all packages and the full reference.
Authenticate
The client reads its credentials from the environment (an.env file is loaded automatically):
MOGENIUS_API_KEY— an API key for your organization.MOGENIUS_CLUSTER_ID— the cluster the sandboxes run on.
Quickstart
Surface
- Lifecycle —
mogenius.create()provisions a sandbox;mogenius.delete(sandbox)tears it down. - Process —
sandbox.process.executeCommand(command)runs shell commands and returns the exit code and output. - Code —
sandbox.codeRun()executes code directly. - Filesystem —
sandbox.fsreads, writes, and lists files in the sandbox. - Sessions — persistent shell sessions for long-running or multi-step work.
- Tunnels — reach a port inside the sandbox from your client.
- Errors — a typed error hierarchy keyed by HTTP status, so callers can branch on failure cleanly.
Because the surface mirrors Daytona’s, migrating an existing integration is largely an import swap. The repository’s
/docs cover Getting Started, Concepts, Commands, Sessions, Files, Tunnels, Errors, and Recipes in full.