kosa8 docs Dashboard
esc
↑ ↓ move↵ openRuns in your browser; nothing you type is sent anywhere.

CLI / cloud / sandbox / create

kosa8 cloud sandbox create

Make a cloud sandbox: a template's pooled VM, or one of a size, image and disk

With no flags, starts a sandbox from a template (the organization's default, else base) in milliseconds. --size, --cpus/--mem-mb, --image or --disk-gb make a sized sandbox instead: booted cold for you at that size (2x4, 4x8, 8x16 or 16x32: vCPUs x GiB), from that OCI image, with that data disk. kosa8 waits until it is running (--no-wait returns at once, state creating).

Images: any public OCI image, or kosa8's own, e.g. kosa8-template/universal-24.04-20261115.2 Ubuntu 24.04, Python, Node, Go, build tools kosa8-template/universal-full-24.04-20261115.2 the same plus browsers, Docker CLI and more (kosa8 cloud images lists the templates).

--docker lets the sandbox run its own dockerd (needs a sized create). --persistent runs every exec in one long-lived container, so the whole filesystem and background processes last between commands (the code interpreter needs it). --from-snapshot starts a copy of a saved snapshot (kosa8 cloud snapshot ls).

-e NAME=value sets the sandbox's own environment for every command it runs; -e NAME takes NAME's value from this shell and --env-file reads KEY=value lines, so a secret need not be on the command line. Values are never printed. --secret NAME attaches an org secret (kosa8 cloud secrets): the sandbox holds only a placeholder and the host adds the real value on the way out.

--sleep-after puts it to sleep after that long idle (0 never); --ttl or --delete-after deletes it then. Left out, the organization's settings apply.

Many at once (RL rollouts, evals): --count N makes N alike (up to 1000) in one call and prints their IDs, one a line. --run labels them kosa8.run=RUN (the run heartbeat, drain and kosa8 cloud rl select by), --lease deletes each unless a heartbeat extends it, --prefix names them PREFIX-0001, …, and --partial keeps the ones made when some fail (else all or nothing).

Small sizes, for fleets of mostly idle sandboxes: 0.25x0.5, 0.5x1 and 1x2 reserve (and bill) that much vCPU and burst above it while the host is idle (kosa8 cloud sizes lists what this organization can use).

Options#

FlagTypeWhat it doesDefault
--accept-pricefloat64a paid Store template: its price in USD, which you agree to0
--ai-gatewayboolroute its model calls through the AI gateway with the org's provider keys (kosa8 cloud ai); --ai-gateway=false opts out of the org default—
--allowstringArrayegress: allow only these hosts (or *.domain; repeatable)[]
--countintmake this many alike in one call (1 to 1000) and print their IDs1
--cpustring"shared" (default) or "dedicated": each vCPU a whole physical core—
--cpusintvCPUs, with --mem-mb (instead of --size)0
--dedicatedboolshorthand for --cpu dedicated—
--delete-afterstringdelete it at this time (ISO 8601, e.g. 2026-12-01T00:00:00Z)—
--denystringArrayegress: block these hosts (repeatable)[]
--disk-gbintsize of its data disk in GB0
--dockerboollet the sandbox run its own dockerd (needs a sized create)—
-e, --envstringArraythe sandbox's environment: NAME=value, or NAME for this shell's value (repeatable)[]
--env-filestringArrayread NAME=value lines from this file (- for stdin; repeatable)[]
--from-snapshotstringstart a copy of this snapshot (snap_…)—
--gpustringwhole GPUs, TYPE[:COUNT] (h100, b200:8, nvidia:1); only where kosa8 Cloud offers GPUs (GPU access is off by default)—
--imagestringOCI image to boot, e.g. kosa8-template/universal-24.04-20261115.2 or python:3.12—
-l, --labelstringArraya label, key=value (repeatable)[]
--leasedurationdelete each sandbox this long from now unless a heartbeat extends it (1m to 24h), so a crashed trainer leaks none0s
--mem-mbintmemory in MB, with --cpus (instead of --size)0
--namestringa name for it, unique in the organization—
--no-internetboolegress: no internet except what --allow and --preset let through—
--no-waitbooldo not wait for a sized sandbox to finish booting—
--partialboolkeep what was made when some fail (default: all or nothing)—
--persistentboolrun every exec in one long-lived container (filesystem and processes last)—
--printnext release with --repo OWNER/NAME: continue this pull request (check out its branch; changes go back to it only if it is a kosa8/* branch, else to a new kosa8/* branch and pull request)0
--prefixstringname them PREFIX-0001, PREFIX-0002, …—
--presetstringArrayegress: allow a preset, e.g. pypi or npm (kosa8 cloud egress presets; repeatable)[]
--regionstringus-ash1 (Ashburn, Virginia), the only region today, or just us (default: your org's default, else us-ash1)—
--repostringnext release start from a GitHub repo: OWNER/NAME[@BRANCH|TAG|SHA], or . for this checkout's origin and branch (kosa8 github connect first)—
--runstringlabel every sandbox kosa8.run=RUN, the run heartbeat, drain and kosa8 cloud rl select by—
--secretstringArrayattach this org secret by name (repeatable; needs a sized create)[]
--sizestringvCPUs x GiB: 2x4, 4x8, 8x16 or 16x32, or a small size 0.25x0.5, 0.5x1 or 1x2 (a sized sandbox, booted cold)—
--sleep-afterdurationsleep after this long idle, e.g. 15m; 0 never (default: the organization's setting)0s
--templatestringtemplate key, e.g. base (default: the organization's default)—
--ttldurationdelete it this long from now, e.g. 2h (1m to 90 days)0s
--wait-timeoutdurationhow long to wait for a sized sandbox to boot5m0s

Example#

  kosa8 cloud sandbox create
  kosa8 cloud sandbox create --size 4x8 --image kosa8-template/universal-24.04-20261115.2 --docker
  kosa8 cloud sandbox create --size 2x4 --persistent --name api -e OPENAI_API_KEY --ttl 2h
  kosa8 cloud sandbox create --from-snapshot snap_0123abcd --region eu
  kosa8 cloud sandbox create --repo acme/app@main   # cloned into /workspace/app (kosa8 github connect first)
  kosa8 cloud sandbox create --repo .               # this checkout's GitHub repo and branch
  kosa8 cloud sandbox create --repo acme/app --pr 42   # continue pull request #42 on its branch
  kosa8 cloud sandbox create --size 2x4 --secret openai --allow pypi.org --allow files.pythonhosted.org
  kosa8 cloud sandbox create --count 64 --size 0.5x1 --run run_8f2k --lease 10m --prefix rollout
  id=$(kosa8 cloud sandbox create --json | jq -r .sandbox.id)

The kosa8 weekly

Agent security news, one industry deep-dive and a hands-on challenge, every Monday. Unsubscribe in one click.

© 2026 kosa8 · kosa8.com · Zero Trust cybersecurity infrastructure for AI agents · Local models served by llamay · Agent gateway: MAQPNA