Skip to content

Sandbox isolation

Crios agents write and execute real code: they install packages, run builds, and launch servers and browsers. Every session therefore runs inside its own isolated sandbox, and in production that sandbox is a hardware-virtualized microVM, not just a container.

Why isolation matters

An autonomous agent executes commands it wrote itself, against dependencies it chose, on behalf of one tenant among many. The blast radius of a malicious dependency, a prompt-injected instruction, or a plain bug must be confined to that one session. Crios treats the sandbox boundary, not the agent's good behavior, as the security control.

Per-session sandboxes

Each session gets a dedicated sandbox pod, created for it and torn down after it. Sessions never share a filesystem, process space, or network identity with each other, and a sandbox only ever serves one project in one organization.

Production posture: Kata microVMs

In the production configuration, sandbox pods run under the Kata Containers RuntimeClass:

  • VM boundary. Each sandbox runs inside its own lightweight virtual machine with its own kernel. Escaping it would require breaking hardware virtualization, not just Linux namespaces.
  • Unprivileged pod. The sandbox pod does not run in privileged mode. The agent may have root inside its own VM, but never on the node.
  • No usable cluster credentials. Sandbox pods do not mount a service-account token with API rights, so a compromised sandbox cannot talk to the Kubernetes API. A sandbox that receives project environment variables gets a per-project service account with no cluster permissions at all, which Vault uses to hand it that project's variables and nothing else.
  • Policy-enforced, not convention-enforced. A Kyverno ClusterPolicy validates every pod that runs the sandbox image: it must use the Kata RuntimeClass and must not expose usable service-account credentials. A misconfigured or hand-crafted sandbox pod is rejected at admission, cluster-wide.

Android sessions are the one exception to the VM rule. The Android emulator needs hardware acceleration, which is not available inside Kata, so it runs in a separate sibling pod next to the session's sandbox. The agent itself stays in its Kata VM. The emulator pod is privileged with access to /dev/kvm, and policy holds it to that: it may not mount a service-account token or any other host path.

Self-hosted evaluation clusters may run sandboxes with container-only isolation when Kata is not installed. That is not recommended for multi-tenant use; see requirements. Self-hosted operators turn on the Kata runtime with orchestrator.sandboxRuntimeClass: kata, and the admission policy with security.sandboxPolicies.enabled. The network policies (security.sandboxNetworkPolicy.enabled) are on by default, and hold only where the cluster's network enforces NetworkPolicy; Sandbox network exposure lists what each install path gets.

Workspace volumes

Each session mounts a dedicated workspace volume holding its repository checkout, dependencies, and build artifacts. Workspaces are never shared between sessions of different projects. While a session is active, its workspace is kept. How long a finished session (completed, failed or cancelled) keeps it depends on the installation: on app.crios.ai it stays until someone deletes it; other installations, unless set up otherwise, remove it 24 hours after the session ends, and resuming the session after that starts on a fresh workspace. After you delete a session, the volume is retained for a grace window (72 hours by default) so an accidental delete is recoverable, then reaped and its storage reclaimed. When the cluster's volume quota refuses a new session's workspace, Crios frees deleted sessions' workspaces at once and, on installations that remove finished workspaces, finished sessions' after one hour, so that new sessions can start; an installation set up to keep deleted sessions' volumes frees nothing this way. Self-hosted operators set both windows (configuration), and instance admins and a project's owners and editors can delete workspaces themselves from the Storage pages (Instance administration).

Network egress

Egress from a sandbox is restricted by network policy, which opens it to:

  • the orchestrator, which is the agent's control channel. All LLM traffic flows through the platform, so provider API keys never enter the sandbox;
  • the platform's AI endpoint for the apps you build, where the deployment runs one, which they call with a Crios-issued key (crai_…), never a provider key;
  • the in-cluster git server, the platform's web-search service, and the package-registry proxy;
  • Vault, for the one-time delivery of the project's environment variables at startup;
  • the project databases: the shared project database server, where each project has its own database and login, and any dedicated datastore Crios runs for the project, with its own login;
  • for Android sessions, the session's own emulator, through a policy created for that one sandbox: no sandbox can reach another session's emulator;
  • DNS.

Where the installation still carries the transitional Service-range rules (global.serviceCIDRLegs, see Sandbox network exposure), a sandbox's policy also admits other Services inside the cluster on the ports those rules cover. At the setting true that is the ports of the platform services above and the database ports, which includes published apps listening on 8080 or 3000 at their internal addresses. At datastores it is the four database ports only. At false it is nothing beyond the list. Databases and Vault reached this way still ask for their own credentials; a published app reached at its internal address is not behind its access option, which is why these rules are being removed. An installation is moved from one setting to the next in checked steps, and your operator can tell you which one yours is at.

Beyond those platform services, sandboxes can reach the public internet: agents fetch packages from public registries and browse the web for research. That access leaves out private, carrier-grade NAT, and link-local address ranges, so it does not extend to the cloud provider's metadata endpoints or to anything on your private network. How far a sandbox reaches past the services above and the public internet depends on the sandbox runtime and on the cluster's networking: see Sandbox network exposure.

Inbound, the orchestrator connects to a sandbox. It uses that path for the agent API and the live preview, and to let a workflow trigger listen on the app's own database inside the sandbox, which requires the sandbox's own password. Nothing outside the cluster can reach a sandbox.

Skills and publishing builds

Code skills never run inside a session's sandbox. Where the deployment has the code runtime, each one runs in its own runner pod under the same microVM runtime, with network policies built from the permissions the skill declares.

When you publish a project, its container image is built in a dedicated build namespace, isolated from platform components and from other tenants. The build job itself must run under the Kata microVM runtime without service-account credentials. Published apps then run in their own per-app namespaces with resource quotas, under the same runtime requirement.

For how credentials, user data, and project databases are protected, see data & secrets.